gogokit 0.3.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +16 -5
- data/gogokit.gemspec +1 -0
- data/lib/gogokit/money.rb +5 -2
- data/lib/gogokit/version.rb +2 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODI1MWRmMzc2N2UxNDc5MTAxODlkMTA2YmMwNjgwNzFkOWE4OTljNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDQ2MTdkMTFiN2Y2NzkzZThjMjY2NDcyMTNkMTU1YWJjZGVkYzM0Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGY4MWI1N2QxOGQ0NDdhMTI4ZmQ0MzFjNGIyOTI3MGYxNGZmZTAxZTVmOTM0
|
10
|
+
NWFkMGIxN2ZkY2IzNGMwNzViYmRmM2FiMDdkNzQ2Y2RlMzQ0N2YzMDBkNjU1
|
11
|
+
MWYyMzk3N2ZlMDA2Mzk5ZTBhOTRkN2VkYTUwMDYzYjViMzk5NWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmZmMmE2MzdiMzQ5NzY3YWYxNGI1M2I1MTA3M2FhMzc1YTRkOGMyODRhNmZh
|
14
|
+
M2JiOTQ2ZmEyY2I5MTk4MmUwMTdlMGI2NTBkYWJjYWU5ZTVjOTljMjY3ZWYx
|
15
|
+
YzNiMjgyODU3NDkwM2JhYmRmYTEzNDUwODVlNGJmZmQyOWYxNjU=
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ Install via Ruby gems
|
|
32
32
|
|
33
33
|
... or add to your Gemfile
|
34
34
|
|
35
|
-
gem 'gogokit'
|
35
|
+
gem 'gogokit'
|
36
36
|
|
37
37
|
|
38
38
|
## Usage
|
@@ -61,12 +61,23 @@ search_results = client.search 'FC Barcelona tickets'
|
|
61
61
|
genres = client.get_genres
|
62
62
|
```
|
63
63
|
|
64
|
+
### Request Headers, Query Parameters and Body
|
64
65
|
|
65
|
-
|
66
|
+
The last parameter of all GogoKit::Client methods is an `options` Hash that
|
67
|
+
supports `headers`, `params` and `body` keys for specifying request headers,
|
68
|
+
query parameters and body respectively.
|
69
|
+
|
70
|
+
```ruby
|
71
|
+
events = client.get_events_by_category(CATEGORY_ID,
|
72
|
+
headers: {'Accept-Language' => 'JA'},
|
73
|
+
params: {'sort' => 'name'})
|
74
|
+
```
|
75
|
+
|
76
|
+
### Configuration and defaults
|
66
77
|
|
67
78
|
GogoKit::Client accepts a range of options when creating a new client instance.
|
68
79
|
|
69
|
-
|
80
|
+
#### Configuring client instances
|
70
81
|
|
71
82
|
Every writeable attribute in {GogoKit::Configuration} can be set one at a time
|
72
83
|
|
@@ -85,7 +96,7 @@ client = GogoKit::Client.new do |config|
|
|
85
96
|
end
|
86
97
|
```
|
87
98
|
|
88
|
-
|
99
|
+
#### Using ENV variables
|
89
100
|
|
90
101
|
Default configuration values are specified in {GogoKit::Default}. Many
|
91
102
|
attributes will look for a default value from the ENV before returning GogoKit's
|
@@ -158,4 +169,4 @@ introduced with new major versions. As a result of this policy, you can (and
|
|
158
169
|
should) specify a dependency on this gem using the [Pessimistic Version
|
159
170
|
Constraint][pvc] with two digits of precision. For example:
|
160
171
|
|
161
|
-
spec.add_dependency 'gogokit', '~> 0.
|
172
|
+
spec.add_dependency 'gogokit', '~> 0.4'
|
data/gogokit.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency 'faraday', '~> 0.9.1'
|
22
22
|
spec.add_dependency 'addressable', '~> 2.3'
|
23
23
|
spec.add_dependency 'roar', '~> 1.0'
|
24
|
+
spec.add_dependency 'multi_json', '~> 1.11'
|
24
25
|
spec.add_dependency 'virtus', '~> 1.0'
|
25
26
|
|
26
27
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
data/lib/gogokit/money.rb
CHANGED
@@ -6,14 +6,17 @@ module GogoKit
|
|
6
6
|
# amounts.
|
7
7
|
#
|
8
8
|
# @see http://viagogo.github.io/developer.viagogo.net/#money
|
9
|
-
class Money
|
9
|
+
class Money
|
10
|
+
attr_accessor :amount,
|
11
|
+
:currency_code,
|
12
|
+
:display
|
10
13
|
end
|
11
14
|
|
12
15
|
module MoneyRepresenter
|
13
16
|
include Representable::JSON
|
14
17
|
|
15
18
|
property :amount
|
16
|
-
property :
|
19
|
+
property :currency_code
|
17
20
|
property :display
|
18
21
|
end
|
19
22
|
end
|
data/lib/gogokit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gogokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- viagogo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: multi_json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.11'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.11'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: virtus
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|