pksunkara / octonode

github api v3 in nodejs
MIT License
1.19k stars 237 forks source link

client.notification(4141); not working #289

Closed orr-levinger closed 7 years ago

orr-levinger commented 7 years ago

const client = github.client({ username: '***', password: '****' }); const gitHubRepository = client.repo('**/**'); const not = client.notification(4141); not.subscribe((data) => { console.log("data:"+JSON.stringify(data)); });

results in:

ata:{"message":"Not Found","statusCode":404,"headers":{"server":"GitHub.com","date":"Sun, 01 Oct 2017 13:31:43 GMT","content-type":"application/json; charset=utf-8","content-length":"77","connection":"close","status":"404 Not Found","x-ratelimit-limit":"5000","x-ratelimit-remaining":"4284","x-ratelimit-reset":"1506867491","x-github-media-type":"github.v3; format=json","access-control-expose-headers":"ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval","access-control-allow-origin":"*","content-security-policy":"default-src 'none'","strict-transport-security":"max-age=31536000; includeSubdomains; preload","x-content-type-options":"nosniff","x-frame-options":"deny","x-xss-protection":"1; mode=block","x-runtime-rack":"0.038285","x-github-request-id":"F16A:4794:307E904:66104DC:59D0EE3F"},"body":{"message":"Not Found","documentation_url":"https://developer.github.com/v3"}} a: undefined

pksunkara commented 7 years ago

You need to give it a repo name. / is not a valid repo under your github user account.