Class: GogoKit::Client
- Inherits:
-
Object
- Object
- GogoKit::Client
- Includes:
- Address, Category, Country, Currency, Event, Language, Listing, MetroArea, OAuth, PaymentMethod, Root, Search, SellerListing, User, Venue, Configuration, Connection
- Defined in:
- lib/gogokit/client.rb,
lib/gogokit/client/root.rb,
lib/gogokit/client/user.rb,
lib/gogokit/client/event.rb,
lib/gogokit/client/oauth.rb,
lib/gogokit/client/venue.rb,
lib/gogokit/client/search.rb,
lib/gogokit/client/address.rb,
lib/gogokit/client/country.rb,
lib/gogokit/client/listing.rb,
lib/gogokit/client/category.rb,
lib/gogokit/client/currency.rb,
lib/gogokit/client/language.rb,
lib/gogokit/client/metro_area.rb,
lib/gogokit/client/payment_method.rb,
lib/gogokit/client/seller_listing.rb
Overview
Client for the viagogo API
Defined Under Namespace
Modules: Address, Category, Country, Currency, Event, Language, Listing, MetroArea, OAuth, PaymentMethod, Root, Search, SellerListing, User, Venue
Instance Attribute Summary
Attributes included from Configuration
#access_token, #api_root_endpoint, #authorization_endpoint, #client_id, #client_secret, #oauth_token_endpoint
Instance Method Summary collapse
-
#delete(url, options = {}) ⇒ Hash
Perform an HTTP DELETE request.
-
#get(url, options = {}) ⇒ Hash
Perform an HTTP GET request.
-
#head(url, options = {}) ⇒ Hash
Perform an HTTP HEAD request.
-
#initialize(options = {}) {|_self| ... } ⇒ GogoKit::Client
constructor
Initializes a new Client.
-
#patch(url, options = {}) ⇒ Hash
Perform an HTTP PATCH request.
-
#post(url, options = {}) ⇒ Hash
Perform an HTTP POST request.
-
#put(url, options = {}) ⇒ Hash
Perform an HTTP PUT request.
-
#user_agent ⇒ String
The User-Agent header used when making HTTP requests.
Methods included from Venue
Methods included from Utils
Methods included from User
Methods included from SellerListing
#create_seller_listing, #create_seller_listing_preview, #create_seller_listing_update_preview, #delete_seller_listing, #get_listing_constraints, #get_listing_constraints_for_event, #get_seller_listing, #get_seller_listings, #update_seller_listing
Methods included from Search
Methods included from Root
Methods included from PaymentMethod
Methods included from OAuth
#get_access_token, #get_authorization_code_access_token, #get_authorization_url, #get_client_access_token, #get_refresh_token
Methods included from MetroArea
#get_metro_area, #get_metro_areas
Methods included from Listing
#get_listing, #get_listings_by_event
Methods included from Language
Methods included from Event
#get_event, #get_events_by_category
Methods included from Currency
#get_currencies, #get_currency
Methods included from Country
Methods included from Category
Methods included from Address
Methods included from Configuration
#api_environment, #api_environment=, #reset!
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ GogoKit::Client
Initializes a new GogoKit::Client
is located OAuth access tokens client credentials are not a String or Symbol.
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/gogokit/client.rb', line 58 def initialize( = {}) reset! .each do |key, value| send(:"#{key}=", value) end yield self if block_given? validate_configuration_credentials! validate_configuration_api_environment! validate_configuration_endpoints! end |
Instance Method Details
#delete(url, options = {}) ⇒ Hash
Perform an HTTP DELETE request
81 82 83 |
# File 'lib/gogokit/client.rb', line 81 def delete(url, = {}) request(:delete, url, ) end |
#get(url, options = {}) ⇒ Hash
Perform an HTTP GET request
88 89 90 |
# File 'lib/gogokit/client.rb', line 88 def get(url, = {}) request(:get, url, ) end |
#head(url, options = {}) ⇒ Hash
Perform an HTTP HEAD request
95 96 97 |
# File 'lib/gogokit/client.rb', line 95 def head(url, = {}) request(:head, url, ) end |
#patch(url, options = {}) ⇒ Hash
Perform an HTTP PATCH request
102 103 104 |
# File 'lib/gogokit/client.rb', line 102 def patch(url, = {}) request(:patch, url, ) end |
#post(url, options = {}) ⇒ Hash
Perform an HTTP POST request
109 110 111 |
# File 'lib/gogokit/client.rb', line 109 def post(url, = {}) request(:post, url, ) end |
#put(url, options = {}) ⇒ Hash
Perform an HTTP PUT request
116 117 118 |
# File 'lib/gogokit/client.rb', line 116 def put(url, = {}) request(:put, url, ) end |