strife 0.0.1 → 0.0.2

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.
Files changed (4) hide show
  1. data/README.md +46 -1
  2. data/lib/strife/version.rb +1 -1
  3. data/strife.gemspec +1 -1
  4. metadata +8 -2
data/README.md CHANGED
@@ -23,7 +23,52 @@ Or install it yourself as:
23
23
 
24
24
  ## Usage
25
25
 
26
- TODO: Write usage instructions here
26
+ Strife was designed to be similar to GitHub's Octokit.rb.
27
+
28
+ Strife provides methods for each of Riot's existing API calls (for
29
+ the most recent version of each call). To use Strife, you'll need
30
+ to get an API key for the Riot API. That can be obtained from the
31
+ [Riot Developer Website](https://developer.riotgames.com/).
32
+
33
+ Strife can be configured through either environment variables or
34
+ the `Strife::Configurable` module.
35
+
36
+ ### Configuring via Environment Variables
37
+
38
+ The following environment variables are used by Strife for configuration (see `Strife::Default` for a full list of default configuration options):
39
+
40
+ #### STRIFE_API_KEY
41
+
42
+ `STRIFE_API_KEY` sets the API key used by Strife for API calls.
43
+
44
+ #### STRIFE_API_ENDPOINT
45
+
46
+ `STRIFE_API_ENDPOINT` defines the end point of the Riot API. This defaults to `http://prod.api.pvp.net/api/lol/`.
47
+
48
+ #### STRIFE_USER_AGENT
49
+
50
+ `STRIFE_USER_AGENT` defines the user agent that is sent in the user agent header when making API requests. This defaults to `Strife Riot API GEM v0.0.2` (`v0.0.2` will vary depending on the current version of the Strife library).
51
+
52
+ #### STRIFE_DEFAULT_MEDIA_TYPE
53
+
54
+ `STRIFE_DEFAULT_MEDIA_TYPE` is used in the `accept` header, and defaults to `application/json`.
55
+
56
+ #### STRIFE_REGION
57
+
58
+ `STRIFE_REGION` determines the League of Legends game region to query against. It defaults to `na`. Other options include `euw` and `eune`.
59
+
60
+ ### Configuring with `Strife::Configurable`
61
+
62
+ The `Strife::Configurable` module can also be used to configure the Strife library at run-time. It can be used as follows:
63
+
64
+ ```ruby
65
+ Strife.configure do |config|
66
+ config.api_key = "An API Key"
67
+ config.region = "na"
68
+ end
69
+ ```
70
+
71
+ See [lib/strife/default.rb](lib/strife/default.rb) for a list of default options, and [lib/strife/configurable.rb](lib/strife/configurable.rb) for a list of configuration keys (see Strife::Configurable.keys).
27
72
 
28
73
  ## Contributing
29
74
 
@@ -1,3 +1,3 @@
1
1
  module Strife
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/strife.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["anthony.white.j@gmail.com"]
11
11
  spec.description = %q{Strife is a ruby wrapper for the Riot API. This product is not endorsed, certified or otherwise approved in any way by Riot Games, Inc. or any of its affiliates.}
12
12
  spec.summary = %q{Strife is a ruby wrapper for the Riot API This product is not endorsed, certified or otherwise approved in any way by Riot Games, Inc. or any of its affiliates.}
13
- spec.homepage = ""
13
+ spec.homepage = "http://www.github.com/wanthony/strife"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strife
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -167,7 +167,7 @@ files:
167
167
  - lib/strife/response/raise_error.rb
168
168
  - lib/strife/version.rb
169
169
  - strife.gemspec
170
- homepage: ''
170
+ homepage: http://www.github.com/wanthony/strife
171
171
  licenses:
172
172
  - MIT
173
173
  post_install_message:
@@ -180,12 +180,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
180
180
  - - ! '>='
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
+ segments:
184
+ - 0
185
+ hash: -631594240063064478
183
186
  required_rubygems_version: !ruby/object:Gem::Requirement
184
187
  none: false
185
188
  requirements:
186
189
  - - ! '>='
187
190
  - !ruby/object:Gem::Version
188
191
  version: '0'
192
+ segments:
193
+ - 0
194
+ hash: -631594240063064478
189
195
  requirements: []
190
196
  rubyforge_project:
191
197
  rubygems_version: 1.8.23