module Access class Api < Request # Categories def search_categories(options = {}) get("/categories", "offer", options) end def find_category(category_id, options = {}) get("/categories/#{category_id}", "offer", options) end # Offers def search_offers(options={}) get("/offers", "offer", options) end def find_offer(offer_id, options = {}) get("/offers/#{offer_id}", "offer", options) end # Locations def search_locations(options={}) get("/locations", "offer", options) end def find_location(location_id, options = {}) get("/locations/#{location_id}", "offer", options) end # Stores def search_stores(options={}) get("/stores", "offer", options) end def find_store(store_id, options = {}) get("/stores/#{store_id}", "offer", options) end # Autocomplete def autocomplete(options = {}) get("/autocomplete", "offer", options) end # Oauth Applications def search_oauth_applications(options = {}) get('/oauth_applications', 'token', options) end def find_oauth_application(application_id, options = {}) get("/oauth_applications/#{application_id}", 'token', options) end def search_oauth_application_tokens(application_id, options = {}) get("/oauth_applications/#{application_id}/access_tokens", 'token', options) end def find_oauth_application_token(application_id, token_id, options = {}) get("/oauth_applications/#{application_id}/access_tokens/#{token_id}", 'token', options) end def create_oauth_application_token(application_id, options = {}) create("/oauth_applications/#{application_id}/access_tokens", 'token', options) end def create_oauth_application(options = {}) create("/oauth_applications", 'token', options) end def update_oauth_application(application_id, options = {}) put("/oauth_applications/#{application_id}", 'token', options) end def delete_oauth_application(application_id, options = {}) delete("/oauth_applications/#{application_id}", 'token', options) end # Access Tokens def search_tokens(options = {}) get('/tokens', 'token', options) end def find_token(token, options = {}) # new verify_other get("/tokens/#{token}", "token", options) end # Verify def verify_token(options = {}) get('/verify', 'token', options) end def verify_filter(options = {}) get_json('/filter', 'token', options) end # Redeem def redeem_offer(offer_key, redeem_type = nil, options = {}) get("/redeem/#{offer_key}/#{redeem_type}", "redeem", options) end # Report def all_usage(options = {}) get("/all_usage", "report", options) end def usage(options = {}) get("/usage", "report", options) end def usage_other(token, options = {}) get("/usage/#{token}", "report", options) end # Member end end