unchained 0.0.2 → 0.0.3

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a4a2a58f8403c47f9d8f1f45cef8df674462f7f
4
- data.tar.gz: eecb1fc22ce12a1150efdfb27f3ce83df34cfe18
3
+ metadata.gz: ba2806b92130374d5ab95524005bfad67680e43f
4
+ data.tar.gz: 4ddb6743d0a2e065aa990807e67e294eb52fe36f
5
5
  SHA512:
6
- metadata.gz: 4473fade28915ab541388879834f05d92c7bca0694d5eb3d6a12d9d0f74e2c98d0fd1b408a08ec56125b5ecdb667a4f2c3fc11e2145a9653c9cf6b1fee548d9f
7
- data.tar.gz: 4889219e809cf2a40f5985c8e8fd7aa8f46d9476118ccf5f42d0624b2fe1f30fadeea69b8e1913aaa5bb2f636c1ff375bdcc815a9f1a4b69557536eeff52af4e
6
+ metadata.gz: a3cb7b7bfd6e3ec8930e329d5df0d8d5aa2c6ce8923416c4a2945088392af137724437aec98ecf3508fe24759fed5b2b6e61785676158a2a29041c3b690c93da
7
+ data.tar.gz: 3deae7d259548b9f92412d5256ad69fb14480e83622cb5c015972347407bdbe5ab6b64a5174572b794785b2dc1cf071f9bb5efde4178530c2e164c08fb6e9c8a
data/README.md CHANGED
@@ -29,7 +29,6 @@ Unchained API:
29
29
 
30
30
  ### TODO
31
31
 
32
- - Tests
33
32
  - Implement `loginToken` endpoints
34
33
 
35
34
  ### License
@@ -14,8 +14,11 @@ require_relative 'client/servers'
14
14
  module Unchained
15
15
  class Client
16
16
  attr_accessor(*Unchained::Configuration::KEYS)
17
+ attr_reader :cache
17
18
 
18
19
  def initialize(opts={})
20
+ @cache = {}
21
+
19
22
  config = Unchained.configuration.merge(opts)
20
23
  Unchained::Configuration::KEYS.each do |key|
21
24
  send("#{key}=", config[key])
@@ -26,6 +29,11 @@ module Unchained
26
29
  'http://api.camelotunchained.com/v1'
27
30
  end
28
31
 
32
+ # Helper method to bust the cache.
33
+ def clear_cache!
34
+ @cache = {}
35
+ end
36
+
29
37
  include Unchained::Request
30
38
 
31
39
  # RESOURCES
@@ -6,13 +6,21 @@ module Unchained
6
6
  include Unchained::Client::Mixins::Resource
7
7
 
8
8
  attribute :description, String
9
- attribute :faction, Integer
9
+ attribute :faction, Integer, expand: :faction
10
10
  attribute :id, Integer
11
11
  attribute :name, String
12
12
  end
13
13
 
14
14
  def archetypes(opts={})
15
- get_resources("#{base_url}/gamedata/archetypes", Archetype, opts)
15
+ @cache[:archetypes] ||= get_resources(
16
+ "#{base_url}/gamedata/archetypes",
17
+ Archetype,
18
+ opts,
19
+ )
20
+ end
21
+
22
+ def archetype(id, opts={})
23
+ archetypes(opts).find {|at| at.id == id}
16
24
  end
17
25
 
18
26
  end
@@ -8,7 +8,7 @@ module Unchained
8
8
  attribute :base_value, Float, json: 'baseValue'
9
9
  attribute :derived_from, String, json: 'derivedFrom'
10
10
  attribute :description, String
11
- attribute :max_or_multipler, Float, json: 'maxOrMultipler'
11
+ attribute :max_or_multiplier, Float, json: 'maxOrMultipler'
12
12
  attribute :name, String
13
13
  attribute :type, Integer
14
14
  attribute :units, String
@@ -17,17 +17,25 @@ module Unchained
17
17
  class AttributeOffset
18
18
  include Unchained::Client::Mixins::Resource
19
19
 
20
- attribute :race, Integer
20
+ attribute :race, Integer, expand: :race
21
21
  attribute :gender, Integer
22
22
  attribute :offsets, Hash, json: 'attributeOffsets'
23
23
  end
24
24
 
25
25
  def attributes(shard, opts={})
26
- get_resources("#{base_url}/gamedata/attributes/#{shard}", AttributeInfo, opts)
26
+ @cache[:attributes] ||= get_resources(
27
+ "#{base_url}/gamedata/attributes/#{shard}",
28
+ AttributeInfo,
29
+ opts,
30
+ )
27
31
  end
28
32
 
29
33
  def attribute_offsets(shard, opts={})
30
- get_resources("#{base_url}/gamedata/attributeoffsets/#{shard}", AttributeOffset, opts)
34
+ @cache[:attribute_offsets] ||= get_resources(
35
+ "#{base_url}/gamedata/attributeoffsets/#{shard}",
36
+ AttributeOffset,
37
+ opts,
38
+ )
31
39
  end
32
40
 
33
41
  end
@@ -12,7 +12,15 @@ module Unchained
12
12
  end
13
13
 
14
14
  def factions(opts={})
15
- get_resources("#{base_url}/gamedata/factions", Faction, opts)
15
+ @cache[:factions] ||= get_resources(
16
+ "#{base_url}/gamedata/factions",
17
+ Faction,
18
+ opts,
19
+ )
20
+ end
21
+
22
+ def faction(id, opts={})
23
+ factions(opts).find {|f| f.id == id}
16
24
  end
17
25
 
18
26
  end
@@ -13,6 +13,7 @@ module Unchained
13
13
  # attribute :id, String
14
14
  # attribute :name, String
15
15
  # attribute :members, Integer, json: 'numberOfMembers'
16
+ # attribute :faction, Integer, expand: :faction
16
17
  # end
17
18
  #
18
19
 
@@ -48,6 +49,11 @@ module Unchained
48
49
  def allow_nil?
49
50
  @opts.fetch(:allow_nil, false)
50
51
  end
52
+
53
+ # Some of the attributes can be expanded.
54
+ def expand_method
55
+ @opts.fetch(:expand, nil)
56
+ end
51
57
  end
52
58
 
53
59
  def self.included(base)
@@ -82,7 +88,7 @@ module Unchained
82
88
  # instance.
83
89
  #
84
90
  # Returns an instance of the class that uses this mixin.
85
- def from_json(json)
91
+ def from_hash(json, client: nil)
86
92
  res = self.new
87
93
 
88
94
  json.each do |k, v|
@@ -108,6 +114,12 @@ module Unchained
108
114
  value = v
109
115
  end
110
116
 
117
+ # Lurk, there is probably a better way to do this.
118
+ if !attr.expand_method.nil?
119
+ client ||= Unchained::Client.new
120
+ value = client.send(attr.expand_method, value)
121
+ end
122
+
111
123
  res.send("#{attr.name}=", value)
112
124
  end
113
125
 
@@ -22,11 +22,19 @@ module Unchained
22
22
  end
23
23
 
24
24
  def patcher_hero_contents(opts={})
25
- get_resources("#{base_url}/patcherherocontent", HeroContent, opts)
25
+ @cache[:patcher_hero_contents] ||= get_resources(
26
+ "#{base_url}/patcherherocontent",
27
+ HeroContent,
28
+ opts,
29
+ )
26
30
  end
27
31
 
28
32
  def patcher_alerts(opts={})
29
- get_resources("#{base_url}/patcheralerts", Alert, opts)
33
+ @cache[:patcher_alerts] ||= get_resources(
34
+ "#{base_url}/patcheralerts",
35
+ Alert,
36
+ opts,
37
+ )
30
38
  end
31
39
 
32
40
  end
@@ -6,13 +6,21 @@ module Unchained
6
6
  include Unchained::Client::Mixins::Resource
7
7
 
8
8
  attribute :description, String
9
- attribute :faction, Integer
9
+ attribute :faction, Integer, expand: :faction
10
10
  attribute :id, Integer
11
11
  attribute :name, String
12
12
  end
13
13
 
14
14
  def races(opts={})
15
- get_resources("#{base_url}/gamedata/races", Race, opts)
15
+ @cache[:races] ||= get_resources(
16
+ "#{base_url}/gamedata/races",
17
+ Race,
18
+ opts,
19
+ )
20
+ end
21
+
22
+ def race(id, opts={})
23
+ races(opts).find {|r| r.id == id}
16
24
  end
17
25
 
18
26
  end
@@ -15,8 +15,15 @@ module Unchained
15
15
 
16
16
  def servers(opts={}, channel: nil)
17
17
  url = "#{base_url}/servers"
18
- url += "/#{channel}" unless channel.nil?
19
- get_resources(url, Server, opts)
18
+
19
+ if channel.nil?
20
+ key = :channels
21
+ else
22
+ key = :"channels_#{channel}"
23
+ url += "/#{channel}"
24
+ end
25
+
26
+ @cache[key] ||= get_resources(url, Server, opts)
20
27
  end
21
28
 
22
29
  end
@@ -3,6 +3,11 @@ require 'rest-client'
3
3
  module Unchained
4
4
  module Request
5
5
 
6
+ # Use RestClient to actually make the request to the API. If the response
7
+ # is a 200 (success), we will parse the response as JSON and return it. If
8
+ # the response is a known error (i.e. a 404), we will raise a custom
9
+ # Unchained error (found in error.rb). If the response is an unkonwn error,
10
+ # we will return it exactly as we found it.
6
11
  def get(url, params={})
7
12
  RestClient.get(url, build_params(params)) do |resp, req, res, &block|
8
13
  case resp.code
@@ -16,13 +21,20 @@ module Unchained
16
21
  end
17
22
  end
18
23
 
24
+ # If an API endpoint returns a single resource, not an Array of resources,
25
+ # we want to use this.
26
+ #
27
+ # Returns an instance of `resource_class`.
19
28
  def get_resource(url, resource_class, params={})
20
- resource_class.from_json(get(url, params))
29
+ resource_class.from_hash(get(url, params), client: self)
21
30
  end
22
31
 
32
+ # If an API endpoint returns an Array of resources, we want to use this.
33
+ #
34
+ # Returns an array of `resource_classes`.
23
35
  def get_resources(url, resource_class, params={})
24
36
  get(url, params).map do |result|
25
- resource_class.from_json(result)
37
+ resource_class.from_hash(result, client: self)
26
38
  end
27
39
  end
28
40
 
@@ -1,3 +1,3 @@
1
1
  module Unchained
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
@@ -27,7 +27,7 @@ http_interactions:
27
27
  Server:
28
28
  - Microsoft-HTTPAPI/2.0
29
29
  Date:
30
- - Fri, 22 Apr 2016 15:40:31 GMT
30
+ - Fri, 22 Apr 2016 23:09:20 GMT
31
31
  body:
32
32
  encoding: ASCII-8BIT
33
33
  string: !binary |-
@@ -47,5 +47,383 @@ http_interactions:
47
47
  ImRlc2NyaXB0aW9uIjoiU291bmRzIGNvbGQiLCJmYWN0aW9uIjoyLCJpZCI6
48
48
  MTUsIm5hbWUiOiJXaW50ZXIncyBTaGFkb3cifV0=
49
49
  http_version:
50
- recorded_at: Fri, 22 Apr 2016 15:40:52 GMT
50
+ recorded_at: Fri, 22 Apr 2016 23:09:42 GMT
51
+ - request:
52
+ method: get
53
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
54
+ body:
55
+ encoding: US-ASCII
56
+ string: ''
57
+ headers:
58
+ Accept:
59
+ - application/json
60
+ Accept-Encoding:
61
+ - gzip, deflate
62
+ Logintoken:
63
+ - ''
64
+ User-Agent:
65
+ - Ruby
66
+ response:
67
+ status:
68
+ code: 200
69
+ message: OK
70
+ headers:
71
+ Content-Length:
72
+ - '362'
73
+ Content-Type:
74
+ - application/json; charset=utf-8
75
+ Server:
76
+ - Microsoft-HTTPAPI/2.0
77
+ Date:
78
+ - Fri, 22 Apr 2016 23:09:20 GMT
79
+ body:
80
+ encoding: ASCII-8BIT
81
+ string: !binary |-
82
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
83
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
84
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
85
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
86
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
87
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
88
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
89
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
90
+ fV0=
91
+ http_version:
92
+ recorded_at: Fri, 22 Apr 2016 23:09:43 GMT
93
+ - request:
94
+ method: get
95
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
96
+ body:
97
+ encoding: US-ASCII
98
+ string: ''
99
+ headers:
100
+ Accept:
101
+ - application/json
102
+ Accept-Encoding:
103
+ - gzip, deflate
104
+ Logintoken:
105
+ - ''
106
+ User-Agent:
107
+ - Ruby
108
+ response:
109
+ status:
110
+ code: 200
111
+ message: OK
112
+ headers:
113
+ Content-Length:
114
+ - '362'
115
+ Content-Type:
116
+ - application/json; charset=utf-8
117
+ Server:
118
+ - Microsoft-HTTPAPI/2.0
119
+ Date:
120
+ - Fri, 22 Apr 2016 23:09:20 GMT
121
+ body:
122
+ encoding: ASCII-8BIT
123
+ string: !binary |-
124
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
125
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
126
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
127
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
128
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
129
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
130
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
131
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
132
+ fV0=
133
+ http_version:
134
+ recorded_at: Fri, 22 Apr 2016 23:09:43 GMT
135
+ - request:
136
+ method: get
137
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
138
+ body:
139
+ encoding: US-ASCII
140
+ string: ''
141
+ headers:
142
+ Accept:
143
+ - application/json
144
+ Accept-Encoding:
145
+ - gzip, deflate
146
+ Logintoken:
147
+ - ''
148
+ User-Agent:
149
+ - Ruby
150
+ response:
151
+ status:
152
+ code: 200
153
+ message: OK
154
+ headers:
155
+ Content-Length:
156
+ - '362'
157
+ Content-Type:
158
+ - application/json; charset=utf-8
159
+ Server:
160
+ - Microsoft-HTTPAPI/2.0
161
+ Date:
162
+ - Fri, 22 Apr 2016 23:09:20 GMT
163
+ body:
164
+ encoding: ASCII-8BIT
165
+ string: !binary |-
166
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
167
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
168
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
169
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
170
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
171
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
172
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
173
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
174
+ fV0=
175
+ http_version:
176
+ recorded_at: Fri, 22 Apr 2016 23:09:43 GMT
177
+ - request:
178
+ method: get
179
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
180
+ body:
181
+ encoding: US-ASCII
182
+ string: ''
183
+ headers:
184
+ Accept:
185
+ - application/json
186
+ Accept-Encoding:
187
+ - gzip, deflate
188
+ Logintoken:
189
+ - ''
190
+ User-Agent:
191
+ - Ruby
192
+ response:
193
+ status:
194
+ code: 200
195
+ message: OK
196
+ headers:
197
+ Content-Length:
198
+ - '362'
199
+ Content-Type:
200
+ - application/json; charset=utf-8
201
+ Server:
202
+ - Microsoft-HTTPAPI/2.0
203
+ Date:
204
+ - Fri, 22 Apr 2016 23:09:21 GMT
205
+ body:
206
+ encoding: ASCII-8BIT
207
+ string: !binary |-
208
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
209
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
210
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
211
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
212
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
213
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
214
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
215
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
216
+ fV0=
217
+ http_version:
218
+ recorded_at: Fri, 22 Apr 2016 23:09:43 GMT
219
+ - request:
220
+ method: get
221
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
222
+ body:
223
+ encoding: US-ASCII
224
+ string: ''
225
+ headers:
226
+ Accept:
227
+ - application/json
228
+ Accept-Encoding:
229
+ - gzip, deflate
230
+ Logintoken:
231
+ - ''
232
+ User-Agent:
233
+ - Ruby
234
+ response:
235
+ status:
236
+ code: 200
237
+ message: OK
238
+ headers:
239
+ Content-Length:
240
+ - '362'
241
+ Content-Type:
242
+ - application/json; charset=utf-8
243
+ Server:
244
+ - Microsoft-HTTPAPI/2.0
245
+ Date:
246
+ - Fri, 22 Apr 2016 23:09:21 GMT
247
+ body:
248
+ encoding: ASCII-8BIT
249
+ string: !binary |-
250
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
251
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
252
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
253
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
254
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
255
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
256
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
257
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
258
+ fV0=
259
+ http_version:
260
+ recorded_at: Fri, 22 Apr 2016 23:09:43 GMT
261
+ - request:
262
+ method: get
263
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
264
+ body:
265
+ encoding: US-ASCII
266
+ string: ''
267
+ headers:
268
+ Accept:
269
+ - application/json
270
+ Accept-Encoding:
271
+ - gzip, deflate
272
+ Logintoken:
273
+ - ''
274
+ User-Agent:
275
+ - Ruby
276
+ response:
277
+ status:
278
+ code: 200
279
+ message: OK
280
+ headers:
281
+ Content-Length:
282
+ - '362'
283
+ Content-Type:
284
+ - application/json; charset=utf-8
285
+ Server:
286
+ - Microsoft-HTTPAPI/2.0
287
+ Date:
288
+ - Fri, 22 Apr 2016 23:09:21 GMT
289
+ body:
290
+ encoding: ASCII-8BIT
291
+ string: !binary |-
292
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
293
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
294
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
295
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
296
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
297
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
298
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
299
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
300
+ fV0=
301
+ http_version:
302
+ recorded_at: Fri, 22 Apr 2016 23:09:43 GMT
303
+ - request:
304
+ method: get
305
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
306
+ body:
307
+ encoding: US-ASCII
308
+ string: ''
309
+ headers:
310
+ Accept:
311
+ - application/json
312
+ Accept-Encoding:
313
+ - gzip, deflate
314
+ Logintoken:
315
+ - ''
316
+ User-Agent:
317
+ - Ruby
318
+ response:
319
+ status:
320
+ code: 200
321
+ message: OK
322
+ headers:
323
+ Content-Length:
324
+ - '362'
325
+ Content-Type:
326
+ - application/json; charset=utf-8
327
+ Server:
328
+ - Microsoft-HTTPAPI/2.0
329
+ Date:
330
+ - Fri, 22 Apr 2016 23:09:21 GMT
331
+ body:
332
+ encoding: ASCII-8BIT
333
+ string: !binary |-
334
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
335
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
336
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
337
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
338
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
339
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
340
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
341
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
342
+ fV0=
343
+ http_version:
344
+ recorded_at: Fri, 22 Apr 2016 23:09:43 GMT
345
+ - request:
346
+ method: get
347
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
348
+ body:
349
+ encoding: US-ASCII
350
+ string: ''
351
+ headers:
352
+ Accept:
353
+ - application/json
354
+ Accept-Encoding:
355
+ - gzip, deflate
356
+ Logintoken:
357
+ - ''
358
+ User-Agent:
359
+ - Ruby
360
+ response:
361
+ status:
362
+ code: 200
363
+ message: OK
364
+ headers:
365
+ Content-Length:
366
+ - '362'
367
+ Content-Type:
368
+ - application/json; charset=utf-8
369
+ Server:
370
+ - Microsoft-HTTPAPI/2.0
371
+ Date:
372
+ - Fri, 22 Apr 2016 23:09:21 GMT
373
+ body:
374
+ encoding: ASCII-8BIT
375
+ string: !binary |-
376
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
377
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
378
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
379
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
380
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
381
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
382
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
383
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
384
+ fV0=
385
+ http_version:
386
+ recorded_at: Fri, 22 Apr 2016 23:09:43 GMT
387
+ - request:
388
+ method: get
389
+ uri: http://api.camelotunchained.com/v1/gamedata/factions
390
+ body:
391
+ encoding: US-ASCII
392
+ string: ''
393
+ headers:
394
+ Accept:
395
+ - application/json
396
+ Accept-Encoding:
397
+ - gzip, deflate
398
+ Logintoken:
399
+ - ''
400
+ User-Agent:
401
+ - Ruby
402
+ response:
403
+ status:
404
+ code: 200
405
+ message: OK
406
+ headers:
407
+ Content-Length:
408
+ - '362'
409
+ Content-Type:
410
+ - application/json; charset=utf-8
411
+ Server:
412
+ - Microsoft-HTTPAPI/2.0
413
+ Date:
414
+ - Fri, 22 Apr 2016 23:09:21 GMT
415
+ body:
416
+ encoding: ASCII-8BIT
417
+ string: !binary |-
418
+ W3siZGVzY3JpcHRpb24iOiJObyBGYWN0aW9uIG9yIEFsbCBGYWN0aW9ucyAo
419
+ TlBDIE9ubHkpIiwiaWQiOjAsIm5hbWUiOiJGYWN0aW9ubGVzcyIsInNob3J0
420
+ TmFtZSI6IkZhY3Rpb25sZXNzIn0seyJkZXNjcmlwdGlvbiI6IlRoZSBUdWF0
421
+ aGEgRMOpIERhbmFubiIsImlkIjoxLCJuYW1lIjoiVHVhdGhhIETDqSBEYW5h
422
+ bm4iLCJzaG9ydE5hbWUiOiJUREQifSx7ImRlc2NyaXB0aW9uIjoiVGhlIFZp
423
+ a2luZ3MiLCJpZCI6MiwibmFtZSI6IlZpa2luZ3MiLCJzaG9ydE5hbWUiOiJW
424
+ aWtpbmcifSx7ImRlc2NyaXB0aW9uIjoiVGhlIEFydGh1cmlhbnMiLCJpZCI6
425
+ MywibmFtZSI6IkFydGh1cmlhbnMiLCJzaG9ydE5hbWUiOiJBcnRodXJpYW4i
426
+ fV0=
427
+ http_version:
428
+ recorded_at: Fri, 22 Apr 2016 23:09:44 GMT
51
429
  recorded_with: VCR 3.0.1