Module: Seoshop::ShopTracking
- Included in:
- Client
- Defined in:
- lib/seoshop-api/api/shop_tracking.rb
Instance Method Summary collapse
- #delete_tracking(tracking_id) ⇒ Object
- #get_tracking(tracking_id) ⇒ Object
- #get_trackings(params = {}) ⇒ Object
- #get_trackings_count(params = {}) ⇒ Object
- #post_tracking(params) ⇒ Object
- #update_tracking(tracking_id, params) ⇒ Object
Instance Method Details
#delete_tracking(tracking_id) ⇒ Object
27 28 29 30 |
# File 'lib/seoshop-api/api/shop_tracking.rb', line 27 def delete_tracking(tracking_id) response = delete("#{@shop_language}/shop/tracking/#{script_id}.json") true end |
#get_tracking(tracking_id) ⇒ Object
23 24 25 26 |
# File 'lib/seoshop-api/api/shop_tracking.rb', line 23 def get_tracking(tracking_id) response = get("#{@shop_language}/shop/tracking/#{tracking_id}.json") response.body ? response.body['shopTracking'] : false end |
#get_trackings(params = {}) ⇒ Object
8 9 10 11 |
# File 'lib/seoshop-api/api/shop_tracking.rb', line 8 def get_trackings(params = {}) response = get("#{@shop_language}/shop/tracking.json", params) response.body ? response.body['shopTracking'] : false end |
#get_trackings_count(params = {}) ⇒ Object
4 5 6 7 |
# File 'lib/seoshop-api/api/shop_tracking.rb', line 4 def get_trackings_count(params = {}) response = get("#{@shop_language}/shop/tracking/count.json", params) response.body ? response.body['count'] : false end |
#post_tracking(params) ⇒ Object
13 14 15 16 |
# File 'lib/seoshop-api/api/shop_tracking.rb', line 13 def post_tracking(params) response = post("#{@shop_language}/shop/tracking.json", { "shopTracking" => params }) response.body ? response.body['shopTracking'] : false end |
#update_tracking(tracking_id, params) ⇒ Object
18 19 20 21 |
# File 'lib/seoshop-api/api/shop_tracking.rb', line 18 def update_tracking(tracking_id, params) response = put("#{@shop_language}/shop/tracking/#{tracking_id}.json", { "shopTracking" => params } ) response.body ? response.body['shopTracking'] : false end |