gogokit 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWQzMmUzYzU1MDVmZGUxY2M4ZjI1Njk4MDE2MWM5MzIwZDYyZGM2NA==
4
+ ODI1MWRmMzc2N2UxNDc5MTAxODlkMTA2YmMwNjgwNzFkOWE4OTljNg==
5
5
  data.tar.gz: !binary |-
6
- MDMxOTMzZWFhYTcwMmViYmIxZTNmMTQ0MGY0MWU0MTFkMWQ5ZWRlYw==
6
+ ZDQ2MTdkMTFiN2Y2NzkzZThjMjY2NDcyMTNkMTU1YWJjZGVkYzM0Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2RlN2YzMDk2NzdmNDdlMzczYzJlMzkzYzI3MDA2NTliMzQ2YjJmNDMxMTlm
10
- OGVhMTJjNGMyNWVlOGUwZDRlYTUzZjVhMzA0MjJhMWJjNDBiNDkyNGI3ZDZm
11
- ODRlMGU5ZmFjMjU1NTcwM2I2MWExODc1Yzk5ZDA3OTBiNDM5YmQ=
9
+ NGY4MWI1N2QxOGQ0NDdhMTI4ZmQ0MzFjNGIyOTI3MGYxNGZmZTAxZTVmOTM0
10
+ NWFkMGIxN2ZkY2IzNGMwNzViYmRmM2FiMDdkNzQ2Y2RlMzQ0N2YzMDBkNjU1
11
+ MWYyMzk3N2ZlMDA2Mzk5ZTBhOTRkN2VkYTUwMDYzYjViMzk5NWQ=
12
12
  data.tar.gz: !binary |-
13
- YzVjM2UzNWM4MWRmNWIyOGVlZGQ5YTZmYzFmYjcyNTAzMWY1YjExNzZlYjhm
14
- ZmMxNjVhOTcyYzdkNzFiMjhhOTU0MTNiOWFlY2U4MjNlNGEwMjk5YmNlMTJh
15
- NmE4NzMzOTJmMjlkMzE1N2M5Y2YyNzYxNTIxNjQ4MTJmZDcxMzk=
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', '~> 0.3'
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
- ## Configuration and defaults
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
- ### Configuring client instances
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
- ### Using ENV variables
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.3'
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 < OpenStruct
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 :currency
19
+ property :currency_code
17
20
  property :display
18
21
  end
19
22
  end
@@ -5,11 +5,11 @@ module GogoKit
5
5
 
6
6
  # Current minor release.
7
7
  # @return [Integer]
8
- MINOR = 3
8
+ MINOR = 4
9
9
 
10
10
  # Current patch level.
11
11
  # @return [Integer]
12
- PATCH = 0
12
+ PATCH = 1
13
13
 
14
14
  # Full release version.
15
15
  # @return [String]
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.3.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-07-29 00:00:00.000000000 Z
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