threesixtyvoice 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +16 -1
- data/lib/threesixtyvoice/popular.rb +16 -0
- data/lib/threesixtyvoice/version.rb +1 -1
- data/lib/threesixtyvoice.rb +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWMzMmUxZGJkYTk4NWRkNThiY2Y4NDMyY2Y5ZTM1N2VmYTY3NzJlOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjEwNjg3MGRjNjRhMzkyN2VlYTVkMjRmOTIyY2NlMmY2NTE4MjllNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmQwMDUzMTcxNTE5ODliM2UzMmY4MTk1YTE1MmE3NDEyMWU1MDk0NmQyNzY3
|
10
|
+
YjJkNTY0NGU5ZmI5ZGQwOWUyNmE2MDU5ZDU2NGI4NGRhZGM1MzA4OWEzNzli
|
11
|
+
YzIzMjk1M2MzM2MxNWM4Njc4ZTkxOWM3YTJkYzllMGIwMWI5MjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzliNjYwNmIwZjIyYTA0ZjNjYTk2NGE5MmIwZWI5M2M5Y2QxNzA5OWQzZjg1
|
14
|
+
ZWQ2MmU1OTI4YmFlYTgzNTk0YmVlYjA2ZmMzYjExMjYxZmQ1OWY5NTBkZDNl
|
15
|
+
M2E3OWMyOWJkNTUyYjZlODNjMmY5Njg4NjM3M2EzNDcwNDU2ZGQ=
|
data/README.md
CHANGED
@@ -69,7 +69,22 @@ list.owners.each { |owner| puts owner }
|
|
69
69
|
### GamertagProfile -TBD
|
70
70
|
### GamertagWatchlist -TBD
|
71
71
|
### GenresList -TBD
|
72
|
-
### Popular
|
72
|
+
### Popular
|
73
|
+
-------------------------
|
74
|
+
#### Params
|
75
|
+
* none
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
pop_blogs = Threesixtyvoice.popular
|
79
|
+
puts pop_blogs.version
|
80
|
+
pop_blogs.popular_blogs.each do |popular|
|
81
|
+
puts "rank: #{popular.rank}"
|
82
|
+
puts "gamertag: #{popular.gamertag}"
|
83
|
+
puts "url: #{popular.url}"
|
84
|
+
end
|
85
|
+
```
|
86
|
+
|
87
|
+
|
73
88
|
### ScoreGetList -TBD
|
74
89
|
### GroupsProfile -TBD
|
75
90
|
### GroupsMembers -TBD
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Threesixtyvoice
|
2
|
+
class Popular
|
3
|
+
attr_reader :version, :popular_blogs
|
4
|
+
|
5
|
+
def initialize(doc)
|
6
|
+
@version = doc.xpath('//api/info/version').text
|
7
|
+
@popular_blogs = doc.xpath('//api/mostpopular/gamer').map do |i|
|
8
|
+
PopularBlog.new(i.xpath('rank').text, i.xpath('gamertag').text,i.xpath('url').text)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
class PopularBlog < Struct.new("PopularBlog", :rank, :gamertag, :url)
|
15
|
+
end
|
16
|
+
end
|
data/lib/threesixtyvoice.rb
CHANGED
@@ -14,6 +14,11 @@ module Threesixtyvoice
|
|
14
14
|
BadgeList.new(doc)
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.popular
|
18
|
+
doc = get_xml_doc("/api/popular.asp")
|
19
|
+
Popular.new(doc)
|
20
|
+
end
|
21
|
+
|
17
22
|
private
|
18
23
|
|
19
24
|
def self.get_xml_doc(api_path)
|
@@ -28,3 +33,4 @@ end
|
|
28
33
|
require "threesixtyvoice/badge"
|
29
34
|
require "threesixtyvoice/badge_list"
|
30
35
|
require "threesixtyvoice/badges_list_gamertags"
|
36
|
+
require "threesixtyvoice/popular"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: threesixtyvoice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Larrabee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/threesixtyvoice/badge.rb
|
55
55
|
- lib/threesixtyvoice/badge_list.rb
|
56
56
|
- lib/threesixtyvoice/badges_list_gamertags.rb
|
57
|
+
- lib/threesixtyvoice/popular.rb
|
57
58
|
- lib/threesixtyvoice/version.rb
|
58
59
|
- test/threesixtyvoice_test.rb
|
59
60
|
- threesixtyvoice.gemspec
|