1.0.1 • Published 2 years ago
pronouns-page-api v1.0.1
pronouns-page-api
A nodejs wrapper for pronouns.page web API
☁️ Installation
# Using npm
npm install --save pronouns-page-api
# Using yarn
yarn add pronouns-page-api
:clipboard: Example
// Requires package
const pronounsApi = require('pronouns-page-api');
// Runs applet asynchronously
async function main(){
// Prints she/her pronoun description
const pronoun = await pronounsApi.pronouns("she");
console.log( pronoun.description );
// Prints all pronouns
const pronouns = await pronounsApi.pronouns();
console.log( pronouns )
// Saves banner image to "./she_banner.png"
const banner = await pronounsApi.pronounImage("she");
// Prints source title from ID
const source = await pronounsApi.sources("01ERQRCV0V4QVMNKCENF724A08");
console.log( source[0].title );
// Prints all sources
const sources = await pronounsApi.sources();
console.log( sources )
// Prints "villains" feminine requivalent
const noun = await pronounsApi.nouns("villains");
console.log( noun[0].fem )
// Prints all nouns
const nouns = await pronounsApi.nouns();
console.log( nouns )
// Prints "afab" definition
const term = await pronounsApi.terms("afab");
console.log( term[0].definition )
// Prints all definitions
const terms = await pronounsApi.terms();
console.log( terms )
// Prints username of card
const card = await pronounsApi.card("andrea");
console.log( card.username )
// Prints calender day of current day
const cal = await pronounsApi.calendar();
console.log( cal.day )
// Gets calendar of given date
const date = await pronounsApi.calendar("2022-04-2022");
console.log ( date );
}
// Runs main applet
main();
:scroll: License
MIT ©