2.0.6 • Published 6 years ago

intra42-fetch v2.0.6

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Intra42-fetch

This is a little package which wrap node-fetch for request the api of the 42 school.

How to use it ?

const Intra42 = require('intra42-fetch')

// Instantiate the Intra42 class and provide your id and secret.

const intra42 = new Intra42(id, secret)

// Intra42.fetch is just a pre-applyed fetch with your token, use it like the fetch API

intra42.fetch('/v2/users')
  .then(json => console.log(json)) // Response.json is used so you'll get json automatically
  .catch(err => console.log(err)) // if the parsing failed the handle the error
2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

7 years ago