sc2ranks 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +61 -9
- data/VERSION +1 -1
- data/sc2ranks.gemspec +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -4,15 +4,67 @@ A gem used to access the api of http://sc2ranks.com
|
|
4
4
|
|
5
5
|
Documentation about the api can be found at http://sc2ranks.com/api
|
6
6
|
|
7
|
-
==
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
== Starting Out
|
8
|
+
|
9
|
+
First you need an instance of the Sc2ranks class. Just pass a app key to the new
|
10
|
+
method. According to the api page at sc2ranks.com an appkey should be the domain
|
11
|
+
that you are requesting from.
|
12
|
+
|
13
|
+
sc2ranks = Sc2ranks.new('sc2.kelsin.net')
|
14
|
+
|
15
|
+
== Character data (/w Teams)
|
16
|
+
|
17
|
+
Right now the only api call implemented is the "Character with base team info"
|
18
|
+
call since it handles everything I need currently. Just use the character method
|
19
|
+
of the Sc2ranks object with a battle.net profile url:
|
20
|
+
|
21
|
+
character = sc2ranks.character('http://us.battle.net/sc2/en/profile/280904/1/Kelsin/')
|
22
|
+
|
23
|
+
This will return an object with the following methods
|
24
|
+
|
25
|
+
* name:: Character name
|
26
|
+
* bnet_id:: Battle.net ID
|
27
|
+
* region:: Battle.net region
|
28
|
+
* id:: Sc2ranks id
|
29
|
+
* updated_at:: When the sc2ranks data was last updated
|
30
|
+
* achievement_points:: Current achievement point total
|
31
|
+
* character_code:: Character Code (sc2ranks won't have access to these anymore)
|
32
|
+
* portrait:: Portrait object with portrait data
|
33
|
+
* teams:: An array of Team objects with team data
|
34
|
+
|
35
|
+
== Portrait Data
|
36
|
+
|
37
|
+
The portrait object contains the following fields
|
38
|
+
|
39
|
+
* icon_id:: Which icon graphic to use
|
40
|
+
* column:: Which column in the graphic to use
|
41
|
+
* row:: Which row in the graphic to use
|
42
|
+
|
43
|
+
Please see http://sc2ranks.com/api for more information on using this data.
|
44
|
+
|
45
|
+
== Team Data
|
46
|
+
|
47
|
+
To get to a certain team quick you can use the team method on your Character
|
48
|
+
object
|
49
|
+
|
50
|
+
character.team(bracket, is_random)
|
51
|
+
|
52
|
+
Bracket can be 1 through 4. The is_random parameter defaults to false so you
|
53
|
+
don't need to use it. Team data does not include team members yet.
|
54
|
+
|
55
|
+
If you call this with 1 you get the 1v1 team immediately (or nil if it doesn't exist)
|
56
|
+
|
57
|
+
If you call it with any other parameters you get an array of teams (or [] if
|
58
|
+
there are none)
|
59
|
+
|
60
|
+
# Get 1v1 team
|
61
|
+
character.team(1)
|
62
|
+
|
63
|
+
# Get 2v2 random team
|
64
|
+
character.team(2, true)
|
65
|
+
|
66
|
+
# Get 4v4 teams
|
67
|
+
character.team(4)
|
16
68
|
|
17
69
|
== Copyright
|
18
70
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/sc2ranks.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sc2ranks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Christopher Giroir
|