ruby-stackoverflow 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 +7 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +0 -5
- data/README.md +5 -6
- data/lib/generators/ruby_stackoverflow/ruby_stackoverflow_generator.rb +2 -6
- data/lib/ruby-stackoverflow.rb +2 -5
- data/lib/ruby-stackoverflow/client/badges_helper.rb +23 -26
- data/lib/ruby-stackoverflow/client/comments_helper.rb +5 -7
- data/lib/ruby-stackoverflow/client/parse_options.rb +2 -3
- data/lib/ruby-stackoverflow/client/question_helper.rb +1 -3
- data/lib/ruby-stackoverflow/client/resource/answer.rb +0 -1
- data/lib/ruby-stackoverflow/client/resource/badge.rb +0 -1
- data/lib/ruby-stackoverflow/client/resource/comment.rb +0 -2
- data/lib/ruby-stackoverflow/client/resource/notification.rb +0 -2
- data/lib/ruby-stackoverflow/client/resource/permission.rb +0 -2
- data/lib/ruby-stackoverflow/client/resource/post.rb +0 -1
- data/lib/ruby-stackoverflow/client/resource/question.rb +5 -7
- data/lib/ruby-stackoverflow/client/resource/suggested_edit.rb +0 -2
- data/lib/ruby-stackoverflow/client/resource/tag.rb +0 -13
- data/lib/ruby-stackoverflow/client/resource/user.rb +4 -4
- data/lib/ruby-stackoverflow/client/response_data.rb +3 -3
- data/lib/ruby-stackoverflow/client/user_helper.rb +9 -5
- data/lib/ruby-stackoverflow/configuration.rb +1 -1
- data/lib/ruby-stackoverflow/version.rb +1 -1
- data/ruby-stackoverflow.gemspec +2 -1
- data/spec/fixtures/vcr_cassettes/badges.yml +2 -2
- data/spec/fixtures/vcr_cassettes/badges_by_ids.yml +2 -2
- data/spec/fixtures/vcr_cassettes/badges_by_name.yml +2 -2
- data/spec/fixtures/vcr_cassettes/badges_by_recipients.yml +2 -2
- data/spec/fixtures/vcr_cassettes/badges_by_recipients_by_ids.yml +2 -2
- data/spec/fixtures/vcr_cassettes/badges_by_tags.yml +2 -2
- data/spec/fixtures/vcr_cassettes/comments.yml +2 -2
- data/spec/fixtures/vcr_cassettes/comments_by_ids.yml +2 -2
- data/spec/fixtures/vcr_cassettes/error.yml +2 -2
- data/spec/fixtures/vcr_cassettes/featured_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/linked_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/noanswered_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/questions_answers.yml +2 -2
- data/spec/fixtures/vcr_cassettes/questions_by_ids.yml +2 -2
- data/spec/fixtures/vcr_cassettes/questions_comments.yml +2 -2
- data/spec/fixtures/vcr_cassettes/related_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/timeline_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/unanswered_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/user_timeline.yml +2 -2
- data/spec/fixtures/vcr_cassettes/user_top_answers_with_given_tags.yml +2 -2
- data/spec/fixtures/vcr_cassettes/user_top_questions_with_given_tags.yml +2 -2
- data/spec/fixtures/vcr_cassettes/user_top_tags_by_answers.yml +2 -2
- data/spec/fixtures/vcr_cassettes/user_top_tags_by_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/user_write_permissions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_answers.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_badges.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_by_ids.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_comments.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_favorites_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_featured_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_mentioned_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_noanswerquestions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_notifications.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_replied_comments.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_reputation_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_suggested_edits.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_tags.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_unaccepted_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_unanswered_questions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/users_unread_notifications.yml +2 -2
- data/spec/helper.rb +1 -1
- data/spec/ruby-stackoverflow/badges_spec.rb +14 -8
- data/spec/ruby-stackoverflow/comments_spec.rb +4 -2
- data/spec/ruby-stackoverflow/question_spec.rb +24 -14
- data/spec/ruby-stackoverflow/user_spec.rb +51 -58
- data/spec/spec_helper.rb +3 -3
- metadata +39 -43
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/?access_token=L0J88cciBPHiGtIKCul6Gg))&inname=raysrashmi&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow&sort=reputation
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -56,6 +56,6 @@ http_interactions:
|
|
56
56
|
48HTIrSTUx8ZPl6sdnqlrLgjZW/BitNglY6+vM1I9EmmZuxkwm2F8jxPSlqh
|
57
57
|
A3TU9ybQll1Yb1W3YfdSnVdSdD04a35TH8X1+jNi75MN0DrUII00PWvquqoe
|
58
58
|
YQ2/KHlCJ2IDeELkHgCufwD4zSj6zAIAAA==
|
59
|
-
http_version:
|
59
|
+
http_version:
|
60
60
|
recorded_at: Fri, 25 Oct 2013 21:21:34 GMT
|
61
61
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/answers?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -60,6 +60,6 @@ http_interactions:
|
|
60
60
|
xmyNp02cx1Pq8LdfHG3C0kmNNl9OVHMwmJCS9zFYKvAwBlZcUtZhmK0N/0DE
|
61
61
|
Q/HUItbly44yC0rh23bcg1KSsBEoBWIUiqQgp6Du+bK+fS71I4lSddCZM6W2
|
62
62
|
la32aK3U7d+Ue3Gpf8V+YnybT+/aZ2U7pO0QXn8D1gW4yK8UAAA=
|
63
|
-
http_version:
|
63
|
+
http_version:
|
64
64
|
recorded_at: Fri, 25 Oct 2013 21:20:57 GMT
|
65
65
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/badges?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&order=asc&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -55,6 +55,6 @@ http_interactions:
|
|
55
55
|
20sXwNwf1N1Hx24kZ9149k035+jGBdxIwtag7qkb4qwbD4XydozGJcwQHAdx
|
56
56
|
T72YnU9GU9eW/PiluogdM+5+9f2TjvO/jnurdRgVxoxcKCMxl0cS798i9t5Y
|
57
57
|
DzmhBmWUKVmWpvPJz7KGz6DPJFwRW4PLtaWgwQoqh/tvootb2xcIAAA=
|
58
|
-
http_version:
|
58
|
+
http_version:
|
59
59
|
recorded_at: Fri, 25 Oct 2013 21:21:20 GMT
|
60
60
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -56,6 +56,6 @@ http_interactions:
|
|
56
56
|
xtbTIjSTUx8ZPl6sdnqlrLgjZW/BitNglY6+vM1I9EmmZuxkwm2F8jxPSlqh
|
57
57
|
FjrqexNoyy6st6rbsHupzispurbOmt/UR3G9/ozY+2QDNA41SCNNz+qq2vNH
|
58
58
|
WMMvSp7QidgAnhC5B4DrH/2cQjXMAgAA
|
59
|
-
http_version:
|
59
|
+
http_version:
|
60
60
|
recorded_at: Fri, 25 Oct 2013 21:20:57 GMT
|
61
61
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/comments?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow&sort=votes
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -69,6 +69,6 @@ http_interactions:
|
|
69
69
|
Fvq+k2BP+U7asfG/xHdA+5DHb0Ha2jXttl2Eet7n8ZavQCzznOWOcbSWM1kU
|
70
70
|
xvtCFHmB0tHPxfbbq0tfqhkyHdlO91KKNZSeB02ngSsYy6P/Syl/TpK/7urW
|
71
71
|
zWKoXLkqV/NkSm0rPj+u3N+7INBdpSxcM6t2NHcIH/8BL3QPXRohAAA=
|
72
|
-
http_version:
|
72
|
+
http_version:
|
73
73
|
recorded_at: Fri, 25 Oct 2013 21:19:29 GMT
|
74
74
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/707894;1004415/favorites?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -69,6 +69,6 @@ http_interactions:
|
|
69
69
|
jNC/xBej0E1Tm9qccMrZG1LKS5bmEl7imZJCck0JSTJ4zWc8WVBV/3Tp3NmL
|
70
70
|
22AHXrSTnSeskiR5FawTXrEYY8SHA8dAisBujBFDjHgKCB/iwbvgzgmGqO7W
|
71
71
|
1otqgLmmC0nOy7Io982t+G/UmQCdK+GqdgSwFo3Tj98AvEvClwkLAAA=
|
72
|
-
http_version:
|
72
|
+
http_version:
|
73
73
|
recorded_at: Fri, 25 Oct 2013 21:21:20 GMT
|
74
74
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/questions/featured?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -48,6 +48,6 @@ http_interactions:
|
|
48
48
|
string: !binary |-
|
49
49
|
H4sIAAAAAAAEAKtWyixJzS1WsoqO1VEqLM0vSYwvSs1NzMzLzEtXsrK0tLCE
|
50
50
|
CecmVihZGRoAgY5SRmJxfG5+UaqSVVpiTnFqLQCBtgUnRgAAAA==
|
51
|
-
http_version:
|
51
|
+
http_version:
|
52
52
|
recorded_at: Fri, 25 Oct 2013 21:20:28 GMT
|
53
53
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/707894;1004415/mentioned?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -92,6 +92,6 @@ http_interactions:
|
|
92
92
|
UaiZvZm919kjvJc9v8EejPwO/MzezN7r7AHB72cvls5GfWlwZm9m71X2aN0e
|
93
93
|
fi97hI+sGs7szew17P1rufj3c17p+8JvdLbNtg+BDhXPajUvb/Sv9VmP+I3l
|
94
94
|
lS7vNzVjVfHsv/4XPfr6fRxJAAA=
|
95
|
-
http_version:
|
95
|
+
http_version:
|
96
96
|
recorded_at: Fri, 25 Oct 2013 21:34:07 GMT
|
97
97
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/questions/no-answers?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -55,6 +55,6 @@ http_interactions:
|
|
55
55
|
lCd52u1loWRW5OqHP2Z59dIeqUXDpKx5ccdfP4OTJnPZDEL/8DDqYq/oOm3n
|
56
56
|
1WAZ0afbeum3db7+r31CDvqNcBoQJGyTDUHyDUFiTfIXAfnmQTG8Rt2B9vgV
|
57
57
|
MHxMlqFxOAAZMr2opXw7PMMDfC5wwonFGXwzrN/hof0D/bUbfHoCAAA=
|
58
|
-
http_version:
|
58
|
+
http_version:
|
59
59
|
recorded_at: Fri, 25 Oct 2013 21:21:34 GMT
|
60
60
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/notifications?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -75,6 +75,6 @@ http_interactions:
|
|
75
75
|
fyBakMch+Ib8wXD4pgh6FqPMxsz+Fb4RsjAaRzHSxW77NLSwRYzxYV7tsRZN
|
76
76
|
2PfZgYleHcUGRudjKzTF8BgY2JU3nyeTw9c1vcYhBYFZHOaojCmWDtp/AXYe
|
77
77
|
uQ+DRAAA
|
78
|
-
http_version:
|
78
|
+
http_version:
|
79
79
|
recorded_at: Fri, 25 Oct 2013 21:20:41 GMT
|
80
80
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/questions?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -62,6 +62,6 @@ http_interactions:
|
|
62
62
|
xc9SrDO45T7xhaFp8ibo6wU9aONvQcLKO+6xcsHJRaI4HLV/nmhyoslHmnyg
|
63
63
|
OSSeAfrLVWc6eCJO9512sjTQSlRUx4o8z6NjuJUPw38YfejykbZsvYSj5n8A
|
64
64
|
DOdzxKEHAAA=
|
65
|
-
http_version:
|
65
|
+
http_version:
|
66
66
|
recorded_at: Fri, 25 Oct 2013 21:20:15 GMT
|
67
67
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/707894;1004415/comments/1300151?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -55,6 +55,6 @@ http_interactions:
|
|
55
55
|
X1aBs8VUXQCrd0BqGDBkGdfohDitiPNBZi/PY/9FxDZ1zVr2IaN79YxOR+Xk
|
56
56
|
/buItuyLAZF/U64EpbHT/hLQw2PC7+VzmK4RTDv2aeqr5yq+ebyNcDr9KuDP
|
57
57
|
3mclI1plnHET9F0n2FvZqr+EW9Mp4EkladdvtP6d0z/thorBpAIAAA==
|
58
|
-
http_version:
|
58
|
+
http_version:
|
59
59
|
recorded_at: Fri, 25 Oct 2013 21:21:19 GMT
|
60
60
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/reputation?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -54,6 +54,6 @@ http_interactions:
|
|
54
54
|
ZDjwx9/8Am+s5hzNqvcIaEDJw788RGmFFauvXhIokmITv+ou7X8nuHcAtdIC
|
55
55
|
OU3P2bxhF10x+MbVbd2eWG4tmZvcuI8UXUgZOLtQNN0wb/DiXoOfvgC71p89
|
56
56
|
OgYAAA==
|
57
|
-
http_version:
|
57
|
+
http_version:
|
58
58
|
recorded_at: Fri, 25 Oct 2013 21:20:29 GMT
|
59
59
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/707894/suggested-edits?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -67,6 +67,6 @@ http_interactions:
|
|
67
67
|
EhnlMc9mCYQuHl8JdAGB0iJPv348YEWcxSw9+3h4V49LYYWLgQICn3tl5Yli
|
68
68
|
MxDSjGVMhDZ/hOpbX17EVwx/AEMU06fBeFla6KTS2KtoVRQ5fzZ38jOWHuML
|
69
69
|
JSldGdQVrRrZOnj6F08QUJopEAAA
|
70
|
-
http_version:
|
70
|
+
http_version:
|
71
71
|
recorded_at: Fri, 25 Oct 2013 21:34:07 GMT
|
72
72
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/707894/tags?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&max=10&min=1&site=stackoverflow&sort=popular
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -55,6 +55,6 @@ http_interactions:
|
|
55
55
|
keuz6RxynzqKR16jtBG5x40i8PD5mBSwWMapqR2pczyOtfNTbxcRdEURcu38
|
56
56
|
ddiW8O5PvVjOolUMqJ1rgZt4S8xdTCsf//Z7EbqH3xLROW3BB5ZA6lpD2Waz
|
57
57
|
Xv40S39+zJ6n/vp6X2rG7+/+BJa6W4KDDQAA
|
58
|
-
http_version:
|
58
|
+
http_version:
|
59
59
|
recorded_at: Fri, 25 Oct 2013 21:20:41 GMT
|
60
60
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/questions/unaccepted?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -60,6 +60,6 @@ http_interactions:
|
|
60
60
|
lLLY0mqlQoc/4TUoyX4RYp3BgYfAF4Tm2X9A/x3QIzbJTk+cZOUjD7JywYlF
|
61
61
|
UtE/dVjPanJSk89qcq+mD7wQ6DdWnRnhiXS6H7WTtYFeoqI8VpXlpjiZe/lA
|
62
62
|
z76kj34+0tZ9gHDG/BcR2lF8bAUAAA==
|
63
|
-
http_version:
|
63
|
+
http_version:
|
64
64
|
recorded_at: Fri, 25 Oct 2013 21:21:21 GMT
|
65
65
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/707894/questions/unanswered?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -72,6 +72,6 @@ http_interactions:
|
|
72
72
|
CzFahUDawW7cclUNfsP2ENXawX8sILvHBgNObrZnHfNxyOfegr7953stszzS
|
73
73
|
FrVb5EVFXtQR2GMFkLQD3ztR0SQqOhL1Odog20OvHZ8b0XKpYF44g0KZ7Jpb
|
74
74
|
vgEJMPx8GbPzdgCz5o0VT/8AzfSC490QAAA=
|
75
|
-
http_version:
|
75
|
+
http_version:
|
76
76
|
recorded_at: Fri, 25 Oct 2013 21:19:59 GMT
|
77
77
|
recorded_with: VCR 2.6.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.stackexchange.com/2.
|
5
|
+
uri: https://api.stackexchange.com/2.2/users/1363236/notifications/unread?access_token=L0J88cciBPHiGtIKCul6Gg))&key=pfllsDjWHeLGWoWIT5rRdA((&site=stackoverflow
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -48,6 +48,6 @@ http_interactions:
|
|
48
48
|
string: !binary |-
|
49
49
|
H4sIAAAAAAAEAKtWyixJzS1WsoqO1VEqLM0vSYwvSs1NzMzLzEtXsrK0NDWF
|
50
50
|
CecmVihZGRoAgY5SRmJxfG5+UaqSVVpiTnFqLQB/t6n0RgAAAA==
|
51
|
-
http_version:
|
51
|
+
http_version:
|
52
52
|
recorded_at: Fri, 25 Oct 2013 21:38:26 GMT
|
53
53
|
recorded_with: VCR 2.6.0
|
data/spec/helper.rb
CHANGED
@@ -9,7 +9,8 @@ module RubyStackoverflow
|
|
9
9
|
it 'should find badges' do
|
10
10
|
VCR.use_cassette('badges') do
|
11
11
|
response = RubyStackoverflow.badges({min: 'gold', max: 'bronze', sort: 'rank'})
|
12
|
-
|
12
|
+
|
13
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
13
14
|
expect(response.data.count).to eq(30)
|
14
15
|
expect(response.data.first.name).to eq('cryptography')
|
15
16
|
end
|
@@ -18,7 +19,8 @@ module RubyStackoverflow
|
|
18
19
|
it 'should find badges by ids' do
|
19
20
|
VCR.use_cassette('badges_by_ids') do
|
20
21
|
response = RubyStackoverflow.badges_by_ids([263, 264], {min: 'gold', max: 'bronze', sort: 'rank'})
|
21
|
-
|
22
|
+
|
23
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
22
24
|
expect(response.data.count).to eq(2)
|
23
25
|
expect(response.data.first.name).to eq('cryptography')
|
24
26
|
end
|
@@ -27,7 +29,8 @@ module RubyStackoverflow
|
|
27
29
|
it 'should find badges by name' do
|
28
30
|
VCR.use_cassette('badges_by_name') do
|
29
31
|
response = RubyStackoverflow.badges_by_name({inname: 'teacher',min: 'gold', max: 'bronze', sort: 'rank'})
|
30
|
-
|
32
|
+
|
33
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
31
34
|
expect(response.data.count).to eq(1)
|
32
35
|
expect(response.data.first.name).to eq('Teacher')
|
33
36
|
end
|
@@ -35,8 +38,9 @@ module RubyStackoverflow
|
|
35
38
|
|
36
39
|
it 'should find recently added badges' do
|
37
40
|
VCR.use_cassette('badges_by_recipients') do
|
38
|
-
response = RubyStackoverflow.badges_between_dates({page: 1, pagesize: 10
|
39
|
-
|
41
|
+
response = RubyStackoverflow.badges_between_dates({page: 1, pagesize: 10})
|
42
|
+
|
43
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
40
44
|
expect(response.data.count).to eq(10)
|
41
45
|
expect(response.data.first.name).to eq('Nice Answer')
|
42
46
|
end
|
@@ -44,8 +48,9 @@ module RubyStackoverflow
|
|
44
48
|
|
45
49
|
it 'should find recently added badges by ids' do
|
46
50
|
VCR.use_cassette('badges_by_recipients_by_ids') do
|
47
|
-
response = RubyStackoverflow.badges_between_dates_by_ids([146, 20],{page: 1, pagesize: 10
|
48
|
-
|
51
|
+
response = RubyStackoverflow.badges_between_dates_by_ids([146, 20],{page: 1, pagesize: 10})
|
52
|
+
|
53
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
49
54
|
expect(response.data.count).to eq(10)
|
50
55
|
expect(response.data.first.name).to eq('Nice Question')
|
51
56
|
end
|
@@ -54,7 +59,8 @@ module RubyStackoverflow
|
|
54
59
|
it 'should find badges by tags' do
|
55
60
|
VCR.use_cassette('badges_by_tags') do
|
56
61
|
response = RubyStackoverflow.badges_by_tags({inname: 'ruby-on-rails',min: 'gold', max: 'bronze', sort: 'rank'})
|
57
|
-
|
62
|
+
|
63
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
58
64
|
expect(response.data.count).to eq(7)
|
59
65
|
expect(response.data.first.name).to eq('ruby-on-rails')
|
60
66
|
end
|
@@ -10,7 +10,8 @@ module RubyStackoverflow
|
|
10
10
|
it 'should fetch comments' do
|
11
11
|
VCR.use_cassette('comments') do
|
12
12
|
response = RubyStackoverflow.comments({min: 1, max: 10, sort: 'votes'})
|
13
|
-
|
13
|
+
|
14
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
14
15
|
expect(response.data.count).to eq(30)
|
15
16
|
expect(response.data.first.edited).to eq(false)
|
16
17
|
expect(response.data.first.score).to eq(10)
|
@@ -20,7 +21,8 @@ module RubyStackoverflow
|
|
20
21
|
it 'should fetch comments by ids' do
|
21
22
|
VCR.use_cassette('comments_by_ids') do
|
22
23
|
response = RubyStackoverflow.comments_by_ids(['129085', '131326'])
|
23
|
-
|
24
|
+
|
25
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
24
26
|
expect(response.data.count).to eq(2)
|
25
27
|
expect(response.data.first.edited).to eq(false)
|
26
28
|
expect(response.data.first.score).to eq(10)
|
@@ -10,23 +10,26 @@ module RubyStackoverflow
|
|
10
10
|
it 'should get questions' do
|
11
11
|
VCR.use_cassette('questions') do
|
12
12
|
response = RubyStackoverflow.questions
|
13
|
-
|
14
|
-
response.data.
|
13
|
+
|
14
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
15
|
+
expect(response.data.last.respond_to?(:answer_count)).to be_truthy
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
19
|
it 'should get questions by id' do
|
19
20
|
VCR.use_cassette('questions_by_ids') do
|
20
21
|
response = RubyStackoverflow.questions_by_ids(['19294359'])
|
21
|
-
|
22
|
-
response.data.
|
22
|
+
|
23
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
24
|
+
expect(response.data.last.respond_to?(:answer_count)).to be_truthy
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
26
28
|
it 'should get answers of questions' do
|
27
29
|
VCR.use_cassette('questions_answers') do
|
28
30
|
response = RubyStackoverflow.answers_of_questions(['16067043','19401289'])
|
29
|
-
|
31
|
+
|
32
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
30
33
|
expect(response.data.last.answers.count).to eq(1)
|
31
34
|
expect(response.data.first.answers.last.answer_id).to eq(19401432)
|
32
35
|
end
|
@@ -36,8 +39,9 @@ module RubyStackoverflow
|
|
36
39
|
VCR.use_cassette('questions_comments') do
|
37
40
|
response = RubyStackoverflow.comments_of_questions(['13804832'])
|
38
41
|
data = response.data.last
|
39
|
-
|
40
|
-
data.
|
42
|
+
|
43
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
44
|
+
expect(data.respond_to?(:comments)).to be_truthy
|
41
45
|
expect(data.comments.first.owner[:user_id]).to eq(87189)
|
42
46
|
end
|
43
47
|
end
|
@@ -45,14 +49,16 @@ module RubyStackoverflow
|
|
45
49
|
it 'should get linked questions' do
|
46
50
|
VCR.use_cassette('linked_questions') do
|
47
51
|
response = RubyStackoverflow.linked_questions(['13804832'])
|
48
|
-
|
52
|
+
|
53
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
49
54
|
end
|
50
55
|
end
|
51
56
|
|
52
57
|
it 'should get related questions' do
|
53
58
|
VCR.use_cassette('related_questions') do
|
54
59
|
response = RubyStackoverflow.related_questions(['13804832'])
|
55
|
-
|
60
|
+
|
61
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
56
62
|
end
|
57
63
|
end
|
58
64
|
|
@@ -60,8 +66,9 @@ module RubyStackoverflow
|
|
60
66
|
VCR.use_cassette('timeline_questions') do
|
61
67
|
response = RubyStackoverflow.timeline_of_questions(['13804832','16067043'])
|
62
68
|
data = response.data.first
|
63
|
-
|
64
|
-
data.
|
69
|
+
|
70
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
71
|
+
expect(data.posts.first.respond_to?(:timeline_type)).to be_truthy
|
65
72
|
expect(data.posts.first.timeline_type).to eq('comment')
|
66
73
|
end
|
67
74
|
end
|
@@ -69,21 +76,24 @@ module RubyStackoverflow
|
|
69
76
|
it 'should get featured questions' do
|
70
77
|
VCR.use_cassette('featured_questions') do
|
71
78
|
response = RubyStackoverflow.featured_questions({page: 1,pagesize: 1})
|
72
|
-
|
79
|
+
|
80
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
73
81
|
end
|
74
82
|
end
|
75
83
|
|
76
84
|
it 'should get unanswered questions' do
|
77
85
|
VCR.use_cassette('unanswered_questions') do
|
78
86
|
response = RubyStackoverflow.unanswered_questions({tagged:'rails',pagesize: 1, page: 1})
|
79
|
-
|
87
|
+
|
88
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
80
89
|
end
|
81
90
|
end
|
82
91
|
|
83
92
|
it 'should get noanswered questions' do
|
84
93
|
VCR.use_cassette('noanswered_questions') do
|
85
94
|
response = RubyStackoverflow.noanswered_questions({tagged:'rails', pagesize: 1, page: 1})
|
86
|
-
|
95
|
+
|
96
|
+
expect(response.data.is_a?(Array)).to be_truthy
|
87
97
|
end
|
88
98
|
end
|
89
99
|
end
|