1.0.0 • Published 5 years ago

chastikey-js v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

chastikey-js

travis-ci travis-ci

How to install

Yarn

yarn add chastikey-js

NPM

npm i chastikey-js

Usage

ChastiKey

Available Options:

KeyAccepts Type(s)DefaultAvailable/Example
baseURLstringhttps://chastikey.com
repostringapiapi, json
apiVersionstringv0.4v0.2, v0.3, v0.4, (1.0*)

*1.0 - is only for the JSON exports, NOT for regular lookups.

ChastiKey.ListLocks

Retrieves the specified user's locks.

ChastiKey Side Caching: [ Yes ] [ 60 Seconds ]

Available Options:

KeyRequired?Accepts Type(s)Default
usernameYesstring
showdeletedNobooleanfalse
botNostring

API Usage:

const ll = await new ChastiKey().ListLocks.get({ username: 'username' })
const ll = await new ChastiKey().ListLocks.getByUsername('username')

ll // => { status: 200, locks: Array<ListLocksLock>, ... }

ChastiKey.Ticker

Creates the URL string to the user's Ticker.

ChastiKey Side Caching: [ No ]

Available Options:

KeyRequired?Accepts Type(s)Available/Example
usernameYesstring
typeYesstringLockee, Keyholder
show5StarRatingYesboolean
optionalNoobject
optional.startDateNoobject{ day: '01', month: '01', year: '2019'}
optional.fileExtNostringjpg ,png , gif
optional.addTimestampNoboolean

API Usage:

const ticker = new ChastiKey.Ticker.getURL({
  username: 'UsernameHere',
  type: 'Keyholder',
  show5StarRating: false,
  optional: { fileExt: 'png' }
})

ticker // => "https://chastikey.com/tickers/ticker.php?ty=1&un=UsernameHere&r=0&ext=.png"

License

MIT

1.0.0

5 years ago