quakelive_api 0.0.1 → 0.1.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.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.travis.yml +3 -2
  4. data/CHANGELOG.md +11 -0
  5. data/README.md +6 -2
  6. data/lib/quakelive_api/base.rb +23 -23
  7. data/lib/quakelive_api/game_time.rb +5 -5
  8. data/lib/quakelive_api/parser/awards.rb +21 -21
  9. data/lib/quakelive_api/parser/base.rb +1 -1
  10. data/lib/quakelive_api/parser/statistics.rb +17 -17
  11. data/lib/quakelive_api/parser/summary.rb +25 -24
  12. data/lib/quakelive_api/profile/awards/base.rb +10 -10
  13. data/lib/quakelive_api/profile/awards/career_milestones.rb +1 -1
  14. data/lib/quakelive_api/profile/awards/experience.rb +1 -1
  15. data/lib/quakelive_api/profile/awards/mad_skillz.rb +1 -1
  16. data/lib/quakelive_api/profile/awards/social_life.rb +4 -5
  17. data/lib/quakelive_api/profile/awards/sweet_success.rb +1 -1
  18. data/lib/quakelive_api/profile/statistics.rb +7 -7
  19. data/lib/quakelive_api/profile/summary.rb +21 -21
  20. data/lib/quakelive_api/version.rb +1 -1
  21. data/quakelive_api.gemspec +7 -6
  22. data/test/fixtures/awards/career_milestones.yml +262 -0
  23. data/test/fixtures/awards/experience.yml +1019 -0
  24. data/test/fixtures/profiles/emqz.yml +331 -0
  25. data/test/fixtures/profiles/error.yml +53 -0
  26. data/test/fixtures/profiles/full/awards_experience.yml +1019 -0
  27. data/test/fixtures/profiles/full/awards_milestones.yml +262 -0
  28. data/test/fixtures/profiles/full/awards_skillz.yml +592 -0
  29. data/test/fixtures/profiles/full/awards_social.yml +163 -0
  30. data/test/fixtures/profiles/full/awards_success.yml +449 -0
  31. data/test/fixtures/profiles/full/statistics.yml +438 -0
  32. data/test/fixtures/profiles/full/summary.yml +331 -0
  33. data/test/fixtures/profiles/mariano.yml +329 -0
  34. data/test/fixtures/profiles/not_existing.yml +57 -0
  35. data/test/fixtures/statistics/xsi.yml +438 -0
  36. data/test/quakelive_api/profile/awards/career_milestones_test.rb +8 -9
  37. data/test/quakelive_api/profile/awards/experience_test.rb +6 -7
  38. data/test/quakelive_api/profile/statistics_test.rb +31 -37
  39. data/test/quakelive_api/profile/summary_test.rb +60 -51
  40. data/test/quakelive_api/profile_test.rb +37 -32
  41. data/test/test_helper.rb +10 -30
  42. metadata +71 -72
  43. data/test/fixtures/awards/career.txt +0 -382
  44. data/test/fixtures/awards/experience.txt +0 -769
  45. data/test/fixtures/awards/mad_skillz.txt +0 -915
  46. data/test/fixtures/awards/social_life.txt +0 -155
  47. data/test/fixtures/awards/sweet_success.txt +0 -684
  48. data/test/fixtures/profile/error.txt +0 -24
  49. data/test/fixtures/profile/not_found.txt +0 -36
  50. data/test/fixtures/profile/summary.txt +0 -383
  51. data/test/fixtures/statistics/emqz.txt +0 -431
  52. data/test/fixtures/statistics/xsi.txt +0 -558
  53. data/test/fixtures/summary/emqz.txt +0 -304
  54. data/test/fixtures/summary/mariano.txt +0 -380
  55. data/test/quakelive_api/profile/awards/mad_skillz_test.rb +0 -38
  56. data/test/quakelive_api/profile/awards/social_life_test.rb +0 -38
  57. data/test/quakelive_api/profile/awards/sweet_success_test.rb +0 -38
@@ -0,0 +1,163 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.quakelive.com/profile/awards/xsi/5
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - www.quakelive.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx/0.7.67
25
+ Date:
26
+ - Mon, 18 Aug 2014 10:33:13 GMT
27
+ Content-Type:
28
+ - text/html
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - close
33
+ X-Powered-By:
34
+ - PHP/5.3.3
35
+ X-Ql-Ident:
36
+ - 0 standard
37
+ Vary:
38
+ - Accept-Encoding
39
+ body:
40
+ encoding: UTF-8
41
+ string: " <div class=\"detailArea awardId330\">\n <img
42
+ alt=\"\" title=\"Stuff some stockings with a grenade or two.\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/winternights2012_v2014080602.0.png\"
43
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
44
+ w247\">\n <span class=\"bigRedTxt\">Winter Nights 2012</span>\n
45
+ \ <br />\n <span class=\"blktxt_11\">Complete
46
+ a match on \"Silent Night\" or \"Winter's Edge\" during the 2012 holidays.</span>\n
47
+ \ </p>\n \n <ul class=\"fl\">\n <li
48
+ class=\"blkbullets blktxt_11\">Date awarded: 12/12/2012<!-- (999 days after
49
+ joining) --></li>\n <li class=\"blkbullets blktxt_11\">\n 19
50
+ friends (47% of total) have earned this award\n </li>\n
51
+ \ <li class=\"blkbullets blktxt_11\">\n 20873
52
+ players (&lt; 1% of total) have earned this award\n </li>\n
53
+ \ </ul>\n \n <div class=\"cl\"></div>\n </div>\n
54
+ \ <div class=\"detailArea awardId113\">\n <img alt=\"\"
55
+ title=\"Nice - but which one of you got the Friend Fragger.\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/friend_fighter_v2014080602.0.png\"
56
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
57
+ w247\">\n <span class=\"bigRedTxt\">Friend Fighter</span>\n
58
+ \ <br />\n <span class=\"blktxt_11\">Complete
59
+ a match that at least 5 friends compete in too.</span>\n </p>\n
60
+ \ \n <ul class=\"fl\">\n <li class=\"blkbullets
61
+ blktxt_11\">Date awarded: 08/24/2009<!-- (999 days after joining) --></li>\n
62
+ \ <li class=\"blkbullets blktxt_11\">\n 28
63
+ friends (70% of total) have earned this award\n </li>\n
64
+ \ <li class=\"blkbullets blktxt_11\">\n 14623
65
+ players (&lt; 1% of total) have earned this award\n </li>\n
66
+ \ </ul>\n \n <div class=\"cl\"></div>\n </div>\n
67
+ \ <div class=\"detailArea awardId123\">\n <img alt=\"\"
68
+ title=\"Position in Queue: 501337\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/queue_live_v2014080602.0.png\"
69
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
70
+ w247\">\n <span class=\"bigRedTxt\">Queue LIVE</span>\n <br
71
+ />\n <span class=\"blktxt_11\">First to the fight! Joined
72
+ when your position in queue gave you serious bragging rights.</span>\n </p>\n
73
+ \ \n <ul class=\"fl\">\n <li class=\"blkbullets
74
+ blktxt_11\">Date awarded: 03/11/2009<!-- (999 days after joining) --></li>\n
75
+ \ <li class=\"blkbullets blktxt_11\">\n 16
76
+ friends (40% of total) have earned this award\n </li>\n
77
+ \ <li class=\"blkbullets blktxt_11\">\n 10881
78
+ players (&lt; 1% of total) have earned this award\n </li>\n
79
+ \ </ul>\n \n <div class=\"cl\"></div>\n </div>\n
80
+ \ <div class=\"detailArea awardId107\">\n <img alt=\"\"
81
+ title=\"We couldn&#039;t have done it without you.\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/crash_dummy_v2014080602.0.png\"
82
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
83
+ w247\">\n <span class=\"bigRedTxt\">Crash Dummy</span>\n <br
84
+ />\n <span class=\"blktxt_11\">Awarded to some portion of our
85
+ beta testers.</span>\n </p>\n \n <ul class=\"fl\">\n
86
+ \ <li class=\"blkbullets blktxt_11\">Date awarded: 02/23/2009<!--
87
+ (999 days after joining) --></li>\n <li class=\"blkbullets
88
+ blktxt_11\">\n 13
89
+ friends (32% of total) have earned this award\n </li>\n
90
+ \ <li class=\"blkbullets blktxt_11\">\n 5809
91
+ players (&lt; 1% of total) have earned this award\n </li>\n
92
+ \ </ul>\n \n <div class=\"cl\"></div>\n </div>\n
93
+ \ <a class=\"unearnedAwardsLabel\" href=\"javascript:;\"
94
+ onclick=\"$('.unearnedAwardType5').show();$(this).hide()\">Show unearned awards</a>\n
95
+ \ \n <div class=\"detailArea_off unearnedAwardType5\">\n <img
96
+ alt=\"\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/qc2009_qc_v2014080602.0.png\"
97
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
98
+ w247\">\n <span class=\"bigRedTxt\">QuakeCon 2009</span>\n
99
+ \ <br />\n <span class=\"blktxt_11\">Presented
100
+ to any player who completes a game of QUAKE LIVE at QuakeCon.</span>\n </p>\n
101
+ \ \n <ul class=\"fl\">\n <li
102
+ class=\"blkbullets blktxt_11\">\n No
103
+ friends have earned this award\n </li>\n
104
+ \ \n <li
105
+ class=\"blkbullets blktxt_11\">\n 276
106
+ players (&lt; 1% of total) have earned this award\n </li>\n
107
+ \ </ul>\n \n <div class=\"cl\"></div>\n
108
+ \ \n </div>\n \n <div class=\"detailArea_off
109
+ unearnedAwardType5\">\n <img alt=\"\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/qc2009_vip_v2014080602.0.png\"
110
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
111
+ w247\">\n <span class=\"bigRedTxt\">QuakeCon 2009 VIP</span>\n
112
+ \ <br />\n <span class=\"blktxt_11\">Presented
113
+ to the QuakeCon 2009 senior staff. Thank you.</span>\n </p>\n
114
+ \ \n <ul class=\"fl\">\n <li
115
+ class=\"blkbullets blktxt_11\">\n No
116
+ friends have earned this award\n </li>\n
117
+ \ \n <li
118
+ class=\"blkbullets blktxt_11\">\n 14
119
+ players (&lt; 1% of total) have earned this award\n </li>\n
120
+ \ </ul>\n \n <div class=\"cl\"></div>\n
121
+ \ \n </div>\n \n <div class=\"detailArea_off
122
+ unearnedAwardType5\">\n <img alt=\"\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/winternights2013_v2014080602.0.png\"
123
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
124
+ w247\">\n <span class=\"bigRedTxt\">Winter Nights 2013</span>\n
125
+ \ <br />\n <span class=\"blktxt_11\">Complete
126
+ a match on \"Silent Night\" or \"Winter's Edge\" during the 2013 holidays.</span>\n
127
+ \ </p>\n \n <ul class=\"fl\">\n <li
128
+ class=\"blkbullets blktxt_11\">\n 13
129
+ friends (32% of total) have earned this award\n </li>\n
130
+ \ \n <li
131
+ class=\"blkbullets blktxt_11\">\n 18104
132
+ players (&lt; 1% of total) have earned this award\n </li>\n
133
+ \ </ul>\n \n <div class=\"cl\"></div>\n
134
+ \ \n </div>\n \n <div class=\"detailArea_off
135
+ unearnedAwardType5\">\n <img alt=\"\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/theparty12_v2014080602.0.png\"
136
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
137
+ w247\">\n <span class=\"bigRedTxt\">The Party 12 CTF LAN Participant</span>\n
138
+ \ <br />\n <span class=\"blktxt_11\">Presented
139
+ to participants of the Party 12 CTF LAN</span>\n </p>\n \n
140
+ \ <ul class=\"fl\">\n <li
141
+ class=\"blkbullets blktxt_11\">\n 1
142
+ friend (2% of total) has earned this award\n </li>\n
143
+ \ \n <li
144
+ class=\"blkbullets blktxt_11\">\n 32
145
+ players (&lt; 1% of total) have earned this award\n </li>\n
146
+ \ </ul>\n \n <div class=\"cl\"></div>\n
147
+ \ \n </div>\n \n <div class=\"detailArea_off
148
+ unearnedAwardType5\">\n <img alt=\"\" src=\"http://cdn.quakelive.com/web/2014080602/images/awards/md/prague_v2014080602.0.png\"
149
+ width=\"61\" height=\"61\" class=\"fl\" />\n <p class=\"fl ml15
150
+ w247\">\n <span class=\"bigRedTxt\">Prague TDM LAN Participant</span>\n
151
+ \ <br />\n <span class=\"blktxt_11\">Presented
152
+ to participants of the Prague TDM LAN</span>\n </p>\n \n
153
+ \ <ul class=\"fl\">\n <li
154
+ class=\"blkbullets blktxt_11\">\n No
155
+ friends have earned this award\n </li>\n
156
+ \ \n <li
157
+ class=\"blkbullets blktxt_11\">\n 56
158
+ players (&lt; 1% of total) have earned this award\n </li>\n
159
+ \ </ul>\n \n <div class=\"cl\"></div>\n
160
+ \ \n </div>\n "
161
+ http_version:
162
+ recorded_at: Mon, 18 Aug 2014 10:33:13 GMT
163
+ recorded_with: VCR 2.8.0