tito 0.2.4 → 0.2.5
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 +8 -3
- data/lib/tito/event.rb +4 -0
- data/lib/tito/request_proxy.rb +1 -1
- data/lib/tito/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcd1647933c5f7b71e9ec5601a7b024d4f5c4f66
|
4
|
+
data.tar.gz: 67d94877e346e7949653d82ebb85e4f4b07f11e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd36d87b6ec13a7795f36a1b686f0b1b3f73bb1a493c9880d504726cbc9b25c4242e787c1dd4b12abb911b0eda83a3b5d93583cb2556f45a14a63e4def18743b
|
7
|
+
data.tar.gz: 07ebb10e1ef22b8262817e167eb889757a42eda88dbb28039974d8a5d1a3d10f8dcc79245213d178a787072193ba48ac210c6095080aa6e8acf34e0a86b7c562
|
data/lib/tito/base.rb
CHANGED
@@ -58,13 +58,18 @@ module Tito
|
|
58
58
|
@resource_path ||= "#{resource_name}s"
|
59
59
|
end
|
60
60
|
|
61
|
-
def self.
|
62
|
-
[
|
61
|
+
def self.get_path(path, path_prefix: nil)
|
62
|
+
[path_prefix, self.resource_path, path].compact.join("/")
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.get_url(path, path_prefix: nil)
|
66
|
+
[Tito::Base.site, get_path(path, path_prefix: path_prefix)].join("/")
|
63
67
|
end
|
64
68
|
|
65
69
|
def self.get(path, params = {})
|
66
70
|
api_key = params.delete(:api_key)
|
67
|
-
|
71
|
+
path_prefix = params.delete(:path_prefix)
|
72
|
+
new http(api_key: api_key).get(get_url(path, path_prefix: path_prefix), params: params, ssl_context: ssl_context).parse[resource_name]
|
68
73
|
end
|
69
74
|
|
70
75
|
def self.all_path(path_prefix: nil)
|
data/lib/tito/event.rb
CHANGED
data/lib/tito/request_proxy.rb
CHANGED
data/lib/tito/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tito
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|