- 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