teamsnap_rb 1.2.0 → 1.3.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 +4 -4
- data/README.md +1 -1
- data/lib/teamsnap/version.rb +1 -1
- data/lib/teamsnap.rb +64 -46
- data/spec/cassettes/apiv3-init.yml +1358 -1229
- data/spec/cassettes/teamsnap_rb/adds_find_if_search_is_available.yml +19 -21
- data/spec/cassettes/teamsnap_rb/adds_href_to_items.yml +8 -8
- data/spec/cassettes/teamsnap_rb/can_follow_plural_links.yml +44 -55
- data/spec/cassettes/teamsnap_rb/can_follow_singular_links.yml +37 -41
- data/spec/cassettes/teamsnap_rb/can_handle_an_empty_bulk_load.yml +14 -22
- data/spec/cassettes/teamsnap_rb/can_handle_an_error_with_bulk_load.yml +12 -14
- data/spec/cassettes/teamsnap_rb/can_handle_errors_generated_by_command.yml +14 -16
- data/spec/cassettes/teamsnap_rb/can_handle_links_with_no_data.yml +29 -45
- data/spec/cassettes/teamsnap_rb/can_use_bulk_load.yml +28 -31
- data/spec/cassettes/teamsnap_rb/handles_executing_an_action_via_commands.yml +18 -26
- data/spec/cassettes/teamsnap_rb/handles_executing_an_action_via_commands_with_multiple_params.yml +2918 -0
- data/spec/cassettes/teamsnap_rb/handles_fetching_data_via_queries.yml +18 -26
- data/spec/cassettes/teamsnap_rb/handles_queries_with_no_data.yml +15 -23
- data/spec/cassettes/teamsnap_rb/raises_an_exception_if_find_returns_nothing.yml +15 -23
- data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_plural_relation_is_called/responds_with_an_array_of_objects_when_successful.yml +28 -40
- data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_plural_relation_is_called/responds_with_an_empty_array_when_no_objects_exist.yml +22 -34
- data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_nil_if_it_does_NOT_exist.yml +22 -34
- data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_the_object_if_it_exists.yml +25 -37
- data/spec/spec_helper.rb +10 -0
- data/spec/teamsnap_spec.rb +72 -9
- metadata +4 -2
@@ -2,53 +2,45 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://localhost:3000/members/disable_member
|
5
|
+
uri: http://localhost:3000/members/disable_member?hmac_client_id=classic&hmac_nonce=f24cecb6-e260-47ae-894e-02034a637dd6&hmac_timestamp=1432825401
|
6
6
|
body:
|
7
|
-
encoding:
|
8
|
-
string: member_id
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"member_id":1}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- Faraday v0.9.1
|
12
|
-
|
13
|
-
-
|
12
|
+
X-Teamsnap-Hmac:
|
13
|
+
- 282a0db41acee0b509ad2a33eb8d63477bad2d6e23dea32263b85f82461a3670
|
14
14
|
response:
|
15
15
|
status:
|
16
16
|
code: 200
|
17
|
-
message:
|
17
|
+
message: OK
|
18
18
|
headers:
|
19
19
|
Content-Type:
|
20
20
|
- application/vnd.collection+json
|
21
21
|
Location:
|
22
|
-
-
|
22
|
+
- "/members/search?id=1"
|
23
23
|
Content-Length:
|
24
|
-
- '
|
24
|
+
- '7263'
|
25
25
|
X-Content-Type-Options:
|
26
26
|
- nosniff
|
27
|
-
|
28
|
-
- '
|
29
|
-
X-Ratelimit-Remaining:
|
30
|
-
- '4868'
|
31
|
-
X-Ratelimit-Reset:
|
32
|
-
- '1428521598'
|
33
|
-
Etag:
|
34
|
-
- '"542fbe04edf54fb34d4b408cd81818cb"'
|
27
|
+
ETag:
|
28
|
+
- '"09d3bab1a7c80a85c9756a2b39124d67"'
|
35
29
|
Cache-Control:
|
36
30
|
- max-age=0, private, must-revalidate
|
37
31
|
X-Request-Id:
|
38
|
-
-
|
32
|
+
- f956eeb4-0e02-4600-86d3-e17c91d3b412
|
39
33
|
X-Runtime:
|
40
|
-
- '0.
|
41
|
-
Server:
|
42
|
-
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
43
|
-
Date:
|
44
|
-
- Wed, 08 Apr 2015 19:24:25 GMT
|
34
|
+
- '0.083138'
|
45
35
|
Connection:
|
46
|
-
-
|
36
|
+
- keep-alive
|
37
|
+
Server:
|
38
|
+
- thin
|
47
39
|
body:
|
48
40
|
encoding: UTF-8
|
49
|
-
string: '{"collection":{"version":"3.
|
41
|
+
string: '{"collection":{"version":"3.72.0","href":"http://localhost:3000/members","template":{"data":[{"name":"first_name","value":null},{"name":"last_name","value":null},{"name":"gender","value":null},{"name":"position","value":null},{"name":"is_manager","value":null},{"name":"birthday","value":null},{"name":"hide_age","value":null},{"name":"hide_address","value":null},{"name":"is_non_player","value":null},{"name":"address_street1","value":null},{"name":"address_street2","value":null},{"name":"address_city","value":null},{"name":"address_state","value":null},{"name":"address_zip","value":null},{"name":"jersey_number","value":null},{"name":"team_id","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"broadcast_emails","href":"http://localhost:3000/broadcast_emails"},{"rel":"broadcast_smses","href":"http://localhost:3000/broadcast_smses"},{"rel":"contact_email_addresses","href":"http://localhost:3000/contact_email_addresses"},{"rel":"contact_phone_numbers","href":"http://localhost:3000/contact_phone_numbers"},{"rel":"contacts","href":"http://localhost:3000/contacts"},{"rel":"custom_data","href":"http://localhost:3000/custom_data"},{"rel":"custom_fields","href":"http://localhost:3000/custom_fields"},{"rel":"league_custom_data","href":"http://localhost:3000/league_custom_data"},{"rel":"league_custom_fields","href":"http://localhost:3000/league_custom_fields"},{"rel":"forum_posts","href":"http://localhost:3000/forum_posts"},{"rel":"forum_subscriptions","href":"http://localhost:3000/forum_subscriptions"},{"rel":"forum_topics","href":"http://localhost:3000/forum_topics"},{"rel":"league_registrant_documents","href":"http://localhost:3000/league_registrant_documents"},{"rel":"member_email_addresses","href":"http://localhost:3000/member_email_addresses"},{"rel":"member_files","href":"http://localhost:3000/member_files"},{"rel":"member_links","href":"http://localhost:3000/member_links"},{"rel":"member_payments","href":"http://localhost:3000/member_payments"},{"rel":"member_phone_numbers","href":"http://localhost:3000/member_phone_numbers"},{"rel":"member_preferences","href":"http://localhost:3000/members_preferences"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data"},{"rel":"tracked_item_statuses","href":"http://localhost:3000/tracked_item_statuses"},{"rel":"user","href":"http://localhost:3000/users"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/members/disable_member"}],"queries":[{"rel":"search","href":"http://localhost:3000/members/search","data":[{"name":"team_id","value":null},{"name":"user_id","value":null},{"name":"id","value":null}]},{"rel":"managers","href":"http://localhost:3000/members/managers","data":[{"name":"team_id","value":null}]},{"rel":"owner","href":"http://localhost:3000/members/owner","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"disable_member","href":"http://localhost:3000/members/disable_member","data":[{"name":"member_id","value":null}]},{"rel":"upload_member_photo","href":"http://localhost:3000/members/upload_member_photo","data":[{"name":"member_id","value":null},{"name":"file","value":null},{"name":"x","value":null},{"name":"y","value":null},{"name":"width","value":null},{"name":"height","value":null}]},{"rel":"remove_member_photo","href":"http://localhost:3000/members/remove_member_photo","data":[{"name":"member_id","value":null}]},{"rel":"generate_member_thumbnail","href":"http://localhost:3000/members/generate_member_thumbnail","data":[{"name":"member_id","value":null},{"name":"x","value":null},{"name":"y","value":null},{"name":"width","value":null},{"name":"height","value":null}]}],"items":[{"href":"http://localhost:3000/members/1","data":[{"name":"id","value":1},{"name":"type","value":"member"},{"name":"address_city","value":null},{"name":"address_state","value":null},{"name":"address_street1","value":null},{"name":"address_street2","value":null},{"name":"address_zip","value":null},{"name":"birthday","value":""},{"name":"first_name","value":"Commie"},{"name":"gender","value":null},{"name":"has_facebook_post_scores_enabled","value":false},{"name":"hide_address","value":null},{"name":"hide_age","value":null},{"name":"invitation_code","value":null},{"name":"invitation_declined","value":null},{"name":"is_activated","value":false},{"name":"is_invitable","value":false},{"name":"is_invited","value":false},{"name":"is_manager","value":true},{"name":"is_non_player","value":true},{"name":"is_owner","value":true},{"name":"is_ownership_pending","value":null},{"name":"jersey_number","value":null},{"name":"last_logged_in_at","value":null,"type":"DateTime"},{"name":"last_name","value":"Commish"},{"name":"position","value":null},{"name":"team_id","value":null},{"name":"user_id","value":null},{"name":"updated_at","value":"2015-05-28T15:03:21Z","type":"DateTime"},{"name":"created_at","value":"2015-05-28T15:02:24Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?member_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?member_id=1"},{"rel":"broadcast_emails","href":"http://localhost:3000/broadcast_emails/search?member_id=1"},{"rel":"broadcast_smses","href":"http://localhost:3000/broadcast_smses/search?member_id=1"},{"rel":"contact_email_addresses","href":"http://localhost:3000/contact_email_addresses/search?member_id=1"},{"rel":"contact_phone_numbers","href":"http://localhost:3000/contact_phone_numbers/search?member_id=1"},{"rel":"contacts","href":"http://localhost:3000/contacts/search?member_id=1"},{"rel":"custom_data","href":"http://localhost:3000/custom_data/search?member_id=1"},{"rel":"custom_fields","href":"http://localhost:3000/custom_fields/search?"},{"rel":"league_custom_data","href":"http://localhost:3000/league_custom_data/search?member_id=1"},{"rel":"league_custom_fields","href":"http://localhost:3000/league_custom_fields/search?"},{"rel":"forum_posts","href":"http://localhost:3000/forum_posts/search?member_id=1"},{"rel":"forum_subscriptions","href":"http://localhost:3000/forum_subscriptions/search?member_id=1"},{"rel":"forum_topics","href":"http://localhost:3000/forum_topics/search?"},{"rel":"league_registrant_documents","href":"http://localhost:3000/league_registrant_documents/search?member_id=1"},{"rel":"member_email_addresses","href":"http://localhost:3000/member_email_addresses/search?member_id=1"},{"rel":"member_files","href":"http://localhost:3000/member_files/search?member_id=1"},{"rel":"member_links","href":"http://localhost:3000/member_links/search?member_id=1"},{"rel":"member_payments","href":"http://localhost:3000/member_payments/search?member_id=1"},{"rel":"member_phone_numbers","href":"http://localhost:3000/member_phone_numbers/search?member_id=1"},{"rel":"member_preferences","href":"http://localhost:3000/members_preferences/1"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data/search?member_id=1"},{"rel":"team","href":"http://localhost:3000/teams/"},{"rel":"tracked_item_statuses","href":"http://localhost:3000/tracked_item_statuses/search?member_id=1"}]}]}}'
|
50
42
|
http_version: '1.1'
|
51
43
|
adapter_metadata:
|
52
|
-
effective_url: http://localhost:3000/members/disable_member
|
53
|
-
recorded_at:
|
44
|
+
effective_url: http://localhost:3000/members/disable_member?hmac_client_id=classic&hmac_nonce=f24cecb6-e260-47ae-894e-02034a637dd6&hmac_timestamp=1432825401
|
45
|
+
recorded_at: Thu, 28 May 2015 15:03:22 GMT
|
54
46
|
recorded_with: VCR 2.9.3
|