I'm trying to access projects of a repository through GitHub API using Octokat.js.
The API guide says I need to use preview header, which I am using: https://developer.github.com/v3/projects/
I'm getting error for property fetchAll
of undefined
(= projects).
I'm not sure what I'm doing wrong here - does anybody have an experience with this?
var Octokat = require('octokat')
var octo = new Octokat({
// put your own token here
token: 'XXX',
acceptHeader: 'application/vnd.github.inertia-preview+json'
})
octo.repos('YYY', 'ZZZ').projects.fetchAll((e, val) => {
this.projectsList = val
})