bungie_client 1.1.0 → 1.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: 2e72c44c0ee045ada431e0375c8224a5950399de
4
- data.tar.gz: 881799831b0c3b516246ac2b4e79eaa3b7817874
3
+ metadata.gz: 2ef0e5201bdf1ec3f9149f8d9977291c17512168
4
+ data.tar.gz: ec909aceffbe5ec6cfd97ed4153454b04c16009e
5
5
  SHA512:
6
- metadata.gz: ca54892aeeb1ca4e31e06e5f21662ef0af903ad0c1b7e0306f9aa74a60fcedea2e9392ddbc551ff225c5c1646f15d97484926aef197cf9c0b601d4f8b9bb9162
7
- data.tar.gz: c78371d1124a965edc68a385f5e7f5af79414814a182f0ee7cf91d57588171264cc4e86648b1362b4a13ca63e3bae7b5f0fef1a43d258d682fb25544acffd1b2
6
+ metadata.gz: 9b63eaff59ded42a1d5def794d6fb4fdc84e8f5801df18b99def97da385ca6d584ff9ff8f613f63f9975b4905cd34cea52d5ec4bb86484dc5333606264ebdc52
7
+ data.tar.gz: 8511aa7fdbc9e686c2bf89d2f2c488f18bf603541e12cfdf6233e151b73c7b9bc6ae26ae7a9888795390d89006397f528beac3c2ac42d6ff7972cf8fbf844be9
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # Bungie Client
5
5
 
6
- This gem makes possible to use [Bungie API](http://destinydevs.github.io/BungieNetPlatform/docs/Endpoints) (and Destiny API too) with authentication if necessary.
6
+ This gem makes possible to use [Bungie API](http://destinydevs.github.io/BungieNetPlatform/docs/Endpoints) (and Destiny API too).
7
7
  It can be useful, if you decide create your application for [Destiny Game](https://www.bungie.net/en/pub/AboutDestiny).
8
8
 
9
9
  ## Installation
@@ -24,16 +24,13 @@ This gem contains two main classes: **BungieClient::Client**, **BungieClient::Wr
24
24
 
25
25
  ### BungieClient::Client
26
26
 
27
- It's main class that makes possible to send any requests to Bungie and connects auth module in one client. It needs for public/private requests to Bungie API.
27
+ It's main class that makes possible to send any requests to Bungie.
28
28
 
29
29
  **For this you should initialize your client for the next example:**
30
30
 
31
31
  ~~~~ruby
32
32
  @client = BungieClient::Client.new(
33
- :api_key => 'YOUR_API_KEY',
34
- :username => 'test@test.test',
35
- :password => '1234',
36
- :type => 'psn'
33
+ :api_key => 'YOUR_API_KEY'
37
34
  )
38
35
  ~~~~
39
36
 
@@ -49,12 +46,10 @@ It's main class that makes possible to send any requests to Bungie and connects
49
46
 
50
47
  #### How it initialized:
51
48
 
52
- * Before working the client tries to authenticate in bungie, if you pass `username` and `password` option with account data, and after it uses cookies for next requests.
53
49
  * If you want to store your cookies in any place you can define they with `cookies` option without authentication.
50
+ * If you want to use private API, you must get [Authorization token](https://www.bungie.net/en/Help/Article/45481) from Bungie Oauth2 and set `token` option.
54
51
  * After this operations your client is done for usage.
55
52
 
56
- > The authentication optional for client, it requires only `api_key` in your hash for initializer.
57
-
58
53
  #### Sending requests
59
54
 
60
55
  **Now you can send requests, e.g. for finding user information and getting his profile:**
@@ -67,20 +62,6 @@ It's main class that makes possible to send any requests to Bungie and connects
67
62
 
68
63
  * For requests optimization you should use any caching of your requests.
69
64
 
70
- ### BungieClient::Auth
71
-
72
- This module has two methods: authentication in bungie.net by *PSN* or *Xbox Live* and checking this authentication with cookies that was returned early.
73
-
74
- **Example:**
75
-
76
- ~~~~ ruby
77
- # Authenticate and get bungie cookies
78
- jar = BungieClient::Auth.auth 'example@mail.com', 'example', 'psn'
79
-
80
- # Check authentication
81
- p BungieClient::Auth.auth_possible? (jar || [])
82
- ~~~~
83
-
84
65
  ### BungieClient::Wrappers::Default
85
66
 
86
67
  If you don't like long code as for me you should use **Wrappers**. It's classes can call api services with dynamically generated methods with snake case like name services. Also it can change url parameters to needed values and in inherits of this class it can be do automatically.
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Dmitry Ruban"]
9
9
  spec.email = ["dkruban@gmail.com"]
10
10
 
11
- spec.summary = "This gem makes possible to use Bungie API (and Destiny API too) with authentication if necessary."
12
- spec.description = "This gem makes possible to use Bungie API (and Destiny API too) with authentication if necessary. It can be useful, if you decide create your application for Destiny Game (https://www.bungie.net/en/pub/AboutDestiny)."
11
+ spec.summary = "This gem makes possible to use Bungie API (and Destiny API too)."
12
+ spec.description = "This gem makes possible to use Bungie API (and Destiny API too). It can be useful, if you decide create your application for Destiny Game (https://www.bungie.net/en/pub/AboutDestiny)."
13
13
  spec.homepage = "https://github.com/RuBAN-GT/bungie_client"
14
14
  spec.license = "MIT"
15
15
 
@@ -1,3 +1,3 @@
1
1
  module BungieClient
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -24,6 +24,9 @@ module BungieClient::Wrappers
24
24
  else
25
25
  raise 'You must set user display name'
26
26
  end
27
+
28
+ # set destinyMembershipId if needed
29
+ @destiny_membership_id = options[:destiny_membership_id] unless options[:destiny_membership_id].nil?
27
30
  end
28
31
 
29
32
  # Get DestinyMembershipId of selected user
@@ -50,4 +53,4 @@ module BungieClient::Wrappers
50
53
  super
51
54
  end
52
55
  end
53
- end
56
+ 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: 1.1.0
4
+ version: 1.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-01-26 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,9 +100,8 @@ dependencies:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: 2.7.0
103
- description: This gem makes possible to use Bungie API (and Destiny API too) with
104
- authentication if necessary. It can be useful, if you decide create your application
105
- for Destiny Game (https://www.bungie.net/en/pub/AboutDestiny).
103
+ description: This gem makes possible to use Bungie API (and Destiny API too). It can
104
+ be useful, if you decide create your application for Destiny Game (https://www.bungie.net/en/pub/AboutDestiny).
106
105
  email:
107
106
  - dkruban@gmail.com
108
107
  executables: []
@@ -110,7 +109,6 @@ extensions: []
110
109
  extra_rdoc_files: []
111
110
  files:
112
111
  - ".gitignore"
113
- - ".idea/vcs.xml"
114
112
  - ".travis.yml"
115
113
  - CODE_OF_CONDUCT.md
116
114
  - Gemfile
@@ -154,6 +152,5 @@ rubyforge_project:
154
152
  rubygems_version: 2.6.8
155
153
  signing_key:
156
154
  specification_version: 4
157
- summary: This gem makes possible to use Bungie API (and Destiny API too) with authentication
158
- if necessary.
155
+ summary: This gem makes possible to use Bungie API (and Destiny API too).
159
156
  test_files: []