Gist / Github API - Get Private and Public Gists

I am trying to list the entire gist from a group of users using the github api. This works very well, but I cannot get it to return private gists to myself or other users.

I know that you can specify a scope in a query, but I don’t understand how to set this in my jQuery query, and what kind of scope should I use to get private gists?

Below is the code of my code:

var the_url = 'https://api.github.com/users/'+ encodeURIComponent(user) +'/gists';

      $.oauth ({
        consumerKey: 'xxxxxxxxxxxxxxxxx', 
        consumerSecret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 
        type: "GET",
        url: the_url,
        data: {},
        dataType: 'json',
        async: false,
+3
source share
1 answer

You need to give the user access through oAuth.

; , gists , , gA .

http://developer.github.com/v3/oauth/#scopes

+1

All Articles