Module: Amiando
- Defined in:
- lib/amiando.rb,
lib/amiando/user.rb,
lib/amiando/event.rb,
lib/amiando/result.rb,
lib/amiando/boolean.rb,
lib/amiando/partner.rb,
lib/amiando/request.rb,
lib/amiando/version.rb,
lib/amiando/api_key.rb,
lib/amiando/autorun.rb,
lib/amiando/resource.rb,
lib/amiando/ticket_shop.rb,
lib/amiando/payment_type.rb,
lib/amiando/ticket_category.rb
Defined Under Namespace
Modules: Autorun, Error
Classes: ApiKey, Boolean, Event, Partner, PaymentType, Request, Resource, Result, TicketCategory, TicketShop, User
Constant Summary
- URL =
'https://amiando.com'
- TEST_URL =
'https://test.amiando.com'
- VERSION =
"0.3.0"
Class Attribute Summary (collapse)
Class Method Summary
(collapse)
Class Attribute Details
+ (Object) api_key
Returns the value of attribute api_key
31
32
33
|
# File 'lib/amiando.rb', line 31
def api_key
@api_key
end
|
+ (Object) autorun
Returns the value of attribute autorun
34
35
36
|
# File 'lib/amiando.rb', line 34
def autorun
@autorun
end
|
+ (Object) logger
Returns the value of attribute logger
32
33
34
|
# File 'lib/amiando.rb', line 32
def logger
@logger
end
|
+ (Object) verbose
Returns the value of attribute verbose
33
34
35
|
# File 'lib/amiando.rb', line 33
def verbose
@verbose
end
|
Class Method Details
+ (Object) base_url
47
48
49
|
# File 'lib/amiando.rb', line 47
def base_url
@production ? URL : TEST_URL
end
|
+ (Object) development!
43
44
45
|
# File 'lib/amiando.rb', line 43
def development!
@production = false
end
|
+ (Object) hydra
62
63
64
|
# File 'lib/amiando.rb', line 62
def hydra
@hydra ||= Typhoeus::Hydra.new
end
|
+ (Object) production!
39
40
41
|
# File 'lib/amiando.rb', line 39
def production!
@production = true
end
|
+ (Object) requests
51
52
53
|
# File 'lib/amiando.rb', line 51
def requests
@requests ||= []
end
|
+ (Object) run
55
56
57
58
59
60
|
# File 'lib/amiando.rb', line 55
def run
requests.each{ |request| hydra.queue(request) }
hydra.run
ensure
@requests = []
end
|
+ (Object) with_key(key)
66
67
68
69
70
71
72
|
# File 'lib/amiando.rb', line 66
def with_key(key)
old_key = Amiando.api_key
Amiando.api_key = key
yield
ensure
Amiando.api_key = old_key
end
|