README.md in bungie_client-1.1.0 vs README.md in bungie_client-1.1.1
- old
+ new
@@ -1,11 +1,11 @@
[![Gem Version](https://badge.fury.io/rb/bungie_client.svg)](https://badge.fury.io/rb/bungie_client)
[![Build Status](https://travis-ci.org/RuBAN-GT/bungie_client.svg?branch=master)](https://travis-ci.org/RuBAN-GT/bungie_client)
# Bungie Client
-This gem makes possible to use [Bungie API](http://destinydevs.github.io/BungieNetPlatform/docs/Endpoints) (and Destiny API too) with authentication if necessary.
+This gem makes possible to use [Bungie API](http://destinydevs.github.io/BungieNetPlatform/docs/Endpoints) (and Destiny API too).
It can be useful, if you decide create your application for [Destiny Game](https://www.bungie.net/en/pub/AboutDestiny).
## Installation
Add this line to your application's Gemfile:
@@ -22,20 +22,17 @@
This gem contains two main classes: **BungieClient::Client**, **BungieClient::Wrappers::Default** and his inherits.
### BungieClient::Client
-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.
+It's main class that makes possible to send any requests to Bungie.
**For this you should initialize your client for the next example:**
~~~~ruby
@client = BungieClient::Client.new(
- :api_key => 'YOUR_API_KEY',
- :username => 'test@test.test',
- :password => '1234',
- :type => 'psn'
+ :api_key => 'YOUR_API_KEY'
)
~~~~
**or simply:**
@@ -47,16 +44,14 @@
* After it you can send your request to [Bungie Endpoint](http://destinydevs.github.io/BungieNetPlatform/docs/Endpoints).
* The full information about classes and modules and their methods you can find in yard-comments and [rubydoc](http://www.rubydoc.info/gems/bungie_client).
#### How it initialized:
-* 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.
* If you want to store your cookies in any place you can define they with `cookies` option without authentication.
+* 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.
* After this operations your client is done for usage.
-> The authentication optional for client, it requires only `api_key` in your hash for initializer.
-
#### Sending requests
**Now you can send requests, e.g. for finding user information and getting his profile:**
~~~~ruby
@@ -64,23 +59,9 @@
~~~~
#### Note
* For requests optimization you should use any caching of your requests.
-
-### BungieClient::Auth
-
-This module has two methods: authentication in bungie.net by *PSN* or *Xbox Live* and checking this authentication with cookies that was returned early.
-
-**Example:**
-
-~~~~ ruby
-# Authenticate and get bungie cookies
-jar = BungieClient::Auth.auth 'example@mail.com', 'example', 'psn'
-
-# Check authentication
-p BungieClient::Auth.auth_possible? (jar || [])
-~~~~
### BungieClient::Wrappers::Default
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.