teamsnap_rb 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -1
  3. data/lib/teamsnap.rb +58 -18
  4. data/lib/teamsnap/version.rb +1 -1
  5. data/spec/cassettes/apiv3-init.yml +312 -2476
  6. data/spec/cassettes/teamsnap_rb/adds_find_if_search_is_available.yml +24 -15
  7. data/spec/cassettes/teamsnap_rb/adds_href_to_items.yml +20 -20
  8. data/spec/cassettes/teamsnap_rb/can_follow_plural_links.yml +66 -39
  9. data/spec/cassettes/teamsnap_rb/can_follow_singular_links.yml +43 -28
  10. data/spec/cassettes/teamsnap_rb/can_handle_an_empty_bulk_load.yml +30 -14
  11. data/spec/cassettes/teamsnap_rb/can_handle_an_error_with_bulk_load.yml +16 -10
  12. data/spec/cassettes/teamsnap_rb/can_handle_errors_generated_by_command.yml +17 -17
  13. data/spec/cassettes/teamsnap_rb/can_handle_links_with_no_data.yml +38 -26
  14. data/spec/cassettes/teamsnap_rb/can_use_bulk_load.yml +40 -24
  15. data/spec/cassettes/teamsnap_rb/handles_executing_an_action_via_commands.yml +20 -14
  16. data/spec/cassettes/teamsnap_rb/handles_executing_an_action_via_commands_with_multiple_params.yml +341 -2814
  17. data/spec/cassettes/teamsnap_rb/handles_fetching_data_via_queries.yml +24 -15
  18. data/spec/cassettes/teamsnap_rb/handles_queries_with_no_data.yml +30 -15
  19. data/spec/cassettes/teamsnap_rb/raises_an_exception_if_find_returns_nothing.yml +30 -15
  20. 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 +49 -46
  21. 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 +41 -26
  22. 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 +43 -28
  23. data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_the_object_if_it_exists.yml +48 -30
  24. data/spec/spec_helper.rb +3 -0
  25. data/spec/teamsnap_spec.rb +1 -68
  26. metadata +3 -3
@@ -8,9 +8,9 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.9.1
11
+ - Faraday v0.9.2
12
12
  Authorization:
13
- - Bearer 1-classic-dont_tell_the_cops
13
+ - Bearer 6-classic-dont_tell_the_cops
14
14
  response:
15
15
  status:
16
16
  code: 200
@@ -19,37 +19,46 @@ http_interactions:
19
19
  Content-Type:
20
20
  - application/vnd.collection+json
21
21
  Content-Length:
22
- - '4993'
22
+ - '6138'
23
+ Connection:
24
+ - keep-alive
25
+ Status:
26
+ - 200 OK
23
27
  X-Content-Type-Options:
24
28
  - nosniff
25
29
  X-RateLimit-Limit:
26
30
  - '5000'
27
31
  X-RateLimit-Remaining:
28
- - '4863'
32
+ - '4871'
29
33
  X-RateLimit-Reset:
30
- - '1432828850'
34
+ - '1444790104'
31
35
  ETag:
32
- - '"aacd8fb2517e31f6d3baafe13ad189cb"'
36
+ - '"a37e218dfd014c0c1f8680050ee2ed3b"'
33
37
  Cache-Control:
34
38
  - max-age=0, private, must-revalidate
35
39
  X-Request-Id:
36
- - 3a8135e6-4da3-4245-9163-d81dd8313e2b
40
+ - 2629bb8c-0819-4c75-bf3b-8f21f2424796
37
41
  X-Runtime:
38
- - '0.030817'
39
- Connection:
40
- - keep-alive
42
+ - '0.083605'
43
+ X-Powered-By:
44
+ - Phusion Passenger 4.0.48
45
+ Date:
46
+ - Wed, 14 Oct 2015 02:03:40 GMT
41
47
  Server:
42
- - thin
48
+ - nginx/1.6.2 + Phusion Passenger 4.0.48
43
49
  body:
44
50
  encoding: UTF-8
45
- string: '{"collection":{"version":"3.72.0","href":"http://localhost:3000/events","template":{"data":[{"name":"repeating_type_code","value":null},{"name":"is_game","value":null},{"name":"start_date","value":null},{"name":"is_tbd","value":null},{"name":"name","value":null},{"name":"label","value":null},{"name":"game_type_code","value":null},{"name":"icon_color","value":null},{"name":"minutes_to_arrive_early","value":null},{"name":"duration_in_minutes","value":null},{"name":"notes","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"doesnt_count_towards_record","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"tracks_availability","value":null},{"name":"uniform","value":null},{"name":"is_canceled","value":null},{"name":"notify_team","value":null},{"name":"notify_team_as_member_id","value":null},{"name":"notify_opponent","value":null},{"name":"notify_opponent_contacts_name","value":null},{"name":"notify_opponent_contacts_email","value":null},{"name":"notify_opponent_notes","value":null},{"name":"team_id","value":null},{"name":"division_location_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"repeating_until","value":null},{"name":"repeating_include","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"division_location","href":"http://localhost:3000/division_locations"},{"rel":"location","href":"http://localhost:3000/locations"},{"rel":"opponent","href":"http://localhost:3000/opponents"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/events/search?id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/events/search","data":[{"name":"team_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"started_after","value":null},{"name":"started_before","value":null},{"name":"id","value":null}]},{"rel":"search_games","href":"http://localhost:3000/events/search_games","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"send_availability_reminders","href":"http://localhost:3000/events/send_availability_reminders","prompt":"members_to_notify
46
- = (all|unset)","data":[{"name":"id","value":null},{"name":"members_to_notify","value":null},{"name":"notify_team_as_member_id","value":null}]}],"items":[{"href":"http://localhost:3000/events/1","data":[{"name":"id","value":1},{"name":"type","value":"event"},{"name":"arrival_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"division_location_id","value":null},{"name":"doesnt_count_towards_record","value":false},{"name":"duration_in_minutes","value":120},{"name":"end_date","value":"2015-01-01T02:00:00Z","type":"DateTime"},{"name":"formatted_results","value":null},{"name":"game_type","value":"Not
51
+ string: '{"collection":{"version":"3.119.0","href":"http://localhost:3000/events","template":{"data":[{"name":"repeating_type_code","value":null},{"name":"is_game","value":null},{"name":"start_date","value":null},{"name":"is_tbd","value":null},{"name":"name","value":null},{"name":"label","value":null},{"name":"game_type_code","value":null},{"name":"icon_color","value":null},{"name":"minutes_to_arrive_early","value":null},{"name":"duration_in_minutes","value":null},{"name":"notes","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"doesnt_count_towards_record","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"tracks_availability","value":null},{"name":"uniform","value":null},{"name":"is_canceled","value":null},{"name":"notify_team","value":null},{"name":"notify_team_as_member_id","value":null},{"name":"notify_opponent","value":null},{"name":"notify_opponent_contacts_name","value":null},{"name":"notify_opponent_contacts_email","value":null},{"name":"notify_opponent_notes","value":null},{"name":"team_id","value":null},{"name":"division_location_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"repeating_until","value":null},{"name":"repeating_include","value":null},{"name":"time_zone","value":null},{"name":"browser_time_zone","value":null},{"name":"additional_location_details","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"division_location","href":"http://localhost:3000/division_locations"},{"rel":"location","href":"http://localhost:3000/locations"},{"rel":"opponent","href":"http://localhost:3000/opponents"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000//events/search?id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/events/search","data":[{"name":"team_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"started_after","value":null},{"name":"started_before","value":null},{"name":"id","value":null}]},{"rel":"search_games","href":"http://localhost:3000/events/search_games","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"send_availability_reminders","href":"http://localhost:3000/events/send_availability_reminders","prompt":"members_to_notify
52
+ = [member_id, member_id]","data":[{"name":"id","value":null},{"name":"members_to_notify","value":null},{"name":"notify_team_as_member_id","value":null}]},{"rel":"update_final_score","href":"http://localhost:3000/events/update_final_score","prompt":"Update
53
+ the final score for an event","data":[{"name":"id","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"results","value":null},{"name":"results_url","value":null}]}],"items":[{"href":"http://localhost:3000/events/1","data":[{"name":"id","value":1},{"name":"type","value":"event"},{"name":"additional_location_details","value":null},{"name":"arrival_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"division_location_id","value":null},{"name":"doesnt_count_towards_record","value":false},{"name":"duration_in_minutes","value":120},{"name":"end_date","value":"2015-01-01T02:00:00Z","type":"DateTime"},{"name":"formatted_results","value":null},{"name":"game_type","value":"Not
47
54
  Specified"},{"name":"game_type_code","value":null},{"name":"icon_color","value":"blue"},{"name":"is_canceled","value":false},{"name":"is_game","value":false},{"name":"is_overtime","value":false},{"name":"is_shootout","value":false},{"name":"is_tbd","value":false},{"name":"label","value":null},{"name":"location_id","value":1},{"name":"minutes_to_arrive_early","value":null},{"name":"name","value":"March
48
- Madness Game 1"},{"name":"notes","value":null},{"name":"opponent_id","value":1},{"name":"points_for_opponent","value":null},{"name":"points_for_team","value":null},{"name":"repeating_type","value":null},{"name":"repeating_type_code","value":null},{"name":"repeating_uuid","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"start_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"team_id","value":1},{"name":"tracks_availability","value":true},{"name":"uniform","value":null},{"name":"is_league_controlled","value":false},{"name":"created_at","value":"2015-05-28T15:02:24Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-28T15:02:26Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?event_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?event_id=1"},{"rel":"division_location","href":"http://localhost:3000/division_locations/"},{"rel":"location","href":"http://localhost:3000/locations/1"},{"rel":"opponent","href":"http://localhost:3000/opponents/1"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data/search?event_id=1"},{"rel":"team","href":"http://localhost:3000/teams/1"}]}]}}'
55
+ Madness Game 1"},{"name":"notes","value":null},{"name":"opponent_id","value":1},{"name":"points_for_opponent","value":null},{"name":"points_for_team","value":null},{"name":"repeating_type","value":null},{"name":"repeating_type_code","value":null},{"name":"repeating_uuid","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"start_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"team_id","value":1},{"name":"time_zone","value":"Mountain
56
+ Time (US & Canada)"},{"name":"time_zone_description","value":"Mountain Time
57
+ (US & Canada)"},{"name":"time_zone_iana_name","value":"America/Denver"},{"name":"time_zone_offset","value":"-07:00"},{"name":"source_time_zone_iana_name","value":"America/Denver"},{"name":"tracks_availability","value":true},{"name":"uniform","value":null},{"name":"is_league_controlled","value":false},{"name":"created_at","value":"2015-09-15T20:38:34Z","type":"DateTime"},{"name":"updated_at","value":"2015-10-14T01:11:21Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?event_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?event_id=1"},{"rel":"calendar_single_event","href":"http://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/event/1.ics"},{"rel":"division_location","href":"http://localhost:3000/division_locations/"},{"rel":"location","href":"http://localhost:3000/locations/1"},{"rel":"opponent","href":"http://localhost:3000/opponents/1"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data/search?event_id=1"},{"rel":"team","href":"http://localhost:3000/teams/1"}],"rel":"event-1"}]}}'
49
58
  http_version: '1.1'
50
59
  adapter_metadata:
51
60
  effective_url: http://localhost:3000/events/search?id=1
52
- recorded_at: Thu, 28 May 2015 15:03:24 GMT
61
+ recorded_at: Wed, 14 Oct 2015 02:03:40 GMT
53
62
  - request:
54
63
  method: get
55
64
  uri: http://localhost:3000/division_locations/
@@ -58,9 +67,9 @@ http_interactions:
58
67
  string: ''
59
68
  headers:
60
69
  User-Agent:
61
- - Faraday v0.9.1
70
+ - Faraday v0.9.2
62
71
  Authorization:
63
- - Bearer 1-classic-dont_tell_the_cops
72
+ - Bearer 6-classic-dont_tell_the_cops
64
73
  response:
65
74
  status:
66
75
  code: 200
@@ -69,32 +78,38 @@ http_interactions:
69
78
  Content-Type:
70
79
  - application/vnd.collection+json
71
80
  Content-Length:
72
- - '416'
81
+ - '418'
82
+ Connection:
83
+ - keep-alive
84
+ Status:
85
+ - 200 OK
73
86
  X-Content-Type-Options:
74
87
  - nosniff
75
88
  X-RateLimit-Limit:
76
89
  - '5000'
77
90
  X-RateLimit-Remaining:
78
- - '4862'
91
+ - '4870'
79
92
  X-RateLimit-Reset:
80
- - '1432828851'
93
+ - '1444790105'
81
94
  ETag:
82
- - '"2f0aa0f09b24793b5252c0d8f8618a2d"'
95
+ - '"57c8dafebf8f01a36c48fa17d6135bf3"'
83
96
  Cache-Control:
84
97
  - max-age=0, private, must-revalidate
85
98
  X-Request-Id:
86
- - 0119405e-07c0-4e69-9326-67857a455c5d
99
+ - 1beac5ee-7b90-4288-89a6-b45bacabfc78
87
100
  X-Runtime:
88
- - '0.020762'
89
- Connection:
90
- - keep-alive
101
+ - '0.059446'
102
+ X-Powered-By:
103
+ - Phusion Passenger 4.0.48
104
+ Date:
105
+ - Wed, 14 Oct 2015 02:03:41 GMT
91
106
  Server:
92
- - thin
107
+ - nginx/1.6.2 + Phusion Passenger 4.0.48
93
108
  body:
94
109
  encoding: UTF-8
95
- string: '{"collection":{"version":"3.72.0","href":"http://localhost:3000/division_locations","links":[{"rel":"events","href":"http://localhost:3000/events"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/division_locations"}],"queries":[{"rel":"search","href":"http://localhost:3000/division_locations/search","data":[{"name":"team_id","value":null},{"name":"id","value":null}]}]}}'
110
+ string: '{"collection":{"version":"3.119.0","href":"http://localhost:3000/division_locations","links":[{"rel":"events","href":"http://localhost:3000/events"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000//division_locations"}],"queries":[{"rel":"search","href":"http://localhost:3000/division_locations/search","data":[{"name":"team_id","value":null},{"name":"id","value":null}]}]}}'
96
111
  http_version: '1.1'
97
112
  adapter_metadata:
98
113
  effective_url: http://localhost:3000/division_locations/
99
- recorded_at: Thu, 28 May 2015 15:03:25 GMT
114
+ recorded_at: Wed, 14 Oct 2015 02:03:41 GMT
100
115
  recorded_with: VCR 2.9.3
@@ -8,9 +8,9 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.9.1
11
+ - Faraday v0.9.2
12
12
  Authorization:
13
- - Bearer 1-classic-dont_tell_the_cops
13
+ - Bearer 6-classic-dont_tell_the_cops
14
14
  response:
15
15
  status:
16
16
  code: 200
@@ -19,37 +19,46 @@ http_interactions:
19
19
  Content-Type:
20
20
  - application/vnd.collection+json
21
21
  Content-Length:
22
- - '4993'
22
+ - '6138'
23
+ Connection:
24
+ - keep-alive
25
+ Status:
26
+ - 200 OK
23
27
  X-Content-Type-Options:
24
28
  - nosniff
25
29
  X-RateLimit-Limit:
26
30
  - '5000'
27
31
  X-RateLimit-Remaining:
28
- - '4865'
32
+ - '4869'
29
33
  X-RateLimit-Reset:
30
- - '1432828850'
34
+ - '1444790105'
31
35
  ETag:
32
- - '"aacd8fb2517e31f6d3baafe13ad189cb"'
36
+ - '"a37e218dfd014c0c1f8680050ee2ed3b"'
33
37
  Cache-Control:
34
38
  - max-age=0, private, must-revalidate
35
39
  X-Request-Id:
36
- - eb31156e-bb34-4e8a-b9e7-8dc4b95c5077
40
+ - 8f5ade03-4ed6-42d5-acdd-dfcb5e40648a
37
41
  X-Runtime:
38
- - '0.040670'
39
- Connection:
40
- - keep-alive
42
+ - '0.279464'
43
+ X-Powered-By:
44
+ - Phusion Passenger 4.0.48
45
+ Date:
46
+ - Wed, 14 Oct 2015 02:03:41 GMT
41
47
  Server:
42
- - thin
48
+ - nginx/1.6.2 + Phusion Passenger 4.0.48
43
49
  body:
44
50
  encoding: UTF-8
45
- string: '{"collection":{"version":"3.72.0","href":"http://localhost:3000/events","template":{"data":[{"name":"repeating_type_code","value":null},{"name":"is_game","value":null},{"name":"start_date","value":null},{"name":"is_tbd","value":null},{"name":"name","value":null},{"name":"label","value":null},{"name":"game_type_code","value":null},{"name":"icon_color","value":null},{"name":"minutes_to_arrive_early","value":null},{"name":"duration_in_minutes","value":null},{"name":"notes","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"doesnt_count_towards_record","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"tracks_availability","value":null},{"name":"uniform","value":null},{"name":"is_canceled","value":null},{"name":"notify_team","value":null},{"name":"notify_team_as_member_id","value":null},{"name":"notify_opponent","value":null},{"name":"notify_opponent_contacts_name","value":null},{"name":"notify_opponent_contacts_email","value":null},{"name":"notify_opponent_notes","value":null},{"name":"team_id","value":null},{"name":"division_location_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"repeating_until","value":null},{"name":"repeating_include","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"division_location","href":"http://localhost:3000/division_locations"},{"rel":"location","href":"http://localhost:3000/locations"},{"rel":"opponent","href":"http://localhost:3000/opponents"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/events/search?id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/events/search","data":[{"name":"team_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"started_after","value":null},{"name":"started_before","value":null},{"name":"id","value":null}]},{"rel":"search_games","href":"http://localhost:3000/events/search_games","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"send_availability_reminders","href":"http://localhost:3000/events/send_availability_reminders","prompt":"members_to_notify
46
- = (all|unset)","data":[{"name":"id","value":null},{"name":"members_to_notify","value":null},{"name":"notify_team_as_member_id","value":null}]}],"items":[{"href":"http://localhost:3000/events/1","data":[{"name":"id","value":1},{"name":"type","value":"event"},{"name":"arrival_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"division_location_id","value":null},{"name":"doesnt_count_towards_record","value":false},{"name":"duration_in_minutes","value":120},{"name":"end_date","value":"2015-01-01T02:00:00Z","type":"DateTime"},{"name":"formatted_results","value":null},{"name":"game_type","value":"Not
51
+ string: '{"collection":{"version":"3.119.0","href":"http://localhost:3000/events","template":{"data":[{"name":"repeating_type_code","value":null},{"name":"is_game","value":null},{"name":"start_date","value":null},{"name":"is_tbd","value":null},{"name":"name","value":null},{"name":"label","value":null},{"name":"game_type_code","value":null},{"name":"icon_color","value":null},{"name":"minutes_to_arrive_early","value":null},{"name":"duration_in_minutes","value":null},{"name":"notes","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"doesnt_count_towards_record","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"tracks_availability","value":null},{"name":"uniform","value":null},{"name":"is_canceled","value":null},{"name":"notify_team","value":null},{"name":"notify_team_as_member_id","value":null},{"name":"notify_opponent","value":null},{"name":"notify_opponent_contacts_name","value":null},{"name":"notify_opponent_contacts_email","value":null},{"name":"notify_opponent_notes","value":null},{"name":"team_id","value":null},{"name":"division_location_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"repeating_until","value":null},{"name":"repeating_include","value":null},{"name":"time_zone","value":null},{"name":"browser_time_zone","value":null},{"name":"additional_location_details","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"division_location","href":"http://localhost:3000/division_locations"},{"rel":"location","href":"http://localhost:3000/locations"},{"rel":"opponent","href":"http://localhost:3000/opponents"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000//events/search?id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/events/search","data":[{"name":"team_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"started_after","value":null},{"name":"started_before","value":null},{"name":"id","value":null}]},{"rel":"search_games","href":"http://localhost:3000/events/search_games","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"send_availability_reminders","href":"http://localhost:3000/events/send_availability_reminders","prompt":"members_to_notify
52
+ = [member_id, member_id]","data":[{"name":"id","value":null},{"name":"members_to_notify","value":null},{"name":"notify_team_as_member_id","value":null}]},{"rel":"update_final_score","href":"http://localhost:3000/events/update_final_score","prompt":"Update
53
+ the final score for an event","data":[{"name":"id","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"results","value":null},{"name":"results_url","value":null}]}],"items":[{"href":"http://localhost:3000/events/1","data":[{"name":"id","value":1},{"name":"type","value":"event"},{"name":"additional_location_details","value":null},{"name":"arrival_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"division_location_id","value":null},{"name":"doesnt_count_towards_record","value":false},{"name":"duration_in_minutes","value":120},{"name":"end_date","value":"2015-01-01T02:00:00Z","type":"DateTime"},{"name":"formatted_results","value":null},{"name":"game_type","value":"Not
47
54
  Specified"},{"name":"game_type_code","value":null},{"name":"icon_color","value":"blue"},{"name":"is_canceled","value":false},{"name":"is_game","value":false},{"name":"is_overtime","value":false},{"name":"is_shootout","value":false},{"name":"is_tbd","value":false},{"name":"label","value":null},{"name":"location_id","value":1},{"name":"minutes_to_arrive_early","value":null},{"name":"name","value":"March
48
- Madness Game 1"},{"name":"notes","value":null},{"name":"opponent_id","value":1},{"name":"points_for_opponent","value":null},{"name":"points_for_team","value":null},{"name":"repeating_type","value":null},{"name":"repeating_type_code","value":null},{"name":"repeating_uuid","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"start_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"team_id","value":1},{"name":"tracks_availability","value":true},{"name":"uniform","value":null},{"name":"is_league_controlled","value":false},{"name":"created_at","value":"2015-05-28T15:02:24Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-28T15:02:26Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?event_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?event_id=1"},{"rel":"division_location","href":"http://localhost:3000/division_locations/"},{"rel":"location","href":"http://localhost:3000/locations/1"},{"rel":"opponent","href":"http://localhost:3000/opponents/1"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data/search?event_id=1"},{"rel":"team","href":"http://localhost:3000/teams/1"}]}]}}'
55
+ Madness Game 1"},{"name":"notes","value":null},{"name":"opponent_id","value":1},{"name":"points_for_opponent","value":null},{"name":"points_for_team","value":null},{"name":"repeating_type","value":null},{"name":"repeating_type_code","value":null},{"name":"repeating_uuid","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"start_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"team_id","value":1},{"name":"time_zone","value":"Mountain
56
+ Time (US & Canada)"},{"name":"time_zone_description","value":"Mountain Time
57
+ (US & Canada)"},{"name":"time_zone_iana_name","value":"America/Denver"},{"name":"time_zone_offset","value":"-07:00"},{"name":"source_time_zone_iana_name","value":"America/Denver"},{"name":"tracks_availability","value":true},{"name":"uniform","value":null},{"name":"is_league_controlled","value":false},{"name":"created_at","value":"2015-09-15T20:38:34Z","type":"DateTime"},{"name":"updated_at","value":"2015-10-14T01:11:21Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?event_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?event_id=1"},{"rel":"calendar_single_event","href":"http://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/event/1.ics"},{"rel":"division_location","href":"http://localhost:3000/division_locations/"},{"rel":"location","href":"http://localhost:3000/locations/1"},{"rel":"opponent","href":"http://localhost:3000/opponents/1"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data/search?event_id=1"},{"rel":"team","href":"http://localhost:3000/teams/1"}],"rel":"event-1"}]}}'
49
58
  http_version: '1.1'
50
59
  adapter_metadata:
51
60
  effective_url: http://localhost:3000/events/search?id=1
52
- recorded_at: Thu, 28 May 2015 15:03:24 GMT
61
+ recorded_at: Wed, 14 Oct 2015 02:03:41 GMT
53
62
  - request:
54
63
  method: get
55
64
  uri: http://localhost:3000/teams/1
@@ -58,9 +67,9 @@ http_interactions:
58
67
  string: ''
59
68
  headers:
60
69
  User-Agent:
61
- - Faraday v0.9.1
70
+ - Faraday v0.9.2
62
71
  Authorization:
63
- - Bearer 1-classic-dont_tell_the_cops
72
+ - Bearer 6-classic-dont_tell_the_cops
64
73
  response:
65
74
  status:
66
75
  code: 200
@@ -69,37 +78,46 @@ http_interactions:
69
78
  Content-Type:
70
79
  - application/vnd.collection+json
71
80
  Content-Length:
72
- - '10875'
81
+ - '12891'
82
+ Connection:
83
+ - keep-alive
84
+ Status:
85
+ - 200 OK
73
86
  X-Content-Type-Options:
74
87
  - nosniff
75
88
  X-RateLimit-Limit:
76
89
  - '5000'
77
90
  X-RateLimit-Remaining:
78
- - '4864'
91
+ - '4868'
79
92
  X-RateLimit-Reset:
80
- - '1432828850'
93
+ - '1444790105'
81
94
  ETag:
82
- - '"f51223f3f84e28a52f00ce09b5c6914e"'
95
+ - '"b0c43ec03ca59c9ed63b5fb4a82b26ae"'
83
96
  Cache-Control:
84
97
  - max-age=0, private, must-revalidate
85
98
  X-Request-Id:
86
- - bb706793-74e1-4bb5-9ee7-b581830f046f
99
+ - 8f758646-489b-4664-8824-c95eb93dc62b
87
100
  X-Runtime:
88
- - '0.037930'
89
- Connection:
90
- - keep-alive
101
+ - '0.082064'
102
+ X-Powered-By:
103
+ - Phusion Passenger 4.0.48
104
+ Date:
105
+ - Wed, 14 Oct 2015 02:03:41 GMT
91
106
  Server:
92
- - thin
107
+ - nginx/1.6.2 + Phusion Passenger 4.0.48
93
108
  body:
94
109
  encoding: UTF-8
95
- string: '{"collection":{"version":"3.72.0","href":"http://localhost:3000/teams","template":{"data":[{"name":"name","value":null},{"name":"location_country","value":null},{"name":"location_postal_code","value":null},{"name":"time_zone","value":null},{"name":"sport_id","value":null},{"name":"division_name","value":null},{"name":"season_name","value":null},{"name":"league_name","value":null},{"name":"league_url","value":null}]},"links":[{"rel":"active_season_team","href":"http://localhost:3000/teams"},{"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":"division_locations","href":"http://localhost:3000/division_locations"},{"rel":"division_members","href":"http://localhost:3000/division_members"},{"rel":"division_members_preferences","href":"http://localhost:3000/division_members_preferences"},{"rel":"events","href":"http://localhost:3000/events"},{"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":"locations","href":"http://localhost:3000/locations"},{"rel":"managers","href":"http://localhost:3000/members"},{"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":"members","href":"http://localhost:3000/members"},{"rel":"members_preferences","href":"http://localhost:3000/members_preferences"},{"rel":"opponents","href":"http://localhost:3000/opponents"},{"rel":"opponents_results","href":"http://localhost:3000/opponents_results"},{"rel":"owner","href":"http://localhost:3000/members"},{"rel":"payment_notes","href":"http://localhost:3000/payment_notes"},{"rel":"paypal_currency","href":"http://localhost:3000/paypal_currencies"},{"rel":"plan","href":"http://localhost:3000/plans"},{"rel":"sponsors","href":"http://localhost:3000/sponsors"},{"rel":"sport","href":"http://localhost:3000/sports"},{"rel":"statistic","href":"http://localhost:3000/statistics"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data"},{"rel":"statistic_group","href":"http://localhost:3000/statistic_groups"},{"rel":"team_fees","href":"http://localhost:3000/team_fees"},{"rel":"team_paypal_preferences","href":"http://localhost:3000/teams_paypal_preferences"},{"rel":"team_preferences","href":"http://localhost:3000/teams_preferences"},{"rel":"team_public_site","href":"http://localhost:3000/team_public_sites"},{"rel":"team_results","href":"http://localhost:3000/teams_results"},{"rel":"tracked_item_statuses","href":"http://localhost:3000/tracked_item_statuses"},{"rel":"tracked_items","href":"http://localhost:3000/tracked_items"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/teams/1"}],"queries":[{"rel":"search","href":"http://localhost:3000/teams/search","data":[{"name":"id","value":null},{"name":"team_id","value":null},{"name":"user_id","value":null},{"name":"division_id","value":null}]}],"commands":[{"rel":"invite","href":"http://localhost:3000/teams/invite","prompt":"invite
110
+ string: '{"collection":{"version":"3.119.0","href":"http://localhost:3000/teams","template":{"data":[{"name":"name","value":null},{"name":"location_country","value":null},{"name":"location_postal_code","value":null},{"name":"time_zone","value":null},{"name":"sport_id","value":null},{"name":"division_name","value":null},{"name":"season_name","value":null},{"name":"league_name","value":null},{"name":"league_url","value":null}]},"links":[{"rel":"active_season_team","href":"http://localhost:3000/teams"},{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"broadcast_email_attachments","href":"http://localhost:3000/broadcast_email_attachments"},{"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":"division_locations","href":"http://localhost:3000/division_locations"},{"rel":"division_members","href":"http://localhost:3000/division_members"},{"rel":"division_members_preferences","href":"http://localhost:3000/division_members_preferences"},{"rel":"division_team_standings","href":"http://localhost:3000/division_team_standings"},{"rel":"events","href":"http://localhost:3000/events"},{"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":"locations","href":"http://localhost:3000/locations"},{"rel":"managers","href":"http://localhost:3000/members"},{"rel":"member_balances","href":"http://localhost:3000/member_balances"},{"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_statistics","href":"http://localhost:3000/member_statistics"},{"rel":"members","href":"http://localhost:3000/members"},{"rel":"members_preferences","href":"http://localhost:3000/members_preferences"},{"rel":"opponents","href":"http://localhost:3000/opponents"},{"rel":"opponents_results","href":"http://localhost:3000/opponents_results"},{"rel":"owner","href":"http://localhost:3000/members"},{"rel":"payment_notes","href":"http://localhost:3000/payment_notes"},{"rel":"paypal_currency","href":"http://localhost:3000/paypal_currencies"},{"rel":"plan","href":"http://localhost:3000/plans"},{"rel":"sponsors","href":"http://localhost:3000/sponsors"},{"rel":"sport","href":"http://localhost:3000/sports"},{"rel":"statistic","href":"http://localhost:3000/statistics"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data"},{"rel":"statistic_group","href":"http://localhost:3000/statistic_groups"},{"rel":"team_fees","href":"http://localhost:3000/team_fees"},{"rel":"team_media","href":"http://localhost:3000/team_media"},{"rel":"team_medium_comments","href":"http://localhost:3000/team_medium_comments"},{"rel":"team_media_groups","href":"http://localhost:3000/team_media_groups"},{"rel":"team_paypal_preferences","href":"http://localhost:3000/teams_paypal_preferences"},{"rel":"team_preferences","href":"http://localhost:3000/teams_preferences"},{"rel":"team_public_site","href":"http://localhost:3000/team_public_sites"},{"rel":"team_results","href":"http://localhost:3000/teams_results"},{"rel":"team_statistics","href":"http://localhost:3000/team_statistics"},{"rel":"tracked_item_statuses","href":"http://localhost:3000/tracked_item_statuses"},{"rel":"tracked_items","href":"http://localhost:3000/tracked_items"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000//teams/1"}],"queries":[{"rel":"search","href":"http://localhost:3000/teams/search","data":[{"name":"id","value":null},{"name":"team_id","value":null},{"name":"user_id","value":null},{"name":"division_id","value":null}]},{"rel":"available_for_statistic_import","href":"http://localhost:3000/teams/available_for_statistic_import","prompt":"Finds
111
+ all teams accessible to current user that have the provided sport_id and have
112
+ at least one statistic to import","data":[{"name":"sport_id","value":null}]}],"commands":[{"rel":"invite","href":"http://localhost:3000/teams/invite","prompt":"invite
96
113
  team members or contacts to join TeamSnap.","data":[{"name":"team_id","value":null},{"name":"contact_id","value":null},{"name":"member_id","value":null},{"name":"introduction","value":null},{"name":"notify_as_member_id","value":null}]},{"rel":"update_time_zone","href":"http://localhost:3000/teams/update_time_zone","prompt":"Update
97
- team''s time zone.","data":[{"name":"team_id","value":null},{"name":"time_zone","value":null},{"name":"offset_team_times","value":null}]}],"items":[{"href":"http://localhost:3000/teams/1","data":[{"name":"id","value":1},{"name":"type","value":"team"},{"name":"division_name","value":null},{"name":"is_archived_season","value":false},{"name":"league_name","value":null},{"name":"league_url","value":null},{"name":"is_in_league","value":false},{"name":"location_country","value":"United
114
+ team''s time zone.","data":[{"name":"team_id","value":null},{"name":"time_zone","value":null},{"name":"offset_team_times","value":null}]},{"rel":"reset_statistics","href":"http://localhost:3000/teams/reset_statistics","prompt":"Deletes
115
+ all data, categories and groups for a given team_id","data":[{"name":"team_id","value":null}]}],"items":[{"href":"http://localhost:3000/teams/1","data":[{"name":"id","value":1},{"name":"type","value":"team"},{"name":"division_name","value":null},{"name":"is_archived_season","value":false},{"name":"league_name","value":null},{"name":"league_url","value":null},{"name":"is_in_league","value":false},{"name":"location_country","value":"United
98
116
  States"},{"name":"location_postal_code","value":"80951"},{"name":"location_latitude","value":null},{"name":"location_longitude","value":null},{"name":"name","value":"Base
99
117
  Team"},{"name":"plan_id","value":14},{"name":"season_name","value":null},{"name":"sport_id","value":1},{"name":"time_zone_description","value":"Mountain
100
- Time (US & Canada)"},{"name":"time_zone_iana_name","value":"America/Denver"},{"name":"time_zone_offset","value":"-07:00"},{"name":"updated_at","value":"2015-05-28T15:02:27Z","type":"DateTime"},{"name":"created_at","value":"2015-05-28T15:02:22Z","type":"DateTime"},{"name":"has_reached_roster_limit","value":false},{"name":"roster_limit","value":30},{"name":"has_exportable_media","value":false}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?team_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?team_id=1"},{"rel":"broadcast_emails","href":"http://localhost:3000/broadcast_emails/search?team_id=1"},{"rel":"broadcast_smses","href":"http://localhost:3000/broadcast_smses/search?team_id=1"},{"rel":"calendar_http","href":"http://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/77be83c0-e778-0132-d6db-000c296a3388.ics"},{"rel":"calendar_http_games_only","href":"http://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/filter/games/77be83c0-e778-0132-d6db-000c296a3388.ics"},{"rel":"calendar_webcal","href":"webcal://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/77be83c0-e778-0132-d6db-000c296a3388.ics"},{"rel":"calendar_webcal_games_only","href":"webcal://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/filter/games/77be83c0-e778-0132-d6db-000c296a3388.ics"},{"rel":"contact_email_addresses","href":"http://localhost:3000/contact_email_addresses/search?team_id=1"},{"rel":"contact_phone_numbers","href":"http://localhost:3000/contact_phone_numbers/search?team_id=1"},{"rel":"contacts","href":"http://localhost:3000/contacts/search?team_id=1"},{"rel":"custom_data","href":"http://localhost:3000/custom_data/search?team_id=1"},{"rel":"custom_fields","href":"http://localhost:3000/custom_fields/search?team_id=1"},{"rel":"league_custom_data","href":"http://localhost:3000/league_custom_data/search?team_id=1"},{"rel":"league_custom_fields","href":"http://localhost:3000/league_custom_fields/search?team_id=1"},{"rel":"division_locations","href":"http://localhost:3000/division_locations/search?team_id=1"},{"rel":"division_members","href":"http://localhost:3000/division_members/search?team_id=1"},{"rel":"division_members_preferences","href":"http://localhost:3000/division_members_preferences/search?team_id=1"},{"rel":"forum_posts","href":"http://localhost:3000/forum_posts/search?team_id=1"},{"rel":"forum_subscriptions","href":"http://localhost:3000/forum_subscriptions/search?team_id=1"},{"rel":"forum_topics","href":"http://localhost:3000/forum_topics/search?team_id=1"},{"rel":"events","href":"http://localhost:3000/events/search?team_id=1"},{"rel":"events_csv_export","href":"http://localhost:3000/exports/events_csv?hs=YszGJFFtdkxT%252Ba08BS5xyp1dHMOjVVvQPmlGdCebDpZJEIA5ysqcsrI33JZZvAn%252FIn1Oib4Rr4I53n5pSftBsME2FdbuMfYeFFvKSDtIuEk%253D"},{"rel":"league_registrant_documents","href":"http://localhost:3000/league_registrant_documents/search?member_id=1"},{"rel":"locations","href":"http://localhost:3000/locations/search?team_id=1"},{"rel":"managers","href":"http://localhost:3000/members/managers?team_id=1"},{"rel":"member_email_addresses","href":"http://localhost:3000/member_email_addresses/search?team_id=1"},{"rel":"member_files","href":"http://localhost:3000/member_files/search?team_id=1"},{"rel":"member_links","href":"http://localhost:3000/member_links/search?team_id=1"},{"rel":"member_payments","href":"http://localhost:3000/member_payments/search?team_id=1"},{"rel":"member_phone_numbers","href":"http://localhost:3000/member_phone_numbers/search?team_id=1"},{"rel":"members","href":"http://localhost:3000/members/search?team_id=1"},{"rel":"members_csv_export","href":"http://localhost:3000/exports/members_csv?hs=YszGJFFtdkxT%252Ba08BS5xyp1dHMOjVVvQPmlGdCebDpZJEIA5ysqcsrI33JZZvAn%252FIn1Oib4Rr4I53n5pSftBsME2FdbuMfYeFFvKSDtIuEk%253D"},{"rel":"members_preferences","href":"http://localhost:3000/members_preferences/search?team_id=1"},{"rel":"opponents","href":"http://localhost:3000/opponents/search?team_id=1"},{"rel":"opponents_results","href":"http://localhost:3000/opponents_results/search?team_id=1"},{"rel":"owner","href":"http://localhost:3000/members/owner?team_id=1"},{"rel":"payment_notes","href":"http://localhost:3000/payment_notes/search?team_id=1"},{"rel":"paypal_currency","href":"http://localhost:3000/paypal_currencies/search?team_id=1"},{"rel":"plan","href":"http://localhost:3000/plans/14"},{"rel":"sponsors","href":"http://localhost:3000/sponsors/search?team_id=1"},{"rel":"sport","href":"http://localhost:3000/sports/1"},{"rel":"statistics","href":"http://localhost:3000/statistics/search?team_id=1"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data/search?team_id=1"},{"rel":"statistic_groups","href":"http://localhost:3000/statistic_groups/search?team_id=1"},{"rel":"team_fees","href":"http://localhost:3000/team_fees/search?team_id=1"},{"rel":"team_paypal_preferences","href":"http://localhost:3000/teams_paypal_preferences/1"},{"rel":"team_preferences","href":"http://localhost:3000/teams_preferences/1"},{"rel":"team_public_site","href":"http://localhost:3000/team_public_sites/1"},{"rel":"team_results","href":"http://localhost:3000/teams_results/1"},{"rel":"tracked_item_statuses","href":"http://localhost:3000/tracked_item_statuses/search?team_id=1"},{"rel":"tracked_items","href":"http://localhost:3000/tracked_items/search?team_id=1"}]}]}}'
118
+ Time (US & Canada)"},{"name":"time_zone_iana_name","value":"America/Denver"},{"name":"time_zone_offset","value":"-07:00"},{"name":"updated_at","value":"2015-09-28T21:12:57Z","type":"DateTime"},{"name":"created_at","value":"2015-09-15T20:38:32Z","type":"DateTime"},{"name":"has_reached_roster_limit","value":false},{"name":"roster_limit","value":30},{"name":"has_exportable_media","value":false},{"name":"can_export_media","value":false},{"name":"last_accessed_at","value":"2015-09-28T21:12:57Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?team_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?team_id=1"},{"rel":"broadcast_email_attachments","href":"http://localhost:3000/broadcast_email_attachments/search?team_id=1"},{"rel":"broadcast_emails","href":"http://localhost:3000/broadcast_emails/search?team_id=1"},{"rel":"broadcast_smses","href":"http://localhost:3000/broadcast_smses/search?team_id=1"},{"rel":"calendar_http","href":"http://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/a7227ea0-3e17-0133-a149-000c2984cf79.ics"},{"rel":"calendar_http_games_only","href":"http://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/filter/games/a7227ea0-3e17-0133-a149-000c2984cf79.ics"},{"rel":"calendar_webcal","href":"webcal://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/a7227ea0-3e17-0133-a149-000c2984cf79.ics"},{"rel":"calendar_webcal_games_only","href":"webcal://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/filter/games/a7227ea0-3e17-0133-a149-000c2984cf79.ics"},{"rel":"contact_email_addresses","href":"http://localhost:3000/contact_email_addresses/search?team_id=1"},{"rel":"contact_phone_numbers","href":"http://localhost:3000/contact_phone_numbers/search?team_id=1"},{"rel":"contacts","href":"http://localhost:3000/contacts/search?team_id=1"},{"rel":"custom_data","href":"http://localhost:3000/custom_data/search?team_id=1"},{"rel":"custom_fields","href":"http://localhost:3000/custom_fields/search?team_id=1"},{"rel":"league_custom_data","href":"http://localhost:3000/league_custom_data/search?team_id=1"},{"rel":"league_custom_fields","href":"http://localhost:3000/league_custom_fields/search?team_id=1"},{"rel":"division_locations","href":"http://localhost:3000/division_locations/search?team_id=1"},{"rel":"division_members","href":"http://localhost:3000/division_members/search?team_id=1"},{"rel":"division_members_preferences","href":"http://localhost:3000/division_members_preferences/search?team_id=1"},{"rel":"division_team_standings","href":"http://localhost:3000/division_team_standings/search?team_id=1"},{"rel":"forum_posts","href":"http://localhost:3000/forum_posts/search?team_id=1"},{"rel":"forum_subscriptions","href":"http://localhost:3000/forum_subscriptions/search?team_id=1"},{"rel":"forum_topics","href":"http://localhost:3000/forum_topics/search?team_id=1"},{"rel":"events","href":"http://localhost:3000/events/search?team_id=1"},{"rel":"events_csv_export","href":"http://localhost:3000/exports/events_csv?hs=YszGJFFtdkxT%252Ba08BS5xyp1dHMOjVVvQPmlGdCebDpblceEQXeEpCIonkWUSST%252FskUwMfDhu3pBHw8wB8qNQnDoVZgiwHUFgYRF7v%252BKbmsU%253D"},{"rel":"league_registrant_documents","href":"http://localhost:3000/league_registrant_documents/search?member_id=1"},{"rel":"locations","href":"http://localhost:3000/locations/search?team_id=1"},{"rel":"managers","href":"http://localhost:3000/members/managers?team_id=1"},{"rel":"member_balances","href":"http://localhost:3000/member_balances/search?team_id=1"},{"rel":"member_email_addresses","href":"http://localhost:3000/member_email_addresses/search?team_id=1"},{"rel":"member_files","href":"http://localhost:3000/member_files/search?team_id=1"},{"rel":"member_links","href":"http://localhost:3000/member_links/search?team_id=1"},{"rel":"member_payments","href":"http://localhost:3000/member_payments/search?team_id=1"},{"rel":"member_phone_numbers","href":"http://localhost:3000/member_phone_numbers/search?team_id=1"},{"rel":"member_statistics","href":"http://localhost:3000/member_statistics/search?team_id=1"},{"rel":"members","href":"http://localhost:3000/members/search?team_id=1"},{"rel":"members_csv_export","href":"http://localhost:3000/exports/members_csv?hs=YszGJFFtdkxT%252Ba08BS5xyp1dHMOjVVvQPmlGdCebDpblceEQXeEpCIonkWUSST%252FskUwMfDhu3pBHw8wB8qNQnDoVZgiwHUFgYRF7v%252BKbmsU%253D"},{"rel":"members_preferences","href":"http://localhost:3000/members_preferences/search?team_id=1"},{"rel":"opponents","href":"http://localhost:3000/opponents/search?team_id=1"},{"rel":"opponents_results","href":"http://localhost:3000/opponents_results/search?team_id=1"},{"rel":"owner","href":"http://localhost:3000/members/owner?team_id=1"},{"rel":"payment_notes","href":"http://localhost:3000/payment_notes/search?team_id=1"},{"rel":"paypal_currency","href":"http://localhost:3000/paypal_currencies/search?team_id=1"},{"rel":"plan","href":"http://localhost:3000/plans/14"},{"rel":"sponsors","href":"http://localhost:3000/sponsors/search?team_id=1"},{"rel":"sport","href":"http://localhost:3000/sports/1"},{"rel":"statistics","href":"http://localhost:3000/statistics/search?team_id=1"},{"rel":"statistic_data","href":"http://localhost:3000/statistic_data/search?team_id=1"},{"rel":"statistic_groups","href":"http://localhost:3000/statistic_groups/search?team_id=1"},{"rel":"team_fees","href":"http://localhost:3000/team_fees/search?team_id=1"},{"rel":"team_media","href":"http://localhost:3000/team_media/search?team_id=1"},{"rel":"team_medium_comments","href":"http://localhost:3000/team_medium_comments/search?team_id=1"},{"rel":"team_media_groups","href":"http://localhost:3000/team_media_groups/search?team_id=1"},{"rel":"team_paypal_preferences","href":"http://localhost:3000/teams_paypal_preferences/1"},{"rel":"team_preferences","href":"http://localhost:3000/teams_preferences/1"},{"rel":"team_public_site","href":"http://localhost:3000/team_public_sites/1"},{"rel":"team_results","href":"http://localhost:3000/teams_results/1"},{"rel":"team_statistics","href":"http://localhost:3000/team_statistics/search?team_id=1"},{"rel":"tracked_item_statuses","href":"http://localhost:3000/tracked_item_statuses/search?team_id=1"},{"rel":"tracked_items","href":"http://localhost:3000/tracked_items/search?team_id=1"}],"rel":"team-1"}]}}'
101
119
  http_version: '1.1'
102
120
  adapter_metadata:
103
121
  effective_url: http://localhost:3000/teams/1
104
- recorded_at: Thu, 28 May 2015 15:03:24 GMT
122
+ recorded_at: Wed, 14 Oct 2015 02:03:41 GMT
105
123
  recorded_with: VCR 2.9.3
@@ -25,6 +25,9 @@ VCR.configure do |c|
25
25
  )
26
26
  ]
27
27
  }
28
+ c.before_record do |i|
29
+ i.response.body.force_encoding('UTF-8')
30
+ end
28
31
  end
29
32
 
30
33
  RSpec.configure do |c|
@@ -95,7 +95,7 @@ RSpec.describe "teamsnap_rb", :vcr => true do
95
95
  TeamSnap.init(
96
96
  :url => ROOT_TEST_URL,
97
97
  :backup_cache => false,
98
- :token => "1-classic-dont_tell_the_cops"
98
+ :token => "6-classic-dont_tell_the_cops"
99
99
  )
100
100
 
101
101
  ms = TeamSnap::Team.invite(
@@ -225,71 +225,4 @@ RSpec.describe "teamsnap_rb", :vcr => true do
225
225
  end
226
226
  end
227
227
  end
228
-
229
- context "supports using a backup file on init for when API cannot be reached" do
230
- context ".backup_file_for" do
231
- let(:default_file_location) { "./tmp/.teamsnap_rb" }
232
-
233
- it "responds with the given file location if provided" do
234
- file_location = "./some_dir/some_file.testing"
235
- expect(TeamSnap.backup_file_for(file_location)).to eq(file_location)
236
- end
237
-
238
- it "responds with the default file location if set to true" do
239
- expect(TeamSnap.backup_file_for(true)).to eq(default_file_location)
240
- end
241
- end
242
-
243
- context ".write_backup_file" do
244
- let(:collection) { {:one => 1} }
245
-
246
- context "when the given directory exists" do
247
- let(:test_file_location) { "./tmp/.teamsnap_rb" }
248
- let(:file_contents) { Oj.dump(collection) }
249
-
250
- it "returns the number of characters written to the file" do
251
- expect(TeamSnap.write_backup_file(test_file_location, collection)).to eq(file_contents.length)
252
- end
253
-
254
- it "writes the file inside the directory provided" do
255
- expect(File).to receive(:open).with(test_file_location, "w+")
256
- TeamSnap.write_backup_file(test_file_location, collection)
257
- end
258
-
259
- it "writes the file with the correct information" do
260
- TeamSnap.write_backup_file(test_file_location, collection)
261
- file_contents = Oj.load(IO.read(test_file_location))
262
- expect(file_contents).to eq(collection)
263
- end
264
- end
265
-
266
- context "when the given directory does NOT exist" do
267
- let(:test_file_location) { "./directory_doesnt_exist/file" }
268
- let(:test_dir_location) { File.dirname(test_file_location) }
269
- let(:warning_message) {
270
- "WARNING: Directory '#{test_dir_location}' does not exist. " +
271
- "Backup cache functionality will not work until this is resolved."
272
- }
273
-
274
- it "issues a warning that the directory does not exist" do
275
- expect(TeamSnap).to receive(:warn).with(warning_message)
276
- TeamSnap.write_backup_file(test_file_location, collection)
277
- end
278
- end
279
- end
280
-
281
- context ".backup_file_exists?" do
282
- it "returns false if backup_cache_file is NOT set" do
283
- expect(TeamSnap.backup_file_exists?(nil)).to eq(false)
284
- end
285
-
286
- it "returns false if the file does NOT exist" do
287
- expect(TeamSnap.backup_file_exists?("./some_file_that_does_not_exist")).to eq(false)
288
- end
289
-
290
- it "returns true is the file exists" do
291
- expect(TeamSnap.backup_file_exists?("./Gemfile")).to eq(true)
292
- end
293
- end
294
- end
295
228
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamsnap_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Emmons
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-05 00:00:00.000000000 Z
12
+ date: 2015-10-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  version: '0'
197
197
  requirements: []
198
198
  rubyforge_project:
199
- rubygems_version: 2.4.5
199
+ rubygems_version: 2.4.6
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: A gem to interact with TeamSnap's API