impermium 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/MIT-LICENSE.txt +20 -0
- data/README.md +118 -0
- data/Rakefile +7 -0
- data/impermium.gemspec +31 -0
- data/lib/faraday/raise_4xx.rb +18 -0
- data/lib/impermium/client.rb +57 -0
- data/lib/impermium/configuration.rb +44 -0
- data/lib/impermium/content/blog_post.rb +38 -0
- data/lib/impermium/content/bookmark.rb +47 -0
- data/lib/impermium/content/comment.rb +38 -0
- data/lib/impermium/content/connection.rb +42 -0
- data/lib/impermium/content/listing.rb +37 -0
- data/lib/impermium/content.rb +15 -0
- data/lib/impermium/errors.rb +25 -0
- data/lib/impermium/user/account.rb +50 -0
- data/lib/impermium/user/profile.rb +35 -0
- data/lib/impermium/user.rb +9 -0
- data/lib/impermium/version.rb +3 -0
- data/lib/impermium.rb +20 -0
- data/spec/.gitignore +1 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_blog_post_id.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_post_id.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_post_permalink.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_url.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_content.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_enduser_ip.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_user_id.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/successful_blog_post_request.yml +39 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_blog_post_id.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_bookmark_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_bookmark_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_bookmark_url.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_like_value.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_bookmark_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_bookmark_url.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_bookmark_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_comment_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_article_permalink.yml +43 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_comment_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_comment_permalink.yml +43 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_content.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_enduser_ip.yml +43 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_user_id.yml +43 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/successful_request.yml +39 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_comment_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/invalid_connection_type_value.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_connection_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_connection_type.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/invalid_connection_type_value.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/invalid_operation_value.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_connection_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_connection_type.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_requester_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_responder_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/successful_follow_connection_request.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/successful_follow_connection_response.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/successful_friend_connection_request.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/successful_friend_connection_response.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/invalid_connection_type_value.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_connection_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_connection_type.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_listing_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_content.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_listing_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_listing_permalink.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_listing_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/successful_account_analyst_feedback_method_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_attempt_method/missing_arguments.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_attempt_method/successful_account_attempt_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_login_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_login_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_login_method/successful_account_login_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_method/successful_account_method_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_analyst_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_desired_result.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_profile_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_profile_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_method/successful_request.yml +38 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_profile_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/successful_request.yml +38 -0
- data/spec/configuration.yml.sample +3 -0
- data/spec/impermium/client_spec.rb +67 -0
- data/spec/impermium/content/blog_post_spec.rb +173 -0
- data/spec/impermium/content/bookmark_spec.rb +205 -0
- data/spec/impermium/content/comment_spec.rb +178 -0
- data/spec/impermium/content/connection_spec.rb +257 -0
- data/spec/impermium/content/listing_spec.rb +169 -0
- data/spec/impermium/user/account_spec.rb +184 -0
- data/spec/impermium/user/profile_spec.rb +154 -0
- data/spec/spec_helper.rb +32 -0
- metadata +433 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/listing/user_feedback/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"reporter_user_id":"r3p0rt3r","reporter_user_type":"ENDUSER","reporter_ip":"1.1.1.1","listing_id":"78912li","desired_result":{"spam_classifier":{"label":"notspam"}}}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:37 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"timestamp":"20120306111737Z","response_id":"CLID-1253-EVENTS2001-0306111737-FAEC5B4A-677D-11E1-BEE8-014AFFBDFCB2"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 06 Mar 2012 11:17:37 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/analyst_feedback/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"analyst_id":null,"user_id":"whi543","desired_result":{"spam_classifier":{"label":"notspam"}}}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:44 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Required element ''analyst_id'' could
|
39
|
+
not be found)"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:45 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/analyst_feedback/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"analyst_id":"123456","user_id":null,"desired_result":{"spam_classifier":{"label":"notspam"}}}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:45 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Required element ''user_id'' could not
|
39
|
+
be found)"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:45 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/analyst_feedback/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"analyst_id":"123456","user_id":"whi543","desired_result":{"spam_classifier":{"label":"notspam"}}}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:46 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"timestamp":"20120306111746Z","response_id":"CLID-1253-EVENTS2001-0306111746-000B46AE-677E-11E1-A982-014AFFBDFCB2"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 06 Mar 2012 11:17:46 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
data/spec/cassettes/user_API_section/account_object/account_attempt_method/missing_arguments.yml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/attempt/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"enduser_ip":""}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:41 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Value '''' is not of type ''ipv4'' for
|
39
|
+
element ''enduser_ip'')"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:41 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/attempt/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"enduser_ip":"1.1.1.1"}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:42 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"timestamp":"20120306111742Z","response_id":"CLID-1253-EVENTS2001-0306111742-FDC90FB6-677D-11E1-A87B-014AFFBDFCB2"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 06 Mar 2012 11:17:42 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/login/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"user_id":"whi543","enduser_ip":""}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:43 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Value '''' is not of type ''ipv4'' for
|
39
|
+
element ''enduser_ip'')"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:43 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/login/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"user_id":null,"enduser_ip":"1.1.1.1"}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:42 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Required element ''user_id'' could not
|
39
|
+
be found)"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:43 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/login/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"user_id":"whi543","enduser_ip":"1.1.1.1"}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:44 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"timestamp":"20120306111744Z","response_id":"CLID-1253-EVENTS2001-0306111744-FEEB0002-677D-11E1-ACEB-014AFFBDFCB2"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 06 Mar 2012 11:17:44 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"user_id":"whi543","enduser_ip":""}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:40 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Value '''' is not of type ''ipv4'' for
|
39
|
+
element ''enduser_ip'')"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:40 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"user_id":null,"enduser_ip":"1.1.1.1"}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:39 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Required element ''user_id'' could not
|
39
|
+
be found)"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:39 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"user_id":"whi543","enduser_ip":"1.1.1.1"}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:40 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"timestamp":"20120306111741Z","spam_classifier":{"label":"notspam","score":"-0.729003665653208","risk":"low"},"response_id":"CLID-1253-EVENTS2001-0306111741-FCF13DA2-677D-11E1-8E44-014AFFBDFCB2"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 06 Mar 2012 11:17:41 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/user_feedback/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"reporter_user_id":"whi789","reporter_user_type":"ENDUSER","reporter_ip":"1.1.1.1","user_id":"whi543","desired_result":{"spam_classifier":{"label":"notspam"}}}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:47 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"timestamp":"20120306111747Z","response_id":"CLID-1253-EVENTS2001-0306111747-00C6C5FA-677E-11E1-ABD9-014AFFBDFCB2"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Tue, 06 Mar 2012 11:17:47 GMT
|
38
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/user_feedback/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"reporter_user_id":"whi789","reporter_user_type":"MODERATOR","reporter_ip":"1.1.1.1","user_id":"whi543","desired_result":null}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:49 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Required element ''desired_result'' could
|
39
|
+
not be found)"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:49 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/user_feedback/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"reporter_user_id":"whi789","reporter_user_type":"MODERATOR","reporter_ip":"","user_id":"whi543","desired_result":{"spam_classifier":{"label":"notspam"}}}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:47 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Value '''' is not of type ''ipv4'' for
|
39
|
+
element ''reporter_ip'')"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:48 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api-test.impermium.com/account/user_feedback/3.1/REMOVED-API-KEY-VALUE/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"reporter_user_id":null,"reporter_user_type":"MODERATOR","reporter_ip":"1.1.1.1","user_id":"whi543","desired_result":{"spam_classifier":{"label":"notspam"}}}'
|
9
|
+
headers:
|
10
|
+
Http-User-Agent:
|
11
|
+
- Impermium Ruby Gem
|
12
|
+
Http-Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept:
|
17
|
+
- ! '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Tue, 06 Mar 2012 11:17:46 GMT
|
27
|
+
Server:
|
28
|
+
- Apache/2.2.14 (Ubuntu)
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{"status":400,"hostname":"events2001.impermium.com","message":"Unable
|
38
|
+
to verify the schema of the event: (Required element ''reporter_user_id''
|
39
|
+
could not be found)"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 06 Mar 2012 11:17:46 GMT
|
42
|
+
recorded_with: VCR 2.0.0
|