Skip to content

Instantly share code, notes, and snippets.

@aerith
Created November 15, 2011 02:44
Show Gist options
  • Save aerith/1365975 to your computer and use it in GitHub Desktop.
Save aerith/1365975 to your computer and use it in GitHub Desktop.
var api = {
instagram: {
client_id: '58b47189dfb54da2a5ba21d21046c96a',
api_base: 'https://api.instagram.com/v1',
callback_url: 'http://i.sakura.aerith.sc/authenticate_complete.html',
required_scope: 'comments+relationships+likes',
authentication_base_url: 'https://instagram.com/oauth/authorize',
response_type: 'token',
access_token: null,
authenticate: apiInstagramAuthenticate,
getAuthenticateURL: apiInstagramGetAuthenticateURL,
identify: apiInstagramIdentify,
getFollows: apiInstagramGetFollows,
getFollowers: apiInstagramGetFollowers
}
};
function apiInstagramIdentify () {
return harukaze.request.get(this.api_base + '/users/self?access_token=' + this.access_token, {}, { ajax : {
dataType: 'jsonp'
}})
}
function apiInstagramGetFollows () {
return harukaze.request.get(this.api_base + '/users/' + _0i.config.current_user.id + '/follows?access_token=' + this.access_token, {}, { ajax : {
dataType: 'jsonp'
}})
}
function apiInstagramGetFollowers () {
return harukaze.request.get(this.api_base + '/users/' + _0i.config.current_user.id + '/followers?access_token=' + this.access_token, {}, { ajax : {
dataType: 'jsonp'
}})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment