rubygamertag 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +89 -3
- data/lib/rubygamertag/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -4,20 +4,106 @@ An interface for accessing your XBOX Live profile and game data.
|
|
4
4
|
|
5
5
|
## Install
|
6
6
|
|
7
|
-
```
|
7
|
+
```
|
8
8
|
gem install rubygamertag
|
9
9
|
```
|
10
10
|
|
11
11
|
Gemfile:
|
12
12
|
|
13
|
-
```
|
13
|
+
```
|
14
14
|
require 'rubygamertag'
|
15
15
|
```
|
16
16
|
|
17
17
|
## Usage
|
18
18
|
|
19
|
+
# Get Profile Info:
|
20
|
+
<pre><code>
|
21
|
+
profile = RubyGamertag::Profile.new("Major+Nelson")
|
22
|
+
profile.Gamertag = "Major Nelson"
|
23
|
+
profile.tier = "Gold"
|
24
|
+
profile.is_cheater = false
|
25
|
+
profile.is_online = [false, "Last seen 2 hours ago playing Battlefield 3"]
|
26
|
+
profile.avatars = {'Tile' => "http://avatar.xboxlive.com/avatar/Major%20Nelson/avatarpic-s.png", 'Small' => "http://avatar.xboxlive.com/avatar/Major Nelson/avatarpic-s.png", 'Large' => "http://avatar.xboxlive.com/avatar/Major Nelson/avatarpic-l.png", 'Body' => "http://avatar.xboxlive.com/avatar/Major Nelson/avatarpic-body.png"}
|
27
|
+
profile.Gamerscore = 58722
|
28
|
+
profile.Reputation = 20
|
29
|
+
profile.Name = ""
|
30
|
+
profile.Motto = ""
|
31
|
+
profile.Location = ""
|
32
|
+
profile.Bio = ""
|
33
|
+
</code></pre>
|
34
|
+
|
35
|
+
# Get Games Data:
|
36
|
+
<pre><code>
|
37
|
+
games = RubyGamertag::Games.new("RealJBlaze")
|
38
|
+
games.Gamertag = "RealJBlaze"
|
39
|
+
games.GameCount = 132
|
40
|
+
games.TotalEarnedGamerScore = 53220
|
41
|
+
games.TotalPossibleGamerScore = 107905
|
42
|
+
games.TotalEarnedAchievments = 2423
|
43
|
+
games.TotalPossibleAchievments = 4653
|
44
|
+
games.PercentCompleted = 52
|
45
|
+
games.PlayedGames.each do |game|
|
46
|
+
game.Id
|
47
|
+
game.Title
|
48
|
+
game.Url
|
49
|
+
game.BoxArt
|
50
|
+
game.LargeBoxArt
|
51
|
+
game.EarnedGamerScore
|
52
|
+
game.PossibleGamerScore
|
53
|
+
game.EarnedAchievments
|
54
|
+
game.PossibleAchievments
|
55
|
+
game.PercentCompleted
|
56
|
+
game.LastPlayed
|
57
|
+
end
|
58
|
+
</code></pre>
|
59
|
+
|
60
|
+
# Games Achievments Data:
|
61
|
+
<pre><code>
|
62
|
+
achievments = RubyGamertag::Achievments.new("Major+Nelson")
|
63
|
+
achievments.each do |game|
|
64
|
+
game.Title
|
65
|
+
game.Url
|
66
|
+
game.BoxArt
|
67
|
+
game.LargeBoxArt
|
68
|
+
game.EarnedGamerScore
|
69
|
+
game.PossibleGamerScore
|
70
|
+
game.EarnedAchievments
|
71
|
+
game.PossibleAchievments
|
72
|
+
game.LastPlayed
|
73
|
+
game.Achievments.each do |achievment|
|
74
|
+
achievment.Id
|
75
|
+
achievment.TileUrl
|
76
|
+
achievment.Title
|
77
|
+
achievment.Description
|
78
|
+
achievment.GamerScore
|
79
|
+
achievment.IsSecret
|
80
|
+
achievment.Unlocked
|
81
|
+
achievment.DateEarned
|
82
|
+
achievment.EarnedOffline
|
83
|
+
end
|
84
|
+
end
|
85
|
+
</code></pre>
|
86
|
+
|
87
|
+
# Get Info On Friends:
|
88
|
+
<pre><code>
|
89
|
+
friends = RubyGamertag::Friends.new("Major+Nelson")
|
90
|
+
friends.TotalFriends = 100
|
91
|
+
friends.TotalOnlineFriends = 3
|
92
|
+
friends.TotalOfflineFriends = 97
|
93
|
+
friends.Friends.each do |friend|
|
94
|
+
friend.Gamertag
|
95
|
+
friend.AvatarSmall
|
96
|
+
friend.AvatarLarge
|
97
|
+
friend.GamerScore
|
98
|
+
friend.IsOnline
|
99
|
+
friend.PresenceInfo.LastOnline
|
100
|
+
friend.PresenceInfo.OnlineStatus
|
101
|
+
friend.PresenceInfo.Game.Title
|
102
|
+
friend.PresenceInfo.Game.Id
|
103
|
+
friend.PresenceInfo.Game.Url
|
104
|
+
end
|
105
|
+
</code></pre>
|
19
106
|
|
20
|
-
|
21
107
|
## Documentation
|
22
108
|
|
23
109
|
## Note on Patches/Pull Requests
|
data/lib/rubygamertag/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygamertag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|