tito 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tito/base.rb +1 -1
- data/lib/tito/event.rb +2 -8
- data/lib/tito/eventable.rb +4 -4
- data/lib/tito/request_proxy.rb +2 -3
- data/lib/tito/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3486db93ff9a1566d1ec21840652f1eb6017dfc6
|
4
|
+
data.tar.gz: ba9e3c2b9eae3b78be7c305d95cee132499ac27c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 650e413c915d7df388fe421a2975c7fde313b574702e806f732ea31a97cdbf7e121ebd2bfc224462f7e7e942100aacb352d0b54d005d762d88d9c9cf71f81f2c
|
7
|
+
data.tar.gz: f9b8453fdaaee44818d1f8ae8bbf32527ef998a1cb816db804c25d845c859916d9fe61c5d6c1b421ccc461f2bfac56a3347e84d06ca485d9f88ca4aa81182192
|
data/lib/tito/base.rb
CHANGED
data/lib/tito/event.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Tito
|
2
2
|
class Event < Base
|
3
3
|
|
4
|
+
extend Eventable::ClassMethods
|
5
|
+
|
4
6
|
def path
|
5
7
|
"#{account_slug}/#{slug}"
|
6
8
|
end
|
@@ -13,14 +15,6 @@ module Tito
|
|
13
15
|
"#{account_slug}/events"
|
14
16
|
end
|
15
17
|
|
16
|
-
def self.for_account(url)
|
17
|
-
RequestProxy.new(proxy_class: self, proxy_path: url)
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.[](url)
|
21
|
-
self.for_account(url)
|
22
|
-
end
|
23
|
-
|
24
18
|
# property :title, type: :string
|
25
19
|
# property :slug, type: :string
|
26
20
|
# property :account_slug, type: :string
|
data/lib/tito/eventable.rb
CHANGED
@@ -24,12 +24,12 @@ module Tito
|
|
24
24
|
# end
|
25
25
|
|
26
26
|
module ClassMethods
|
27
|
-
def for_event(url)
|
28
|
-
RequestProxy.new(proxy_class: self, proxy_path: url)
|
27
|
+
def for_event(url, options = {})
|
28
|
+
RequestProxy.new(proxy_class: self, proxy_path: url, api_key: options.delete(:api_key))
|
29
29
|
end
|
30
30
|
|
31
|
-
def [](url)
|
32
|
-
self.for_event(url)
|
31
|
+
def [](url, options = {})
|
32
|
+
self.for_event(url, options)
|
33
33
|
end
|
34
34
|
|
35
35
|
# def event_id_from_params(params)
|
data/lib/tito/request_proxy.rb
CHANGED
@@ -10,9 +10,8 @@ module Tito
|
|
10
10
|
@api_key = api_key
|
11
11
|
end
|
12
12
|
|
13
|
-
def all
|
14
|
-
|
15
|
-
proxy_class.all(path_prefix: proxy_path, api_key: _api_key)
|
13
|
+
def all
|
14
|
+
proxy_class.all(path_prefix: proxy_path, api_key: api_key)
|
16
15
|
end
|
17
16
|
|
18
17
|
def new(attrs = {})
|
data/lib/tito/version.rb
CHANGED