bungie_client 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d9e596bd5517cf5251a6143166bcbe7f2766218
4
- data.tar.gz: c23a7997ea88fbaa849690ab27f3eee8a4b3ccd7
3
+ metadata.gz: 1c0520384097c04845a8727368183f12c86ef09d
4
+ data.tar.gz: 137faa6ad7171bb62df90c1ef3a8832df373fb3b
5
5
  SHA512:
6
- metadata.gz: 373f0c3db1c20562c0454fbc02026c776b8066a206d07a8d5b530958276b430995aa442e363eecaf623b80bd5537f778beed6b81883e55e1b52d0de02c9cd155
7
- data.tar.gz: 6d3440350b42f774be43b7d957288adf1d5aa6e336efda40b34caa805c3f6eda5dfc658a3a9175a97a3c0786810af83b53472adf217524e91a66e9cb1b9e8e54
6
+ metadata.gz: 2ed2580548d4b347b39a64b5685ea5bc983bfb37aae736c2aefbbac8f45572ff1821fb202e8a78389efa2b290dd79083ecc0b9630657e649343145d2498b56f1
7
+ data.tar.gz: 94a551ad42ec1b8c3e24e635938ce935a5f72e8b43834a8ee1c7984c6d34dac5263e0d17a70b66acd0daff78ee0c4a745c276683359f7036f755b26bfe82097c
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.1.1 (2017-06-30)
4
+
5
+ ### Changes
6
+
7
+ * Client methods can allow to enter headers.
8
+
3
9
  ## 2.1.0 (2017-06-25)
4
10
 
5
11
  ### Fixes
@@ -62,19 +62,21 @@ class BungieClient::Client
62
62
  #
63
63
  # @param [String] url
64
64
  # @param [Hash] parameters for http-query
65
+ # @param [Hash] headers
65
66
  #
66
67
  # @return [Mash]
67
- def get(url, parameters = {})
68
- self.class.parse @conn.get(url, parameters).body rescue Hashie::Mash.new
68
+ def get(url, parameters = {}, headers = {})
69
+ self.class.parse @conn.get(url, parameters, headers).body rescue Hashie::Mash.new
69
70
  end
70
71
 
71
72
  # Post data to Bungie services
72
73
  #
73
74
  # @param [String] url
74
75
  # @param [Hash] query
76
+ # @param [Hash] headers
75
77
  #
76
78
  # @return [Mash]
77
79
  def post(url, query = {})
78
- self.class.parse @conn.post(url, query).body rescue Hashie::Mash.new
80
+ self.class.parse @conn.post(url, query, headers).body rescue Hashie::Mash.new
79
81
  end
80
82
  end
@@ -1,3 +1,3 @@
1
1
  module BungieClient
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
@@ -45,19 +45,20 @@ class BungieClient::Wrapper
45
45
  # @param [String] service name in snake case
46
46
  # @param [Hash] params service parameters
47
47
  # @param [Hash] options for client request (get/post)
48
+ # @param [Hash] headers
48
49
  #
49
50
  # @return [Hashie::Mash]
50
- def call_service(service, params = {}, options = {})
51
+ def call_service(service, params = {}, options = {}, headers = {})
51
52
  service = BungieClient::Service.new service rescue raise NoMethodError
52
53
 
53
54
  # change url
54
55
  url = self.fill_url service.endpoint, params
55
56
 
56
57
  # send request
57
- client.send service.type, url, options
58
+ client.send service.type, url, options, headers
58
59
  end
59
60
 
60
61
  def method_missing(*args)
61
- call_service args[0].to_s, args[1] || {}, args[2] || {}
62
+ call_service args[0].to_s, args[1] || {}, args[2] || {}, args[3] || {}
62
63
  end
63
64
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bungie_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Ruban
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-25 00:00:00.000000000 Z
11
+ date: 2017-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler