Skip to content

๐Ÿ“˜ a simple API to generate unique randomized words & phrases.

License

Notifications You must be signed in to change notification settings

chroline/words-aas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

61 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Words as a Service

Hosted on Vercel License: MIT contributions welcome chroline/words-aas


A simple API to generate unique randomized words & phrases.

Usage

Word Types

words-aas supports 8 word types that can be used to form a phrase:

  • adjective
  • adverb
  • animal
  • bodyParts
  • gerunds
  • pluralNouns
  • verbs (imperative mood)

Additional Features

When placed at the beginning of a phrase, the word a will be transformed into an if the second word in the phrase begins with a vowel (i.e. a/an squid/octopus). You can also use any additional words to form a phrase like the, it, is, etc.

Forming a phrase

To form a phrase, connect the type(s) of words you want with a comma. For example, to form a phrase consisting of a verb, the, and a plural noun, you would use the following: the,pluralNoun,is,gerund for the slug API or the $pluralNoun is $gerund for the query API.

API

Slug API

Make a GET request to https://words-aas.now.sh/api/PHRASE, where PHRASE is the type of phrase desired.

curl --request GET \
  --url 'https://words-aas.vercel.app/api/the%20$pluralNoun%20is%20$gerund'

Query API

or, POST to https://words-aas.now.sh/api/ with a query of the type of phrase desired.

curl --request POST \
    --url https://words-aas.vercel.app/api/ \
    --header 'content-type: application/json' \
    --data '{
  	  "query": "the $pluralNoun is $gerund"
    }'