Module: Twitter::API
- Defined in:
- lib/flix/api.rb
Instance Method Summary collapse
-
#user(*args) ⇒ Object
def user(*args) options = args.extract_options! if user = args.pop options.merge_user!(user) object_from_response(Twitter::User, :get, “/1/users/show.json”, options) end end.
Instance Method Details
#user(*args) ⇒ Object
def user(*args)
= args.
if user = args.pop
.merge_user!(user)
object_from_response(Twitter::User, :get, "/1/users/show.json", )
end
end
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/flix/api.rb', line 14 def user(*args) = args. if netflix_uid = args.pop client = shared_client(user) url = "/users/#{netflix_uid}" # puts "get this URL #{url}" response = from_response(:get, url, {output: "json"}, ) # response = client.get do |req| # req.url url # req.params['output'] = "json" # end puts "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" puts "RECEIVED FROM NETFLIX" puts "-------------HEADERS-----------------" puts "#{response.headers}" puts "----------------BODY--------------" puts "#{response.body}" puts "----------------------------------" return response.body end end |