Class: Access::Api
Instance Method Summary collapse
-
#all_usage(options = {}) ⇒ Object
Report.
-
#autocomplete(options = {}) ⇒ Object
Autocomplete.
- #citysavings(options = {}) ⇒ Object
- #create_oauth_application(options = {}) ⇒ Object
- #create_oauth_application_token(application_id, options = {}) ⇒ Object
- #delete_oauth_application(application_id, options = {}) ⇒ Object
- #find_category(category_id, options = {}) ⇒ Object
- #find_location(location_id, options = {}) ⇒ Object
- #find_oauth_application(application_id, options = {}) ⇒ Object
- #find_oauth_application_token(application_id, token_id, options = {}) ⇒ Object
- #find_offer(offer_id, options = {}) ⇒ Object
- #find_store(store_id, options = {}) ⇒ Object
-
#find_token(token, options = {}) ⇒ Object
new verify_other.
-
#redeem_offer(offer_key, redeem_type = nil, options = {}) ⇒ Object
Redeem.
-
#search_categories(options = {}) ⇒ Object
Categories.
-
#search_locations(options = {}) ⇒ Object
Locations.
- #search_oauth_application_tokens(application_id, options = {}) ⇒ Object
-
#search_oauth_applications(options = {}) ⇒ Object
Oauth Applications.
-
#search_offers(options = {}) ⇒ Object
Offers.
-
#search_stores(options = {}) ⇒ Object
Stores.
-
#search_tokens(options = {}) ⇒ Object
Access Tokens.
- #update_oauth_application(application_id, options = {}) ⇒ Object
- #usage(options = {}) ⇒ Object
- #usage_other(token, options = {}) ⇒ Object
- #verify_filter(options = {}) ⇒ Object
-
#verify_token(options = {}) ⇒ Object
Verify.
Methods inherited from Request
Instance Method Details
#all_usage(options = {}) ⇒ Object
Report
115 116 117 |
# File 'lib/access/api.rb', line 115 def all_usage( = {}) get("/all_usage", "report", ) end |
#autocomplete(options = {}) ⇒ Object
Autocomplete
45 46 47 |
# File 'lib/access/api.rb', line 45 def autocomplete( = {}) get("/autocomplete", "offer", ) end |
#citysavings(options = {}) ⇒ Object
109 110 111 |
# File 'lib/access/api.rb', line 109 def citysavings( = {}) get("/cities", "redeem", ) end |
#create_oauth_application(options = {}) ⇒ Object
71 72 73 |
# File 'lib/access/api.rb', line 71 def create_oauth_application( = {}) create("/oauth_applications", 'token', ) end |
#create_oauth_application_token(application_id, options = {}) ⇒ Object
67 68 69 |
# File 'lib/access/api.rb', line 67 def create_oauth_application_token(application_id, = {}) create("/oauth_applications/#{application_id}/access_tokens", 'token', ) end |
#delete_oauth_application(application_id, options = {}) ⇒ Object
79 80 81 |
# File 'lib/access/api.rb', line 79 def delete_oauth_application(application_id, = {}) delete("/oauth_applications/#{application_id}", 'token', ) end |
#find_category(category_id, options = {}) ⇒ Object
9 10 11 |
# File 'lib/access/api.rb', line 9 def find_category(category_id, = {}) get("/categories/#{category_id}", "offer", ) end |
#find_location(location_id, options = {}) ⇒ Object
29 30 31 |
# File 'lib/access/api.rb', line 29 def find_location(location_id, = {}) get("/locations/#{location_id}", "offer", ) end |
#find_oauth_application(application_id, options = {}) ⇒ Object
55 56 57 |
# File 'lib/access/api.rb', line 55 def find_oauth_application(application_id, = {}) get("/oauth_applications/#{application_id}", 'token', ) end |
#find_oauth_application_token(application_id, token_id, options = {}) ⇒ Object
63 64 65 |
# File 'lib/access/api.rb', line 63 def find_oauth_application_token(application_id, token_id, = {}) get("/oauth_applications/#{application_id}/access_tokens/#{token_id}", 'token', ) end |
#find_offer(offer_id, options = {}) ⇒ Object
19 20 21 |
# File 'lib/access/api.rb', line 19 def find_offer(offer_id, = {}) get("/offers/#{offer_id}", "offer", ) end |
#find_store(store_id, options = {}) ⇒ Object
39 40 41 |
# File 'lib/access/api.rb', line 39 def find_store(store_id, = {}) get("/stores/#{store_id}", "offer", ) end |
#find_token(token, options = {}) ⇒ Object
new verify_other
89 90 91 |
# File 'lib/access/api.rb', line 89 def find_token(token, = {}) # new verify_other get("/tokens/#{token}", "token", ) end |
#redeem_offer(offer_key, redeem_type = nil, options = {}) ⇒ Object
Redeem
105 106 107 |
# File 'lib/access/api.rb', line 105 def redeem_offer(offer_key, redeem_type = nil, = {}) get("/redeem/#{offer_key}/#{redeem_type}", "redeem", ) end |
#search_categories(options = {}) ⇒ Object
Categories
5 6 7 |
# File 'lib/access/api.rb', line 5 def search_categories( = {}) get("/categories", "offer", ) end |
#search_locations(options = {}) ⇒ Object
Locations
25 26 27 |
# File 'lib/access/api.rb', line 25 def search_locations(={}) get("/locations", "offer", ) end |
#search_oauth_application_tokens(application_id, options = {}) ⇒ Object
59 60 61 |
# File 'lib/access/api.rb', line 59 def search_oauth_application_tokens(application_id, = {}) get("/oauth_applications/#{application_id}/access_tokens", 'token', ) end |
#search_oauth_applications(options = {}) ⇒ Object
Oauth Applications
51 52 53 |
# File 'lib/access/api.rb', line 51 def search_oauth_applications( = {}) get('/oauth_applications', 'token', ) end |
#search_offers(options = {}) ⇒ Object
Offers
15 16 17 |
# File 'lib/access/api.rb', line 15 def search_offers(={}) get("/offers", "offer", ) end |
#search_stores(options = {}) ⇒ Object
Stores
35 36 37 |
# File 'lib/access/api.rb', line 35 def search_stores(={}) get("/stores", "offer", ) end |
#search_tokens(options = {}) ⇒ Object
Access Tokens
85 86 87 |
# File 'lib/access/api.rb', line 85 def search_tokens( = {}) get('/tokens', 'token', ) end |
#update_oauth_application(application_id, options = {}) ⇒ Object
75 76 77 |
# File 'lib/access/api.rb', line 75 def update_oauth_application(application_id, = {}) put("/oauth_applications/#{application_id}", 'token', ) end |
#usage(options = {}) ⇒ Object
119 120 121 |
# File 'lib/access/api.rb', line 119 def usage( = {}) get("/usage", "report", ) end |
#usage_other(token, options = {}) ⇒ Object
123 124 125 |
# File 'lib/access/api.rb', line 123 def usage_other(token, = {}) get("/usage/#{token}", "report", ) end |
#verify_filter(options = {}) ⇒ Object
99 100 101 |
# File 'lib/access/api.rb', line 99 def verify_filter( = {}) get_json('/filter', 'token', ) end |
#verify_token(options = {}) ⇒ Object
Verify
95 96 97 |
# File 'lib/access/api.rb', line 95 def verify_token( = {}) get('/verify', 'token', ) end |