![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | lib/ | 2 years ago | - | |
![]() | config/ | 2 years ago | - | |
![]() | LICENSE | 9 years ago | 8.9K | |
![]() | package.json | 2 years ago | 2.2K | |
![]() | CHANGELOG.md | 8 years ago | 2.1K | |
![]() | README.md | 9 years ago | 1.7K | |
![]() | index.js | 9 years ago | 797 |
Purest is a generic REST API client library that can be used with any REST API, any HTTP client library, and any Promise implementation:
var request = require('request')
var promise = require('bluebird')
var purest = require('purest')({request, promise})
var config = require('@purest/providers')
var google = purest({provider: 'google', config})
var req = google
.query('youtube')
.select('channels')
.where({forUsername: 'CaseyNeistat'})
.auth('[ACCESS_TOKEN]')
.request()
req
.catch((err) => {})
.then((result) => {})