Skip to content

2.6.0

Compare
Choose a tag to compare
@AtoraSuunva AtoraSuunva released this 28 Jul 05:27
· 14 commits to master since this release
76199a8
  • Added credential support
    • Support is fairly basic and only support query param auth
    • The credential object provided will be serialized into query params
    • Previously credentials did nothing, now they do something
  • Updated some types to return more useful type unions (like AnySite being a union of all site domains)
  • Booru#getSearchUrl now properly accepts no parameters
const booru = require('booru')
const gelbooru = booru.forSite('gb', { api_key: 'key', user_id: 'id' })
gelbooru.getSearchUrl()
// https://gelbooru.com/index.php?page=dapi&s=post&q=index&json=1&tags=&limit=100&pid=1&api_key=key&user_id=id

// or
booru.search('gb', [], {
  credentials: { api_key: 'key', user_id: 'id' },
})
// Uses the same search URL as above