2.0.0 • Published 7 years ago

relevant-urban v2.0.0

Weekly downloads
1,384
License
MIT
Repository
github
Last release
7 years ago

Relevant urban NPM Build Status Greenkeeper badge

This module was meant to replace shitty urban module as it uses callbacks and does useless stuff.

const urban = require('relevant-urban');
Methodsreturnsdescription
urban('string')=> Promise<Definition>Gets first definition from urban matching provided query
urban.random()=> Promise<Definition>Gets random definition from urban
urban.all('string')=> Promise<Array<Definition>>Gets all definitions from page 1 matching provided query
urban.random('string')=> Promise<Definition>Gets random definition from urban matching provided query
urban.search('string', page)=> Promise<api response>Gets raw response from api without any formating

Example output

NOTE: urban.random() method doesn't have tags and sounds

  Definition {
  id: 69266,
  word: 'hello',
  definition: 'what you say when your talking casually with friends and your mom walks in the room',
  example: 'What the hell(mom enters)-o mom.',
  urbanURL: 'http://hello.urbanup.com/69266',
  author: 'mad at the world',
  thumbsUp: 3297,
  thumbsDown: 936,
  tags: [ 'hi', 'hey', 'greeting', 'yo', 'goodbye' ],
  sounds: [ 'http://media.urbandictionary.com/sound/hello-7503.mp3',
  'http://media.urbandictionary.com/sound/hello-9778.mp3',
  'http://media.urbandictionary.com/sound/hello-9897.mp3',
  'http://media.urbandictionary.com/sound/hello-10454.mp3',
  ...]
  }
2.0.0

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago