layer-api 0.7.0 → 0.7.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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d503cddd9b7bede59c73026f87bd04a5fad389e1
4
- data.tar.gz: 107b52065cea9b15897c74ada0204e610714b336
3
+ metadata.gz: 9314e85db0d672e30d66549b3f08cf7dd55ea637
4
+ data.tar.gz: 2815efc1f06bf2dac8683d0c22a5a5c301123369
5
5
  SHA512:
6
- metadata.gz: 29142b474b962ef13c663705333c59a399df86d68d58599e03b2a62448bfd0456f402eec6ffeff158f7c46c270798d296a0c6c07b6f9e9c9d14bf7150e2fe4cd
7
- data.tar.gz: 19f209e30eaba1b1e610336c30b74ff4667b80d3af2b9beb26e4beaab560b019f0b274a9507ce69c5e3257a1449afbe22565173dfb5b2d2c2bdd1c327952ce21
6
+ metadata.gz: e1db3daa542ff619f5e42fb578a5ac0476e9b90517bb5ca676ff672c9733a6aba89a1b3f9c7408f29c653fb7d593a056b6e067e37fe85bfb68b3be06187291c8
7
+ data.tar.gz: 0a4048f4265842dff364c17d73b66ce0d6f9dcccce4b6a0f6731ca6be0a4d6b947638d6c68d5f4d7a58f15f97f34d2a823fd9b522b75075e78bba9544560e007
data/README.md CHANGED
@@ -56,6 +56,7 @@ platform = Layer::Platform::Client.new(api_token: "your_api_token", app_id: "you
56
56
  # => #<Layer::Platform::Client @api_token="...", @app_id="...">
57
57
  ```
58
58
  If you have `ENV['LAYER_API_TOKEN']` and `ENV['LAYER_APP_ID']` environment variables setup, they will be used by default and don't need to be included:
59
+
59
60
  ```ruby
60
61
  platform = Layer::Platform::Client.new
61
62
  # => #<Layer::Platform::Client @api_token="...", @app_id="...">
@@ -63,7 +63,12 @@ module Layer
63
63
  end
64
64
 
65
65
  def list(client, url, params = {})
66
- collection = client.get(url, body: params.to_json)
66
+ if params.any?
67
+ query = params.collect{ |key, value| "#{key}=#{value}" }.join("&")
68
+ url = "#{url}?#{query}"
69
+ end
70
+
71
+ collection = client.get(url)
67
72
 
68
73
  if collection.any?
69
74
  collection.map{ |resource| new(resource, client) }
@@ -1,5 +1,5 @@
1
1
  module Layer
2
2
  module Api
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: layer-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Kelly
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
11
+ date: 2016-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler