Module: Metrika::Api::Counters
- Included in:
- Client
- Defined in:
- lib/metrika/api/counters.rb
Instance Method Summary collapse
- #check_counter(id) ⇒ Object
- #counter_check_path(id) ⇒ Object
- #counter_path(id) ⇒ Object
- #counters_path ⇒ Object
- #create_counter(params) ⇒ Object
- #delete_counter(id) ⇒ Object
- #get_counter(id) ⇒ Object
- #get_counters ⇒ Object
- #update_counter(id, params) ⇒ Object
Instance Method Details
#check_counter(id) ⇒ Object
32 33 34 |
# File 'lib/metrika/api/counters.rb', line 32 def check_counter(id) self.get(self.counter_check_path(id))['counter'] end |
#counter_check_path(id) ⇒ Object
36 37 38 |
# File 'lib/metrika/api/counters.rb', line 36 def counter_check_path(id) "/counter/#{id}/check" end |
#counter_path(id) ⇒ Object
28 29 30 |
# File 'lib/metrika/api/counters.rb', line 28 def counter_path(id) "/counter/#{id}" end |
#counters_path ⇒ Object
12 13 14 |
# File 'lib/metrika/api/counters.rb', line 12 def counters_path "/counters" end |
#create_counter(params) ⇒ Object
8 9 10 |
# File 'lib/metrika/api/counters.rb', line 8 def create_counter(params) self.post(self.counters_path, params)['counter'] end |
#delete_counter(id) ⇒ Object
24 25 26 |
# File 'lib/metrika/api/counters.rb', line 24 def delete_counter(id) self.delete(self.counter_path(id))['counter'] end |
#get_counter(id) ⇒ Object
16 17 18 |
# File 'lib/metrika/api/counters.rb', line 16 def get_counter(id) self.get(self.counter_path(id))['counter'] end |
#get_counters ⇒ Object
4 5 6 |
# File 'lib/metrika/api/counters.rb', line 4 def get_counters self.get(self.counters_path)['counters'] end |
#update_counter(id, params) ⇒ Object
20 21 22 |
# File 'lib/metrika/api/counters.rb', line 20 def update_counter(id, params) self.put(self.counter_path(id), params)['counter'] end |