Class: Nimbu::Client
Constant Summary
Constants included
from Request
Request::METHODS, Request::METHODS_WITH_BODIES
Utils::Constants::ACCEPT, Utils::Constants::ACCEPTED_OAUTH_SCOPES, Utils::Constants::ACCEPT_CHARSET, Utils::Constants::CACHE_CONTROL, Utils::Constants::CONTENT_LENGTH, Utils::Constants::CONTENT_TYPE, Utils::Constants::DATE, Utils::Constants::ETAG, Utils::Constants::HEADER_LAST, Utils::Constants::HEADER_LINK, Utils::Constants::HEADER_NEXT, Utils::Constants::LOCATION, Utils::Constants::META_FIRST, Utils::Constants::META_LAST, Utils::Constants::META_NEXT, Utils::Constants::META_PREV, Utils::Constants::META_REL, Utils::Constants::NIMBU_SITE, Utils::Constants::OAUTH_SCOPES, Utils::Constants::PARAM_PAGE, Utils::Constants::PARAM_PER_PAGE, Utils::Constants::PARAM_START_PAGE, Utils::Constants::RATELIMIT_LIMIT, Utils::Constants::RATELIMIT_REMAINING, Utils::Constants::SERVER, Utils::Constants::USER_AGENT
Constants included
from Connection
Nimbu::Connection::ALLOWED_OPTIONS
Instance Attribute Summary
Attributes inherited from Endpoint
#current_options
#scopes
Instance Method Summary
collapse
-
#authenticate(options = {}, &block) ⇒ Object
-
#blogs(options = {}, &block) ⇒ Object
-
#channels(options = {}, &block) ⇒ Object
-
#collections(options = {}, &block) ⇒ Object
-
#coupons(options = {}, &block) ⇒ Object
-
#customers(options = {}, &block) ⇒ Object
-
#devices(options = {}, &block) ⇒ Object
-
#menus(options = {}, &block) ⇒ Object
-
#oauth(options = {}, &block) ⇒ Object
(also: #authorizations)
-
#pages(options = {}, &block) ⇒ Object
-
#products(options = {}, &block) ⇒ Object
-
#redirects(options = {}, &block) ⇒ Object
-
#simulator(options = {}, &block) ⇒ Object
-
#sites(options = {}, &block) ⇒ Object
-
#themes(options = {}, &block) ⇒ Object
-
#uploads(options = {}, &block) ⇒ Object
-
#users(options = {}, &block) ⇒ Object
-
#videos(options = {}, &block) ⇒ Object
Methods inherited from Endpoint
#api_methods_in, #append_arguments, #arguments, inherited, #initialize, #method_missing, #process_basic_auth, #set, #setup, #with, #yield_or_eval
Methods included from Request
#delete_request, #get_request, #patch_request, #post_request, #put_request, #request
Methods included from Connection
#caching?, #clear_cache, #connection, #default_middleware, #default_options, #stack
#auth_code, #authenticated?, #authentication, #authorize_url, #basic_authed?, #client, #get_token
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Nimbu::Endpoint
Instance Method Details
#authenticate(options = {}, &block) ⇒ Object
53
54
55
|
# File 'lib/nimbu-api/client.rb', line 53
def authenticate(options = {}, &block)
Nimbu::Builder.new("Login", current_options.merge(options), &block).response
end
|
#blogs(options = {}, &block) ⇒ Object
69
70
71
|
# File 'lib/nimbu-api/client.rb', line 69
def blogs(options = {}, &block)
Nimbu::Builder.new("Blogs", current_options.merge(options), &block)
end
|
#channels(options = {}, &block) ⇒ Object
21
22
23
|
# File 'lib/nimbu-api/client.rb', line 21
def channels(options = {}, &block)
Nimbu::Builder.new("Channels", current_options.merge(options), &block)
end
|
#collections(options = {}, &block) ⇒ Object
41
42
43
|
# File 'lib/nimbu-api/client.rb', line 41
def collections(options = {}, &block)
Nimbu::Builder.new("Collections", current_options.merge(options), &block)
end
|
#coupons(options = {}, &block) ⇒ Object
49
50
51
|
# File 'lib/nimbu-api/client.rb', line 49
def coupons(options = {}, &block)
Nimbu::Builder.new("Coupons", current_options.merge(options), &block)
end
|
#customers(options = {}, &block) ⇒ Object
37
38
39
|
# File 'lib/nimbu-api/client.rb', line 37
def customers(options = {}, &block)
Nimbu::Builder.new("Customers", current_options.merge(options), &block)
end
|
#devices(options = {}, &block) ⇒ Object
45
46
47
|
# File 'lib/nimbu-api/client.rb', line 45
def devices(options = {}, &block)
Nimbu::Builder.new("Devices", current_options.merge(options), &block)
end
|
65
66
67
|
# File 'lib/nimbu-api/client.rb', line 65
def (options = {}, &block)
Nimbu::Builder.new("Menus", current_options.merge(options), &block)
end
|
#oauth(options = {}, &block) ⇒ Object
Also known as:
authorizations
8
9
10
|
# File 'lib/nimbu-api/client.rb', line 8
def oauth(options = {}, &block)
Nimbu::Builder.new("Authorizations", current_options.merge(options), &block)
end
|
#pages(options = {}, &block) ⇒ Object
61
62
63
|
# File 'lib/nimbu-api/client.rb', line 61
def pages(options = {}, &block)
Nimbu::Builder.new("Pages", current_options.merge(options), &block)
end
|
#products(options = {}, &block) ⇒ Object
33
34
35
|
# File 'lib/nimbu-api/client.rb', line 33
def products(options = {}, &block)
Nimbu::Builder.new("Products", current_options.merge(options), &block)
end
|
#redirects(options = {}, &block) ⇒ Object
73
74
75
|
# File 'lib/nimbu-api/client.rb', line 73
def redirects(options = {}, &block)
Nimbu::Builder.new("Redirects", current_options.merge(options), &block)
end
|
#simulator(options = {}, &block) ⇒ Object
29
30
31
|
# File 'lib/nimbu-api/client.rb', line 29
def simulator(options = {}, &block)
Nimbu::Builder.new("Simulator", current_options.merge(options), &block)
end
|
#sites(options = {}, &block) ⇒ Object
13
14
15
|
# File 'lib/nimbu-api/client.rb', line 13
def sites(options = {}, &block)
Nimbu::Builder.new("Sites", current_options.merge(options), &block)
end
|
#themes(options = {}, &block) ⇒ Object
17
18
19
|
# File 'lib/nimbu-api/client.rb', line 17
def themes(options = {}, &block)
Nimbu::Builder.new("Themes", current_options.merge(options), &block)
end
|
#uploads(options = {}, &block) ⇒ Object
77
78
79
|
# File 'lib/nimbu-api/client.rb', line 77
def uploads(options = {}, &block)
Nimbu::Builder.new("Uploads", current_options.merge(options), &block)
end
|
#users(options = {}, &block) ⇒ Object
57
58
59
|
# File 'lib/nimbu-api/client.rb', line 57
def users(options = {}, &block)
Nimbu::Builder.new("Users", current_options.merge(options), &block)
end
|
#videos(options = {}, &block) ⇒ Object
25
26
27
|
# File 'lib/nimbu-api/client.rb', line 25
def videos(options = {}, &block)
Nimbu::Builder.new("Videos", current_options.merge(options), &block)
end
|