mollom_rest_api 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.
- checksums.yaml +15 -0
- data/.gitignore +22 -0
- data/.travis.yml +4 -0
- data/Gemfile +18 -0
- data/Guardfile +4 -0
- data/LICENSE +21 -0
- data/README.md +86 -0
- data/Rakefile +6 -0
- data/lib/mollom_rest_api/exceptions.rb +12 -0
- data/lib/mollom_rest_api/interface.rb +81 -0
- data/lib/mollom_rest_api/v1/blacklist.rb +29 -0
- data/lib/mollom_rest_api/v1/captcha.rb +11 -0
- data/lib/mollom_rest_api/v1/content.rb +12 -0
- data/lib/mollom_rest_api/v1/feedback.rb +14 -0
- data/lib/mollom_rest_api/v1/site.rb +23 -0
- data/lib/mollom_rest_api/v1/whitelist.rb +29 -0
- data/lib/mollom_rest_api/v1.rb +3 -0
- data/lib/mollom_rest_api/version.rb +3 -0
- data/lib/mollom_rest_api/versioned_api.rb +51 -0
- data/lib/mollom_rest_api.rb +31 -0
- data/log/.gitkeep +0 -0
- data/mollom_rest_api.gemspec +21 -0
- data/spec/fixtures/cassette_library/blacklist/create.yml +43 -0
- data/spec/fixtures/cassette_library/blacklist/delete.yml +43 -0
- data/spec/fixtures/cassette_library/blacklist/list.yml +39 -0
- data/spec/fixtures/cassette_library/blacklist/read.yml +41 -0
- data/spec/fixtures/cassette_library/blacklist/update.yml +43 -0
- data/spec/fixtures/cassette_library/captcha/create/default_request.yml +45 -0
- data/spec/fixtures/cassette_library/captcha/create/invalid_type.yml +45 -0
- data/spec/fixtures/cassette_library/captcha/create/valid_request.yml +45 -0
- data/spec/fixtures/cassette_library/captcha/verify/invalid_captcha_id.yml +45 -0
- data/spec/fixtures/cassette_library/captcha/verify/invalid_solution.yml +46 -0
- data/spec/fixtures/cassette_library/captcha/verify/valid_solution.yml +46 -0
- data/spec/fixtures/cassette_library/content/create.yml +46 -0
- data/spec/fixtures/cassette_library/content/update/invalid_content_id.yml +45 -0
- data/spec/fixtures/cassette_library/content/update/valid_request.yml +45 -0
- data/spec/fixtures/cassette_library/feedback/add/captcha_request.yml +45 -0
- data/spec/fixtures/cassette_library/feedback/add/content_request.yml +45 -0
- data/spec/fixtures/cassette_library/interface/some_api/a_post_action.yml +32 -0
- data/spec/fixtures/cassette_library/interface/some_api/an_overriden_get_action.yml +26 -0
- data/spec/fixtures/cassette_library/interface/some_api/an_overriden_post_action.yml +32 -0
- data/spec/fixtures/cassette_library/interface/some_api/delete.yml +26 -0
- data/spec/fixtures/cassette_library/interface/some_api/list.yml +26 -0
- data/spec/fixtures/cassette_library/invalid_request.yml +59 -0
- data/spec/fixtures/cassette_library/site/create.yml +45 -0
- data/spec/fixtures/cassette_library/site/delete.yml +45 -0
- data/spec/fixtures/cassette_library/site/list.yml +75 -0
- data/spec/fixtures/cassette_library/site/read.yml +41 -0
- data/spec/fixtures/cassette_library/site/update.yml +43 -0
- data/spec/fixtures/cassette_library/whitelist/create.yml +43 -0
- data/spec/fixtures/cassette_library/whitelist/delete.yml +43 -0
- data/spec/fixtures/cassette_library/whitelist/list.yml +41 -0
- data/spec/fixtures/cassette_library/whitelist/read.yml +39 -0
- data/spec/fixtures/cassette_library/whitelist/update.yml +43 -0
- data/spec/fixtures/v_test_01.rb +27 -0
- data/spec/mollom_rest_api/exceptions_spec.rb +25 -0
- data/spec/mollom_rest_api/interface_spec.rb +43 -0
- data/spec/mollom_rest_api/v1/blacklist_spec.rb +64 -0
- data/spec/mollom_rest_api/v1/captcha_spec.rb +63 -0
- data/spec/mollom_rest_api/v1/content_spec.rb +41 -0
- data/spec/mollom_rest_api/v1/feedback_spec.rb +37 -0
- data/spec/mollom_rest_api/v1/site_spec.rb +63 -0
- data/spec/mollom_rest_api/v1/whitelist_spec.rb +64 -0
- data/spec/mollom_rest_api/v1_spec.rb +9 -0
- data/spec/mollom_rest_api/version_spec.rb +5 -0
- data/spec/mollom_rest_api/versioned_api_spec.rb +26 -0
- data/spec/mollom_rest_api_spec.rb +30 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/support/macros/alternate_syntax_macro.rb +38 -0
- data/spec/support/shared_examples/api_error_handling.rb +33 -0
- data/spec/support/vcr.rb +37 -0
- metadata +192 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: http://dev.mollom.com/v1/blacklist/1lgj17lzuezlu1bn9ry4k3qz4k8nr42n/68172853-2a81-4899-b09a-ff1f1bad88aa
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Authorization:
|
|
17
|
+
- OAuth oauth_consumer_key="b06465615b3a8800ef79ca947b1addca", oauth_nonce="NJsVNVkvowTtsP6qGhwVqmh7m1tDaivhVPHiJDegKU",
|
|
18
|
+
oauth_signature="Ss01ibLBoYUw1mRmNpVQdZqp1E4%3D", oauth_signature_method="HMAC-SHA1",
|
|
19
|
+
oauth_timestamp="1410452880", oauth_version="1.0"
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
X-Powered-By:
|
|
26
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
27
|
+
Corporation/1.7)
|
|
28
|
+
Server:
|
|
29
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
30
|
+
Content-Type:
|
|
31
|
+
- application/json
|
|
32
|
+
Transfer-Encoding:
|
|
33
|
+
- chunked
|
|
34
|
+
Date:
|
|
35
|
+
- Thu, 11 Sep 2014 16:25:04 GMT
|
|
36
|
+
body:
|
|
37
|
+
encoding: UTF-8
|
|
38
|
+
string: '{"code":"200","entry":{"context":"allFields","created":"1410452568617","id":"68172853-2a81-4899-b09a-ff1f1bad88aa","match":"contains","note":"","reason":"unwanted","status":"1","value":"text"}}'
|
|
39
|
+
http_version:
|
|
40
|
+
recorded_at: Thu, 11 Sep 2014 16:28:00 GMT
|
|
41
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/blacklist/1lgj17lzuezlu1bn9ry4k3qz4k8nr42n/42a51362-bab6-4256-8e28-60d5df568250
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: reason=profanity&value=patate
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
User-Agent:
|
|
13
|
+
- OAuth gem v0.4.7
|
|
14
|
+
Content-Length:
|
|
15
|
+
- '0'
|
|
16
|
+
Content-Type:
|
|
17
|
+
- application/x-www-form-urlencoded
|
|
18
|
+
Authorization:
|
|
19
|
+
- OAuth oauth_consumer_key="b06465615b3a8800ef79ca947b1addca", oauth_nonce="rcfXhqJGIZ3xmkIQU2iZ9ttmAEptalDjaqEDRHq90",
|
|
20
|
+
oauth_signature="yvE7DZFBEqT3WU6Q7HClPEeLfsU%3D", oauth_signature_method="HMAC-SHA1",
|
|
21
|
+
oauth_timestamp="1410367899", oauth_version="1.0"
|
|
22
|
+
response:
|
|
23
|
+
status:
|
|
24
|
+
code: 200
|
|
25
|
+
message: OK
|
|
26
|
+
headers:
|
|
27
|
+
X-Powered-By:
|
|
28
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
29
|
+
Corporation/1.7)
|
|
30
|
+
Server:
|
|
31
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
32
|
+
Content-Type:
|
|
33
|
+
- application/json
|
|
34
|
+
Date:
|
|
35
|
+
- Tue, 02 Sep 2014 17:09:45 GMT
|
|
36
|
+
Connection:
|
|
37
|
+
- close
|
|
38
|
+
body:
|
|
39
|
+
encoding: US-ASCII
|
|
40
|
+
string: ! '{"code":"200","entry":{"context":"allFields","created":"1409677772829","id":"41a0e033-3d6a-465b-87d5-1ef60476da62","match":"contains","note":"","reason":"profanity","status":"1","value":"patate"}}'
|
|
41
|
+
http_version:
|
|
42
|
+
recorded_at: Tue, 02 Sep 2014 17:09:00 GMT
|
|
43
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/captcha
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: type=image
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="I7JJCyyuOkyZzoNHAhhToB8APEMp1virbusONALDWA",
|
|
22
|
+
oauth_signature="YAPOhUK4r39B7EXphteGj2BEYvQ%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403708380", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Wed, 25 Jun 2014 15:01:00 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200","captcha":{"id":"TEST1wquvxygw6nkom","url":"http://dev.mollom.com/v1/captcha/TEST1wquvxygw6nkom.png"}}'
|
|
43
|
+
http_version:
|
|
44
|
+
recorded_at: Wed, 25 Jun 2014 14:59:40 GMT
|
|
45
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/captcha
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: type=foobar
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="3FmcNWXmkeAXa4YWFb9kdmZw7uUR49zRIPaL2MQAkI",
|
|
22
|
+
oauth_signature="BnGynDQobVUH6TvNtqca1N%2FMdEM%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403708429", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Wed, 25 Jun 2014 15:01:49 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200","captcha":{"id":"TEST1ddgajo9ldvw11","url":"http://dev.mollom.com/v1/captcha/TEST1ddgajo9ldvw11.mp3"}}'
|
|
43
|
+
http_version:
|
|
44
|
+
recorded_at: Wed, 25 Jun 2014 15:00:30 GMT
|
|
45
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/captcha
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ssl=1&type=audio
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="eF8rrfS80DNHxRrefCIS4G1gbfHksxYrhvlbhZmbz2I",
|
|
22
|
+
oauth_signature="pKOM%2F7Ymtm%2FBN9vBnfWgorPr7jI%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403708430", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Wed, 25 Jun 2014 15:01:49 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200","captcha":{"id":"TEST190gkt2utz449q","url":"https://dev.mollom.com/v1/captcha/TEST190gkt2utz449q.mp3"}}'
|
|
43
|
+
http_version:
|
|
44
|
+
recorded_at: Wed, 25 Jun 2014 15:00:30 GMT
|
|
45
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/captcha/inexistent_id
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: solution=solution
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="76mDExdsBWt5hD4x7z8iPU4xFi0g4q30okKWneGWNE",
|
|
22
|
+
oauth_signature="7%2F5ZUOxK7CTAGIDKAmKTEFNJOmM%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403708864", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 404
|
|
27
|
+
message: Not Found
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Wed, 25 Jun 2014 15:09:03 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"404","message":"Captcha not found."}'
|
|
43
|
+
http_version:
|
|
44
|
+
recorded_at: Wed, 25 Jun 2014 15:07:44 GMT
|
|
45
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/captcha/TEST15yj59df1pwv01
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: solution=invalid_solution
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="s84zBST9168vqVhgsiE4XxxjP8Bt470Akx20plFt0",
|
|
22
|
+
oauth_signature="ZR61V9E0JrIOZAARFPnyiux%2BLT8%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403708811", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Wed, 25 Jun 2014 15:08:12 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200","captcha":{"id":"TEST15yj59df1pwv01","solved":"0","reason":"invalid_solution
|
|
43
|
+
is not the correct solution."}}'
|
|
44
|
+
http_version:
|
|
45
|
+
recorded_at: Wed, 25 Jun 2014 15:06:52 GMT
|
|
46
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/captcha/TEST1qravn2ikcz0k1
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: solution=correct
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="BA6Z75guepi0WDXPpTZpGQ3TMJ0TeRrNYBO4dRq8",
|
|
22
|
+
oauth_signature="YnQuwZxDPQF66PpJhg6isLrqtk4%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403708812", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Wed, 25 Jun 2014 15:08:12 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200","captcha":{"id":"TEST1qravn2ikcz0k1","solved":"1","reason":"Correct
|
|
43
|
+
response to image captcha."}}'
|
|
44
|
+
http_version:
|
|
45
|
+
recorded_at: Wed, 25 Jun 2014 15:06:52 GMT
|
|
46
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/content
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: authorName=Jean-Luc%20Picard&postBody=Some%20text%20right%20over%20here%21&postTitle=My%20Title
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="W4ny3BPOWLl8E71ysa2w4lcJPr1LDHDg4yKIDVF7Y",
|
|
22
|
+
oauth_signature="n1Ycqalo4VOH5zAhid%2FpRZ9piBM%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403703780", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Wed, 25 Jun 2014 13:44:21 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200","content":{"id":"TEST1up51ut7qyu2b1","spamScore":"0.5","reason":"some
|
|
43
|
+
secret reason","postTitle":"My Title","postBody":"Some text right over here!","spamClassification":"unsure"}}'
|
|
44
|
+
http_version:
|
|
45
|
+
recorded_at: Wed, 25 Jun 2014 13:43:01 GMT
|
|
46
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/content/inexistent_content_id
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="Dk8yZAXRleXBbFekFyeClOV9Dn9rw3NGs6z77m5b38",
|
|
22
|
+
oauth_signature="PVYKdnNfR5lnNnRmye2f0zhnBSM%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403883400", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 404
|
|
27
|
+
message: Not Found
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Fri, 27 Jun 2014 15:38:01 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"404","message":"Content not found."}'
|
|
43
|
+
http_version:
|
|
44
|
+
recorded_at: Fri, 27 Jun 2014 15:36:40 GMT
|
|
45
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/content/TESTmh3q39o9ktwj13
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: checks=spam&postBody=My%20modified%20body%21
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="qroaXT4mKj3rIwC2lfpkgysGhHiCPApuo0Qm3gq5Mw",
|
|
22
|
+
oauth_signature="b5ztrWOozW88e%2BWXjFqCOaT2jkU%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403894412", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Fri, 27 Jun 2014 18:41:34 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200","content":{"id":"TESTmh3q39o9ktwj13","spamScore":"0.5","reason":"some
|
|
43
|
+
secret reason","postBody":"My modified body!","spamClassification":"unsure"}}'
|
|
44
|
+
http_version:
|
|
45
|
+
recorded_at: Fri, 27 Jun 2014 18:40:12 GMT
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/feedback
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: captchaId=some_id&reason=spam
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="GM9dXMyg8c1dy6qQVXqt4VObIZWsZyocVVuKLP3bU",
|
|
22
|
+
oauth_signature="TTsVO%2F4Ak9xJE17ywsP6WRV3BYI%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403903186", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Fri, 27 Jun 2014 21:07:49 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200"}'
|
|
43
|
+
http_version:
|
|
44
|
+
recorded_at: Fri, 27 Jun 2014 21:06:26 GMT
|
|
45
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/v1/feedback
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: contentId=some_id&reason=spam
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="FFGQvyx3RjG733u2ceSu3xJBPq63BVAMiNOkQdLEsM",
|
|
22
|
+
oauth_signature="UPxk8Bp5qla8L38TGp3lLwOM7S4%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403903186", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
headers:
|
|
29
|
+
X-Powered-By:
|
|
30
|
+
- Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle
|
|
31
|
+
Corporation/1.7)
|
|
32
|
+
Server:
|
|
33
|
+
- GlassFish Server Open Source Edition 3.1.2.2
|
|
34
|
+
Content-Type:
|
|
35
|
+
- application/json
|
|
36
|
+
Date:
|
|
37
|
+
- Fri, 27 Jun 2014 21:07:49 GMT
|
|
38
|
+
Connection:
|
|
39
|
+
- close
|
|
40
|
+
body:
|
|
41
|
+
encoding: UTF-8
|
|
42
|
+
string: '{"code":"200"}'
|
|
43
|
+
http_version:
|
|
44
|
+
recorded_at: Fri, 27 Jun 2014 21:06:26 GMT
|
|
45
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/vtest01/ticket
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="5AEpaNryO7al2Ukkx6syc12oBt7eXTMx4BivFwRHI",
|
|
22
|
+
oauth_signature="nkPENheGqCfWAVEMUzt9YntS1KI%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403711119", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
body:
|
|
29
|
+
encoding: UTF-8
|
|
30
|
+
string: '{"code":"200","ticket":"Valid response."}'
|
|
31
|
+
recorded_at: Wed, 25 Jun 2014 15:45:19 GMT
|
|
32
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: http://dev.mollom.com/vtest01/ticket/list?status=active
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
User-Agent:
|
|
13
|
+
- OAuth gem v0.4.7
|
|
14
|
+
Authorization:
|
|
15
|
+
- OAuth oauth_consumer_key="1mkno2c8bsepo12ewu7v0mmpxro77o3u", oauth_nonce="SEXVLHY0YeAwgEblr04n7EVraDtDALwNWIXP77ms",
|
|
16
|
+
oauth_signature="C1TiejQ0csF2nu3A9Ldm23rMnmY%3D", oauth_signature_method="HMAC-SHA1",
|
|
17
|
+
oauth_timestamp="1407346386", oauth_version="1.0"
|
|
18
|
+
response:
|
|
19
|
+
status:
|
|
20
|
+
code: 200
|
|
21
|
+
message: OK
|
|
22
|
+
body:
|
|
23
|
+
encoding: UTF-8
|
|
24
|
+
string: '{"code":"200","ticket":"Valid response."}'
|
|
25
|
+
recorded_at: Wed, 25 Jun 2014 15:45:19 GMT
|
|
26
|
+
recorded_with: VCR 2.9.2
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: http://dev.mollom.com/vtest01/ticket/delete
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: authorId=9
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- application/json
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
User-Agent:
|
|
15
|
+
- OAuth gem v0.4.7
|
|
16
|
+
Content-Length:
|
|
17
|
+
- '0'
|
|
18
|
+
Content-Type:
|
|
19
|
+
- application/x-www-form-urlencoded
|
|
20
|
+
Authorization:
|
|
21
|
+
- OAuth oauth_consumer_key="1ldx8h5kvvdsp108es5r54yidl1r8z75", oauth_nonce="rtNmz42BsvYnXzF2rxsmxwmVTccQ1m5oFYW9wVhZg9o",
|
|
22
|
+
oauth_signature="eyIWjDqHk6omwsBZhMvZ9R389yk%3D", oauth_signature_method="HMAC-SHA1",
|
|
23
|
+
oauth_timestamp="1403711119", oauth_version="1.0"
|
|
24
|
+
response:
|
|
25
|
+
status:
|
|
26
|
+
code: 200
|
|
27
|
+
message: OK
|
|
28
|
+
body:
|
|
29
|
+
encoding: UTF-8
|
|
30
|
+
string: '{"code":"200","ticket":"Valid response."}'
|
|
31
|
+
recorded_at: Wed, 25 Jun 2014 15:45:19 GMT
|
|
32
|
+
recorded_with: VCR 2.9.2
|