Class: FbGraph::Query
Constant Summary collapse
- ENDPOINT =
'https://api.facebook.com/method/fql.query'
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#query ⇒ Object
Returns the value of attribute query.
Attributes inherited from Node
Instance Method Summary collapse
- #fetch(access_token = nil) ⇒ Object
-
#initialize(query, access_token = nil) ⇒ Query
constructor
A new instance of Query.
Methods inherited from Node
#connection, #destroy, fetch, #update
Methods included from Comparison
Constructor Details
#initialize(query, access_token = nil) ⇒ Query
Returns a new instance of Query.
7 8 9 10 |
# File 'lib/fb_graph/query.rb', line 7 def initialize(query, access_token = nil) @query = query @access_token = access_token end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
5 6 7 |
# File 'lib/fb_graph/query.rb', line 5 def access_token @access_token end |
#query ⇒ Object
Returns the value of attribute query.
5 6 7 |
# File 'lib/fb_graph/query.rb', line 5 def query @query end |
Instance Method Details
#fetch(access_token = nil) ⇒ Object
12 13 14 15 16 |
# File 'lib/fb_graph/query.rb', line 12 def fetch(access_token = nil) handle_response do HTTPClient.new.get ENDPOINT, :query => build_params(access_token) end end |