Module: AmendiaRemote
- Defined in:
- lib/amendia_remote.rb,
lib/amendia_remote/api.rb,
lib/amendia_remote/config.rb,
lib/amendia_remote/version.rb
Defined Under Namespace
Modules: Api
Classes: Config
Constant Summary
collapse
- VERSION =
"0.0.3"
Class Method Summary
collapse
-
.authorize(email, password) ⇒ Object
-
.common_user_api_token ⇒ Object
-
.config ⇒ Object
-
.configure {|config| ... } ⇒ Object
-
.course(id, api_token) ⇒ Object
-
.instrument(id, api_token) ⇒ Object
-
.product(id, api_token) ⇒ Object
-
.product_cat(id, api_token) ⇒ Object
-
.products(category_id, api_token) ⇒ Object
-
.registration(email, password, api_role, first_name = nil, last_name = nil, phone = nil, recommender = nil) ⇒ Object
Class Method Details
.authorize(email, password) ⇒ Object
14
15
16
|
# File 'lib/amendia_remote.rb', line 14
def self.authorize(email, password)
Api.authorize(email, password)
end
|
.common_user_api_token ⇒ Object
.config ⇒ Object
6
7
8
|
# File 'lib/amendia_remote.rb', line 6
def self.config
@config ||= Config.new
end
|
10
11
12
|
# File 'lib/amendia_remote.rb', line 10
def self.configure
yield config
end
|
.course(id, api_token) ⇒ Object
42
43
44
|
# File 'lib/amendia_remote.rb', line 42
def self.course(id, api_token)
Api.get_course(id, api_token)
end
|
.instrument(id, api_token) ⇒ Object
38
39
40
|
# File 'lib/amendia_remote.rb', line 38
def self.instrument(id, api_token)
Api.get_instrument(id, api_token)
end
|
.product(id, api_token) ⇒ Object
26
27
28
|
# File 'lib/amendia_remote.rb', line 26
def self.product(id, api_token)
Api.get_product(id, api_token)
end
|
.product_cat(id, api_token) ⇒ Object
34
35
36
|
# File 'lib/amendia_remote.rb', line 34
def self.product_cat(id, api_token)
Api.get_product_cat(id, api_token)
end
|
.products(category_id, api_token) ⇒ Object
30
31
32
|
# File 'lib/amendia_remote.rb', line 30
def self.products(category_id, api_token)
Api.get_products(category_id, api_token)
end
|
.registration(email, password, api_role, first_name = nil, last_name = nil, phone = nil, recommender = nil) ⇒ Object
18
19
20
|
# File 'lib/amendia_remote.rb', line 18
def self.registration(email, password, api_role, first_name=nil, last_name=nil, phone=nil, recommender=nil)
Api.registration(email, password, api_role, first_name, last_name, phone, recommender)
end
|