brawlhalla-api 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 3d4bbe6c465cb45317a9023e74f13261a95e6395a76b4b271aa5094de579217c
4
- data.tar.gz: 7be550a6cc30bb13939b4672b15d3914ffbc912adee42663f54fa46f7a97714b
3
+ metadata.gz: 6cd668d0f4cf56bec429a1953a9a0ebc4907bd4ec7d5b82539cd3d781e2c0d17
4
+ data.tar.gz: 0321c55a09c7b6ef668642c7553b14178bb0fa5cdbb41697565dc81840263322
5
5
  SHA512:
6
- metadata.gz: a850591ba67b7bb19f84658d85b5ecafd9dff7ba6910ccd143d9b7e7672d7b17782019f62186cc27f3585472b375de33171608be457bbb45fe5e9f65e8967e39
7
- data.tar.gz: 0e2d2b4b4dac96302e51bc157861df87150d4cb95349f34343d98b018f9b5a28d4f8ff73c82cbacb68f5c0abf3f07474bd7770e01604468c0efce88c792036dc
6
+ metadata.gz: 142fadb985dd53d60375c1ba2372df44b54bafabd27e6461faef31e38034a01134224cc90203d9ffd673f9c35c4eaf7e2cddbd7946ba1bf8899bd676b2e97c0d
7
+ data.tar.gz: 34a49f5f6391dca529be2e57f630b84b3da11f7818cf7f366c4560ced725f7be2a40849f71d025ca7798e127bda05985c3b9fa69cfad21b55022b20abd4cef92
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Brawlhalla::Api
1
+ # Brawlhalla API
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/brawlhalla/api`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ A ruby wrapper for the [Brawlhalla API](http://dev.brawlhalla.com/).
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,17 +20,44 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ ### Search By Steam ID
24
+
25
+ A Player can be looked up by steam ID. This returns the player’s name and brawlhalla_id.
26
+
27
+ _(A player’s steamid in format steamID64 (ex 76561198025185087).)_
28
+
29
+ ```ruby
30
+ bh = Brawlhalla::API::Client.new('YOUR_API_KEY_HERE')
31
+ bh.search('PLAYER_STEAM_ID')
32
+ ```
33
+
34
+ ### Players
35
+
36
+ #### Stats
37
+
38
+ This endpoint retrieves all stats about a player
39
+
40
+ ```ruby
41
+ bh = Brawlhalla::API::Client.new('YOUR_API_KEY_HERE')
42
+ bh.stats('PLAYER_BRAWLHALLA_ID')
43
+ ```
44
+
45
+ #### Ranked
46
+
47
+ This endpoint retrieves ranked data about a player.
48
+
49
+ ```ruby
50
+ bh = Brawlhalla::API::Client.new('YOUR_API_KEY_HERE')
51
+ bh.ranked('PLAYER_BRAWLHALLA_ID')
52
+ ```
26
53
 
27
54
  ## Development
28
55
 
29
56
  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.
30
57
 
31
- 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
58
  ## Contributing
34
59
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/brawlhalla-api.
60
+ Bug reports and pull requests are welcome on GitHub at https://github.com/rikas/brawlhalla-api.
36
61
 
37
62
  ## License
38
63
 
@@ -10,7 +10,7 @@ module Brawlhalla
10
10
  # Search player by Steam ID.
11
11
  #
12
12
  # === Example
13
- # bh = Brawlhalla::API::Client.new(YOUR_API_KEY_HERE)
13
+ # bh = Brawlhalla::API::Client.new('YOUR_API_KEY_HERE')
14
14
  # bh.search(76561198048321884)
15
15
  def search(steamid)
16
16
  request(
@@ -22,7 +22,7 @@ module Brawlhalla
22
22
  # Get player stats by giving the Brawlhalla ID.
23
23
  #
24
24
  # === Example
25
- # bh = Brawlhalla::API::Client.new(YOUR_API_KEY_HERE)
25
+ # bh = Brawlhalla::API::Client.new('YOUR_API_KEY_HERE')
26
26
  # bh.stats(8817417)
27
27
  def stats(brawlhalla_id)
28
28
  request(path: "player/#{brawlhalla_id}/stats")
@@ -31,9 +31,9 @@ module Brawlhalla
31
31
  # Get player ranked stats by giving the Brawlhalla ID.
32
32
  #
33
33
  # === Example
34
- # bh = Brawlhalla::API::Client.new(YOUR_API_KEY_HERE)
35
- # bh.ranked_stats(8817417)
36
- def ranked_stats(brawlhalla_id)
34
+ # bh = Brawlhalla::API::Client.new('YOUR_API_KEY_HERE')
35
+ # bh.ranked(8817417)
36
+ def ranked(brawlhalla_id)
37
37
  request(path: "player/#{brawlhalla_id}/ranked")
38
38
  end
39
39
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Brawlhalla
4
4
  module API
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brawlhalla-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rikas