module Instagram::Client

Public Instance Methods

access_token() click to toggle source
# File lib/rest-core/client/instagram.rb, line 29
def access_token
  data['access_token']
end
access_token=(token) click to toggle source
# File lib/rest-core/client/instagram.rb, line 33
def access_token= token
  data['access_token'] = token
end
authorize!(payload={}) click to toggle source
# File lib/rest-core/client/instagram.rb, line 42
def authorize! payload={}, opts={}
  p = {:client_id  => client_id, :client_secret => client_secret,
       :grant_type => 'authorization_code'                      }.
       merge(payload)

  self.data = post('oauth/access_token', p, {:access_token => false,
                                             :client_id    => false}, opts)
end
authorize_url(query={}) click to toggle source
# File lib/rest-core/client/instagram.rb, line 37
def authorize_url query={}, opts={}
  url('oauth/authorize', {:access_token  => false,
                          :response_type => 'code'}.merge(query), opts)
end
me(query={}) click to toggle source
# File lib/rest-core/client/instagram.rb, line 25
def me query={}, opts={}, &cb
  get('v1/users/self', query, opts, &cb)
end

Private Instance Methods

default_data() click to toggle source
# File lib/rest-core/client/instagram.rb, line 52
def default_data ;                        {}; end
default_query() click to toggle source
# File lib/rest-core/client/instagram.rb, line 53
def default_query; {:client_id => client_id}; end