gw2-api 0.3.0 → 0.5.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +59 -59
- data/Rakefile +1 -5
- data/gw2-api.gemspec +38 -0
- data/lib/gw2/api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd0845be116bde90bdf5c52ce92827833310d34c8c368f8e1ac4fe0dc6fb2ddf
|
4
|
+
data.tar.gz: ea61dca98bacef0ba9503b42d9e9a4e2ff0898858dcb365325bdd69e0bec6519
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 066cc3d59251faa55cbb00da14089cb06dd040fca9086d769f163c4f22d5502d4522575e96371b61fd258bd8723a85934c9137f42500cb0ce15068dd6e91413b
|
7
|
+
data.tar.gz: 68f89fbf24773c971ff221c184ca2b81337c534bcde6597f9f38496a36e951f0fc5f4cdac53e8ea1c90ce7c533200066312a3e0d464027f0a94f28742c45c81f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,59 +1,59 @@
|
|
1
|
-
# Gw2::Api
|
2
|
-
|
3
|
-
This is a gem used to make calls to the Guild Wars 2 API.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Install the gem and add to the application's Gemfile by executing:
|
8
|
-
|
9
|
-
$ bundle add gw2-api
|
10
|
-
|
11
|
-
If bundler is not being used to manage dependencies, install the gem by executing:
|
12
|
-
|
13
|
-
$ gem install gw2-api
|
14
|
-
|
15
|
-
## Usage
|
16
|
-
|
17
|
-
To use the gem, first require it in the application, then create a new instance of the `Gw2::Api::Client` class:
|
18
|
-
|
19
|
-
```ruby
|
20
|
-
require 'gw2-api'
|
21
|
-
|
22
|
-
client = Gw2::Api::Client.new(api_key: ENV["GW2_API_KEY"])
|
23
|
-
|
24
|
-
puts client.account.body
|
25
|
-
puts client.achievements(ids: "1840,910")
|
26
|
-
```
|
27
|
-
|
28
|
-
You can replace `ENV["GW2_API_KEY"]` with your own API Key, or set the env variable
|
29
|
-
|
30
|
-
A list of available functions can be found `lib/gw2/modules`.
|
31
|
-
|
32
|
-
You can find valid parameters for each function in the [Guild Wars 2 API documentation](https://wiki.guildwars2.com/wiki/API:Main) or from the public [API-CDI](https://github.com/arenanet/api-cdi) repo.
|
33
|
-
|
34
|
-
## Tests
|
35
|
-
|
36
|
-
To run the tests, execute:
|
37
|
-
|
38
|
-
$ bundle exec rspec
|
39
|
-
|
40
|
-
Note that you need to set a valid API key in the environment variable `GW2_API_KEY` to run the tests.
|
41
|
-
GW2's API Availability can affect the result of the tests (if it's down, the tests will fail).
|
42
|
-
|
43
|
-
## Development
|
44
|
-
|
45
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
46
|
-
|
47
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
48
|
-
|
49
|
-
## Contributing
|
50
|
-
|
51
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/nicholasrobertm/gw2-api.
|
52
|
-
|
53
|
-
## License
|
54
|
-
|
55
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
56
|
-
|
57
|
-
## Code of Conduct
|
58
|
-
|
59
|
-
Be a decent person, and don't be a jerk, it's that simple!
|
1
|
+
# Gw2::Api
|
2
|
+
|
3
|
+
This is a gem used to make calls to the Guild Wars 2 API.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
|
+
|
9
|
+
$ bundle add gw2-api
|
10
|
+
|
11
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
12
|
+
|
13
|
+
$ gem install gw2-api
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
To use the gem, first require it in the application, then create a new instance of the `Gw2::Api::Client` class:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'gw2-api'
|
21
|
+
|
22
|
+
client = Gw2::Api::Client.new(api_key: ENV["GW2_API_KEY"])
|
23
|
+
|
24
|
+
puts client.account.body
|
25
|
+
puts client.achievements(ids: "1840,910")
|
26
|
+
```
|
27
|
+
|
28
|
+
You can replace `ENV["GW2_API_KEY"]` with your own API Key, or set the env variable
|
29
|
+
|
30
|
+
A list of available functions can be found `lib/gw2/modules`.
|
31
|
+
|
32
|
+
You can find valid parameters for each function in the [Guild Wars 2 API documentation](https://wiki.guildwars2.com/wiki/API:Main) or from the public [API-CDI](https://github.com/arenanet/api-cdi) repo.
|
33
|
+
|
34
|
+
## Tests
|
35
|
+
|
36
|
+
To run the tests, execute:
|
37
|
+
|
38
|
+
$ bundle exec rspec
|
39
|
+
|
40
|
+
Note that you need to set a valid API key in the environment variable `GW2_API_KEY` to run the tests.
|
41
|
+
GW2's API Availability can affect the result of the tests (if it's down, the tests will fail).
|
42
|
+
|
43
|
+
## Development
|
44
|
+
|
45
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
46
|
+
|
47
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
48
|
+
|
49
|
+
## Contributing
|
50
|
+
|
51
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/nicholasrobertm/gw2-api.
|
52
|
+
|
53
|
+
## License
|
54
|
+
|
55
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
56
|
+
|
57
|
+
## Code of Conduct
|
58
|
+
|
59
|
+
Be a decent person, and don't be a jerk, it's that simple!
|
data/Rakefile
CHANGED
data/gw2-api.gemspec
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/gw2/api/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "gw2-api"
|
7
|
+
spec.version = Gw2::Api::VERSION
|
8
|
+
spec.authors = ["Rob Nicholas"]
|
9
|
+
spec.email = ["rob@projectshiba.com"]
|
10
|
+
|
11
|
+
spec.summary = "This is an API wrapper for the Guild Wars 2 API."
|
12
|
+
spec.description = "This is a wrapper to the Guild Wars 2 API. It is designed to make it easier to interact with the API and to provide a more Ruby-like interface to the data provided by the API."
|
13
|
+
spec.homepage = "https://github.com/nicholasrobertm/gw2-api"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
|
+
|
17
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
18
|
+
|
19
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
+
spec.metadata["source_code_uri"] = "https://github.com/nicholasrobertm/gw2-api"
|
21
|
+
spec.metadata["changelog_uri"] = "https://github.com/nicholasrobertm/gw2-api"
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(__dir__) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
spec.bindir = "exe"
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
spec.add_dependency "rake", "~> 13.0"
|
35
|
+
spec.add_dependency "rspec", "~> 3.0"
|
36
|
+
spec.add_dependency "rubocop", "~> 1.21"
|
37
|
+
|
38
|
+
end
|
data/lib/gw2/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gw2-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Nicholas
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- LICENSE.txt
|
70
70
|
- README.md
|
71
71
|
- Rakefile
|
72
|
+
- gw2-api.gemspec
|
72
73
|
- lib/gw2/api.rb
|
73
74
|
- lib/gw2/api/version.rb
|
74
75
|
- lib/gw2/modules/account.rb
|
@@ -100,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
101
|
- !ruby/object:Gem::Version
|
101
102
|
version: '0'
|
102
103
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
104
|
+
rubygems_version: 3.1.6
|
104
105
|
signing_key:
|
105
106
|
specification_version: 4
|
106
107
|
summary: This is an API wrapper for the Guild Wars 2 API.
|