Class: Qrdot::AnalyticsResource
- Inherits:
-
Object
- Object
- Qrdot::AnalyticsResource
- Defined in:
- lib/qrdot/client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ AnalyticsResource
constructor
A new instance of AnalyticsResource.
- #qr(id, query = {}) ⇒ Object
- #scans(id, query = {}) ⇒ Object
- #summary(query = {}) ⇒ Object
Constructor Details
#initialize(client) ⇒ AnalyticsResource
Returns a new instance of AnalyticsResource.
180 181 182 |
# File 'lib/qrdot/client.rb', line 180 def initialize(client) @c = client end |
Instance Method Details
#qr(id, query = {}) ⇒ Object
189 190 191 192 |
# File 'lib/qrdot/client.rb', line 189 def qr(id, query = {}) qs = query.empty? ? "" : "?#{URI.encode_www_form(query)}" @c.request("GET", "/v1/analytics/qr/#{URI.encode_www_form_component(id)}#{qs}") end |
#scans(id, query = {}) ⇒ Object
194 195 196 197 |
# File 'lib/qrdot/client.rb', line 194 def scans(id, query = {}) qs = query.empty? ? "" : "?#{URI.encode_www_form(query)}" @c.request("GET", "/v1/analytics/qr/#{URI.encode_www_form_component(id)}/scans#{qs}") end |
#summary(query = {}) ⇒ Object
184 185 186 187 |
# File 'lib/qrdot/client.rb', line 184 def summary(query = {}) qs = query.empty? ? "" : "?#{URI.encode_www_form(query)}" @c.request("GET", "/v1/analytics/summary#{qs}") end |