0

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
})
Pakas
  • 47
  • 7

1 Answers1

1

OK, turns out the API preview isn't implemented in the library yet.

https://github.com/philschatz/octokat.js/issues/144

Pakas
  • 47
  • 7