Class: GSGraph::Query
Instance Attribute Summary collapse
-
#query ⇒ Object
Returns the value of attribute query.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
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.
5 6 7 8 |
# File 'lib/gs_graph/query.rb', line 5 def initialize(query, access_token = nil) super 'fql', :access_token => access_token @query = query end |
Instance Attribute Details
#query ⇒ Object
Returns the value of attribute query.
3 4 5 |
# File 'lib/gs_graph/query.rb', line 3 def query @query end |
Instance Method Details
#fetch(access_token = nil) ⇒ Object
10 11 12 13 14 |
# File 'lib/gs_graph/query.rb', line 10 def fetch(access_token = nil) handle_response do http_client.get endpoint, :query => build_params(access_token) end end |