clever-ruby 0.11.1 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +15 -1
- data/clever-ruby.gemspec +0 -1
- data/lib/clever-ruby.rb +1 -1
- data/lib/clever-ruby/api_resource.rb +43 -7
- data/lib/clever-ruby/district.rb +14 -0
- data/lib/clever-ruby/event.rb +2 -0
- data/lib/clever-ruby/school.rb +2 -0
- data/lib/clever-ruby/school_admin.rb +17 -0
- data/lib/clever-ruby/section.rb +2 -0
- data/lib/clever-ruby/student.rb +2 -0
- data/lib/clever-ruby/teacher.rb +2 -0
- data/lib/clever-ruby/util.rb +1 -9
- data/lib/clever-ruby/version.rb +1 -1
- data/test/data/vcr_cassettes/Clever_APIOperations_List/counts_district_properly.yml +14 -8
- data/test/data/vcr_cassettes/Clever_APIOperations_List/counts_event_properly.yml +14 -8
- data/test/data/vcr_cassettes/Clever_APIOperations_List/counts_school_admin_properly.yml +52 -0
- data/test/data/vcr_cassettes/Clever_APIOperations_List/counts_school_properly.yml +14 -8
- data/test/data/vcr_cassettes/Clever_APIOperations_List/counts_section_properly.yml +14 -8
- data/test/data/vcr_cassettes/Clever_APIOperations_List/counts_student_properly.yml +14 -8
- data/test/data/vcr_cassettes/Clever_APIOperations_List/counts_teacher_properly.yml +14 -8
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_a_single_district.yml +28 -16
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_a_single_event.yml +28 -16
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_a_single_school.yml +28 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_a_single_school_admin.yml +101 -0
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_a_single_section.yml +30 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_a_single_student.yml +30 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_a_single_teacher.yml +28 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_districts_by_page.yml +28 -16
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_districts_with_multiple_ids.yml +28 -16
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_events_by_page.yml +24 -10
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_events_with_multiple_ids.yml +30 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_school_admins_by_page.yml +101 -0
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_school_admins_with_multiple_ids.yml +101 -0
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_schools_by_page.yml +28 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_schools_with_multiple_ids.yml +28 -20
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_sections_by_page.yml +34 -22
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_sections_with_multiple_ids.yml +30 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_students_by_page.yml +48 -36
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_students_with_multiple_ids.yml +30 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_teachers_by_page.yml +27 -17
- data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_teachers_with_multiple_ids.yml +28 -20
- data/test/data/vcr_cassettes/Clever_APIOperations_List/retrieves_all_district.yml +28 -16
- data/test/data/vcr_cassettes/Clever_APIOperations_List/retrieves_all_event.yml +28 -14
- data/test/data/vcr_cassettes/Clever_APIOperations_List/retrieves_all_school.yml +28 -18
- data/test/data/vcr_cassettes/Clever_APIOperations_List/retrieves_all_school_admin.yml +101 -0
- data/test/data/vcr_cassettes/Clever_APIOperations_List/retrieves_all_section.yml +34 -22
- data/test/data/vcr_cassettes/Clever_APIOperations_List/retrieves_all_student.yml +48 -36
- data/test/data/vcr_cassettes/Clever_APIOperations_List/retrieves_all_teacher.yml +30 -20
- data/test/data/vcr_cassettes/Clever_District_without_global_token/pages_methods/pages_a_district_s_events.yml +39 -19
- data/test/data/vcr_cassettes/Clever_District_without_global_token/pages_methods/pages_a_district_s_schools.yml +36 -22
- data/test/data/vcr_cassettes/Clever_District_without_global_token/pages_methods/pages_a_district_s_sections.yml +37 -19
- data/test/data/vcr_cassettes/Clever_District_without_global_token/pages_methods/pages_a_district_s_students.yml +37 -19
- data/test/data/vcr_cassettes/Clever_District_without_global_token/pages_methods/pages_a_district_s_teachers.yml +34 -20
- data/test/data/vcr_cassettes/Clever_District_without_global_token/retrieves_a_district_s_school_admins.yml +101 -0
- data/test/data/vcr_cassettes/Clever_District_without_global_token/retrieves_a_district_s_schools.yml +25 -15
- data/test/data/vcr_cassettes/Clever_District_without_global_token/retrieves_a_district_s_sections.yml +26 -14
- data/test/data/vcr_cassettes/Clever_District_without_global_token/retrieves_a_district_s_students.yml +26 -14
- data/test/data/vcr_cassettes/Clever_District_without_global_token/retrieves_a_district_s_teachers.yml +25 -15
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_district_s_events.yml +54 -30
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_district_s_schools.yml +50 -30
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_district_s_sections.yml +51 -27
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_district_s_students.yml +51 -27
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_district_s_teachers.yml +50 -30
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_school_admin_s_schools.yml +205 -0
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_school_s_district.yml +43 -27
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_school_s_events.yml +56 -30
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_school_s_sections.yml +58 -36
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_school_s_students.yml +69 -45
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_school_s_teachers.yml +52 -34
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_section_s_district.yml +42 -24
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_section_s_events.yml +58 -30
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_section_s_school.yml +41 -23
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_section_s_students.yml +45 -27
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_section_s_teacher.yml +41 -23
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_student_s_district.yml +42 -24
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_student_s_events.yml +58 -30
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_student_s_school.yml +41 -23
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_student_s_sections.yml +56 -32
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_student_s_teachers.yml +54 -30
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_teacher_s_district.yml +40 -24
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_teacher_s_events.yml +56 -30
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_teacher_s_school.yml +39 -23
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_teacher_s_sections.yml +54 -32
- data/test/data/vcr_cassettes/Clever_NestedResource/retrieves_a_teacher_s_students.yml +54 -32
- data/test/data/vcr_cassettes/Error_handling/raises_an_InvalidRequestError_when_given_a_bad_created_since.yml +42 -24
- data/test/data/vcr_cassettes/Optional_attributes/has_the_expected_value_for_an_optional_attribute_that_is_present.yml +13 -7
- data/test/data/vcr_cassettes/last_method/page/has_working_first_and_last_methods.yml +142 -61
- data/test/integration/api_operations/list_test.rb +5 -3
- data/test/integration/district_with_non_global_token_test.rb +7 -0
- data/test/integration/last_test.rb +3 -2
- data/test/integration/nested_resource_test.rb +3 -2
- data/test/unit/api_resource_test.rb +29 -14
- data/test/unit/clever_test.rb +1 -0
- metadata +17 -16
data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_districts_with_multiple_ids.yml
CHANGED
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
|
-
-
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
14
|
Authorization:
|
@@ -25,24 +25,30 @@ http_interactions:
|
|
25
25
|
Access-Control-Allow-Methods:
|
26
26
|
- GET,PATCH,POST,DELETE
|
27
27
|
Access-Control-Allow-Origin:
|
28
|
-
-
|
28
|
+
- "*"
|
29
29
|
Content-Type:
|
30
30
|
- application/json; charset=utf-8
|
31
31
|
Date:
|
32
|
-
- Sat,
|
33
|
-
Server:
|
34
|
-
- nginx/1.4.7
|
32
|
+
- Sat, 26 Sep 2015 17:41:27 GMT
|
35
33
|
X-Powered-By:
|
36
34
|
- Express
|
35
|
+
X-Ratelimit-Bucket:
|
36
|
+
- bearer
|
37
|
+
X-Ratelimit-Limit:
|
38
|
+
- '1200'
|
39
|
+
X-Ratelimit-Remaining:
|
40
|
+
- '1116'
|
41
|
+
X-Ratelimit-Reset:
|
42
|
+
- '1443289303'
|
37
43
|
Content-Length:
|
38
44
|
- '226'
|
39
45
|
Connection:
|
40
46
|
- keep-alive
|
41
47
|
body:
|
42
|
-
encoding:
|
43
|
-
string:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"data":[{"data":{"name":"Demo District","id":"4fd43cc56d11340000000005"},"uri":"/v1.1/districts/4fd43cc56d11340000000005"}],"paging":{"current":1,"total":1,"count":1},"links":[{"rel":"self","uri":"/v1.1/districts?limit=20"}]}'
|
44
50
|
http_version:
|
45
|
-
recorded_at: Sat,
|
51
|
+
recorded_at: Sat, 26 Sep 2015 17:41:27 GMT
|
46
52
|
- request:
|
47
53
|
method: get
|
48
54
|
uri: https://api.clever.com/v1.1/districts?where=%7B%22_id%22:%7B%22$in%22:%5B%224fd43cc56d11340000000005%22%5D%7D%7D
|
@@ -51,7 +57,7 @@ http_interactions:
|
|
51
57
|
string: ''
|
52
58
|
headers:
|
53
59
|
Accept:
|
54
|
-
-
|
60
|
+
- "*/*; q=0.5, application/xml"
|
55
61
|
Accept-Encoding:
|
56
62
|
- gzip, deflate
|
57
63
|
Authorization:
|
@@ -68,22 +74,28 @@ http_interactions:
|
|
68
74
|
Access-Control-Allow-Methods:
|
69
75
|
- GET,PATCH,POST,DELETE
|
70
76
|
Access-Control-Allow-Origin:
|
71
|
-
-
|
77
|
+
- "*"
|
72
78
|
Content-Type:
|
73
79
|
- application/json; charset=utf-8
|
74
80
|
Date:
|
75
|
-
- Sat,
|
76
|
-
Server:
|
77
|
-
- nginx/1.4.7
|
81
|
+
- Sat, 26 Sep 2015 17:41:27 GMT
|
78
82
|
X-Powered-By:
|
79
83
|
- Express
|
84
|
+
X-Ratelimit-Bucket:
|
85
|
+
- bearer
|
86
|
+
X-Ratelimit-Limit:
|
87
|
+
- '1200'
|
88
|
+
X-Ratelimit-Remaining:
|
89
|
+
- '1115'
|
90
|
+
X-Ratelimit-Reset:
|
91
|
+
- '1443289303'
|
80
92
|
Content-Length:
|
81
93
|
- '288'
|
82
94
|
Connection:
|
83
95
|
- keep-alive
|
84
96
|
body:
|
85
|
-
encoding:
|
86
|
-
string:
|
97
|
+
encoding: UTF-8
|
98
|
+
string: '{"data":[{"data":{"name":"Demo District","id":"4fd43cc56d11340000000005"},"uri":"/v1.1/districts/4fd43cc56d11340000000005"}],"paging":{"current":1,"total":1,"count":1},"links":[{"rel":"self","uri":"/v1.1/districts?where=%7B%22_id%22:%7B%22$in%22:[%224fd43cc56d11340000000005%22]%7D%7D"}]}'
|
87
99
|
http_version:
|
88
|
-
recorded_at: Sat,
|
100
|
+
recorded_at: Sat, 26 Sep 2015 17:41:27 GMT
|
89
101
|
recorded_with: VCR 2.9.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
|
-
-
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
14
|
Authorization:
|
@@ -25,17 +25,23 @@ http_interactions:
|
|
25
25
|
Access-Control-Allow-Methods:
|
26
26
|
- GET,PATCH,POST,DELETE
|
27
27
|
Access-Control-Allow-Origin:
|
28
|
-
-
|
28
|
+
- "*"
|
29
29
|
Content-Type:
|
30
30
|
- application/json; charset=utf-8
|
31
31
|
Date:
|
32
|
-
- Sat,
|
32
|
+
- Sat, 26 Sep 2015 17:41:05 GMT
|
33
33
|
Etag:
|
34
|
-
-
|
35
|
-
Server:
|
36
|
-
- nginx/1.4.7
|
34
|
+
- '"438255836"'
|
37
35
|
X-Powered-By:
|
38
36
|
- Express
|
37
|
+
X-Ratelimit-Bucket:
|
38
|
+
- bearer
|
39
|
+
X-Ratelimit-Limit:
|
40
|
+
- '1200'
|
41
|
+
X-Ratelimit-Remaining:
|
42
|
+
- '1153'
|
43
|
+
X-Ratelimit-Reset:
|
44
|
+
- '1443289303'
|
39
45
|
Content-Length:
|
40
46
|
- '9308'
|
41
47
|
Connection:
|
@@ -61,7 +67,7 @@ http_interactions:
|
|
61
67
|
Science, Class 003","course_number":"3","district":"4fd43cc56d11340000000005","grade":"Kindergarten","name":"Kindergarten
|
62
68
|
Science, Class 003 - 003 - J. Stark","period":"4","school":"530e595026403103360ff9fe","sis_id":"866","subject":"science","teacher":"50c20477987eda0d3d02d310","term":{"name":"Y1","start_date":"2012-08-01","end_date":"2013-06-01"},"students":["530e5961049e75a9262cffbe","530e5961049e75a9262cffc3","530e5961049e75a9262d0000","530e5961049e75a9262d0036","530e5961049e75a9262d0074","530e5962049e75a9262d00c5","530e5963049e75a9262d01fa","530e5964049e75a9262d027e","530e5964049e75a9262d02a8","530e5964049e75a9262d02ab","530e5964049e75a9262d02f7","530e5965049e75a9262d03b2","530e5965049e75a9262d03bf","530e5966049e75a9262d040a","530e5966049e75a9262d0449","530e5967049e75a9262d051b","530e5967049e75a9262d0565","530e5968049e75a9262d05f0","530e5968049e75a9262d061e","530e5968049e75a9262d0623"],"last_modified":"2014-02-26T21:15:39.195Z","created":"2014-02-26T21:15:39.193Z","id":"530e597b049e75a9262d0c12"},"previous_attributes":{"subject":"homeroom/advisory"}},"created":"2014-08-28T18:01:14.088Z","id":"53ff6e6b322eced00200008e"},"uri":"/v1.1/events/53ff6e6b322eced00200008e"}],"paging":{"current":1,"total":1,"count":7},"links":[{"rel":"self","uri":"/v1.1/events"}]}'
|
63
69
|
http_version:
|
64
|
-
recorded_at: Sat,
|
70
|
+
recorded_at: Sat, 26 Sep 2015 17:41:15 GMT
|
65
71
|
- request:
|
66
72
|
method: get
|
67
73
|
uri: https://api.clever.com/v1.1/events?count=true
|
@@ -70,7 +76,7 @@ http_interactions:
|
|
70
76
|
string: ''
|
71
77
|
headers:
|
72
78
|
Accept:
|
73
|
-
-
|
79
|
+
- "*/*; q=0.5, application/xml"
|
74
80
|
Accept-Encoding:
|
75
81
|
- gzip, deflate
|
76
82
|
Authorization:
|
@@ -87,7 +93,7 @@ http_interactions:
|
|
87
93
|
Access-Control-Allow-Methods:
|
88
94
|
- GET,PATCH,POST,DELETE
|
89
95
|
Access-Control-Allow-Origin:
|
90
|
-
-
|
96
|
+
- "*"
|
91
97
|
Content-Type:
|
92
98
|
- application/json; charset=utf-8
|
93
99
|
Date:
|
@@ -96,6 +102,14 @@ http_interactions:
|
|
96
102
|
- nginx/1.4.7
|
97
103
|
X-Powered-By:
|
98
104
|
- Express
|
105
|
+
X-Ratelimit-Bucket:
|
106
|
+
- bearer
|
107
|
+
X-Ratelimit-Limit:
|
108
|
+
- '1200'
|
109
|
+
X-Ratelimit-Remaining:
|
110
|
+
- '1133'
|
111
|
+
X-Ratelimit-Reset:
|
112
|
+
- '1443289303'
|
99
113
|
Content-Length:
|
100
114
|
- '68'
|
101
115
|
Connection:
|
@@ -104,5 +118,5 @@ http_interactions:
|
|
104
118
|
encoding: US-ASCII
|
105
119
|
string: ! '{"count":7,"links":[{"rel":"self","uri":"/v1.1/events?count=true"}]}'
|
106
120
|
http_version:
|
107
|
-
recorded_at: Sat,
|
121
|
+
recorded_at: Sat, 26 Sep 2015 17:41:21 GMT
|
108
122
|
recorded_with: VCR 2.9.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
|
-
-
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
14
|
Authorization:
|
@@ -25,24 +25,30 @@ http_interactions:
|
|
25
25
|
Access-Control-Allow-Methods:
|
26
26
|
- GET,PATCH,POST,DELETE
|
27
27
|
Access-Control-Allow-Origin:
|
28
|
-
-
|
28
|
+
- "*"
|
29
29
|
Content-Type:
|
30
30
|
- application/json; charset=utf-8
|
31
31
|
Date:
|
32
|
-
- Sat,
|
32
|
+
- Sat, 26 Sep 2015 17:41:21 GMT
|
33
33
|
Etag:
|
34
|
-
-
|
35
|
-
Server:
|
36
|
-
- nginx/1.4.7
|
34
|
+
- '"-1906492098"'
|
37
35
|
X-Powered-By:
|
38
36
|
- Express
|
37
|
+
X-Ratelimit-Bucket:
|
38
|
+
- bearer
|
39
|
+
X-Ratelimit-Limit:
|
40
|
+
- '1200'
|
41
|
+
X-Ratelimit-Remaining:
|
42
|
+
- '1131'
|
43
|
+
X-Ratelimit-Reset:
|
44
|
+
- '1443289303'
|
39
45
|
Content-Length:
|
40
46
|
- '9317'
|
41
47
|
Connection:
|
42
48
|
- keep-alive
|
43
49
|
body:
|
44
|
-
encoding:
|
45
|
-
string:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"data":[{"data":{"type":"sections.updated","data":{"object":{"course_name":"Grade
|
46
52
|
3 Math, Class 301","course_number":"301","district":"4fd43cc56d11340000000005","grade":"3","name":"Grade
|
47
53
|
3 Math, Class 301 - 301 - S. Block","period":"5","school":"530e595026403103360ff9fe","sis_id":"771","subject":"math","teacher":"530e5955d50c310f36112c15","term":{"name":"Y1","start_date":"2012-08-01","end_date":"2013-06-01"},"students":["530e5962049e75a9262d00fb","530e5962049e75a9262d015a","530e5963049e75a9262d0219","530e5964049e75a9262d0270","530e5964049e75a9262d02cf","530e5964049e75a9262d02fc","530e5965049e75a9262d0341","530e5965049e75a9262d0343","530e5965049e75a9262d038d","530e5965049e75a9262d03a7","530e5966049e75a9262d0415","530e5966049e75a9262d0439","530e5966049e75a9262d0458","530e5966049e75a9262d04d5","530e5967049e75a9262d04f4","530e5967049e75a9262d051f"],"last_modified":"2014-07-07T15:46:35.850Z","created":"2014-02-26T21:15:38.738Z","id":"530e597a049e75a9262d0baf"},"previous_attributes":{"students":["530e5960049e75a9262cff56","530e5962049e75a9262d00fb","530e5962049e75a9262d015a","530e5963049e75a9262d0219","530e5964049e75a9262d0270","530e5964049e75a9262d02cf","530e5964049e75a9262d02fc","530e5965049e75a9262d0341","530e5965049e75a9262d0343","530e5965049e75a9262d038d","530e5965049e75a9262d03a7","530e5966049e75a9262d0415","530e5966049e75a9262d0439","530e5966049e75a9262d0458","530e5966049e75a9262d04d5","530e5967049e75a9262d04f4","530e5967049e75a9262d051f"]}},"created":"2014-08-28T18:01:13.872Z","id":"53ff6e6b322eced002000088"},"uri":"/v1.1/events/53ff6e6b322eced002000088"},{"data":{"type":"sections.updated","data":{"object":{"course_name":"Kindergarten
|
48
54
|
Music, Class 001","course_number":"1","district":"4fd43cc56d11340000000005","grade":"Kindergarten","name":"Kindergarten
|
@@ -61,7 +67,7 @@ http_interactions:
|
|
61
67
|
Science, Class 003","course_number":"3","district":"4fd43cc56d11340000000005","grade":"Kindergarten","name":"Kindergarten
|
62
68
|
Science, Class 003 - 003 - J. Stark","period":"4","school":"530e595026403103360ff9fe","sis_id":"866","subject":"science","teacher":"50c20477987eda0d3d02d310","term":{"name":"Y1","start_date":"2012-08-01","end_date":"2013-06-01"},"students":["530e5961049e75a9262cffbe","530e5961049e75a9262cffc3","530e5961049e75a9262d0000","530e5961049e75a9262d0036","530e5961049e75a9262d0074","530e5962049e75a9262d00c5","530e5963049e75a9262d01fa","530e5964049e75a9262d027e","530e5964049e75a9262d02a8","530e5964049e75a9262d02ab","530e5964049e75a9262d02f7","530e5965049e75a9262d03b2","530e5965049e75a9262d03bf","530e5966049e75a9262d040a","530e5966049e75a9262d0449","530e5967049e75a9262d051b","530e5967049e75a9262d0565","530e5968049e75a9262d05f0","530e5968049e75a9262d061e","530e5968049e75a9262d0623"],"last_modified":"2014-02-26T21:15:39.195Z","created":"2014-02-26T21:15:39.193Z","id":"530e597b049e75a9262d0c12"},"previous_attributes":{"subject":"homeroom/advisory"}},"created":"2014-08-28T18:01:14.088Z","id":"53ff6e6b322eced00200008e"},"uri":"/v1.1/events/53ff6e6b322eced00200008e"}],"paging":{"current":1,"total":1,"count":7},"links":[{"rel":"self","uri":"/v1.1/events?limit=20"}]}'
|
63
69
|
http_version:
|
64
|
-
recorded_at: Sat,
|
70
|
+
recorded_at: Sat, 26 Sep 2015 17:41:21 GMT
|
65
71
|
- request:
|
66
72
|
method: get
|
67
73
|
uri: https://api.clever.com/v1.1/events?where=%7B%22_id%22:%7B%22$in%22:%5B%2253ff6e6b322eced002000088%22,%2253ff6e6b322eced00200008a%22,%2253ff6e6b322eced00200008c%22,%2253ff6e6b322eced00200008e%22%5D%7D%7D
|
@@ -70,7 +76,7 @@ http_interactions:
|
|
70
76
|
string: ''
|
71
77
|
headers:
|
72
78
|
Accept:
|
73
|
-
-
|
79
|
+
- "*/*; q=0.5, application/xml"
|
74
80
|
Accept-Encoding:
|
75
81
|
- gzip, deflate
|
76
82
|
Authorization:
|
@@ -87,24 +93,30 @@ http_interactions:
|
|
87
93
|
Access-Control-Allow-Methods:
|
88
94
|
- GET,PATCH,POST,DELETE
|
89
95
|
Access-Control-Allow-Origin:
|
90
|
-
-
|
96
|
+
- "*"
|
91
97
|
Content-Type:
|
92
98
|
- application/json; charset=utf-8
|
93
99
|
Date:
|
94
|
-
- Sat,
|
100
|
+
- Sat, 26 Sep 2015 17:41:21 GMT
|
95
101
|
Etag:
|
96
|
-
-
|
97
|
-
Server:
|
98
|
-
- nginx/1.4.7
|
102
|
+
- '"-738655479"'
|
99
103
|
X-Powered-By:
|
100
104
|
- Express
|
105
|
+
X-Ratelimit-Bucket:
|
106
|
+
- bearer
|
107
|
+
X-Ratelimit-Limit:
|
108
|
+
- '1200'
|
109
|
+
X-Ratelimit-Remaining:
|
110
|
+
- '1130'
|
111
|
+
X-Ratelimit-Reset:
|
112
|
+
- '1443289303'
|
101
113
|
Content-Length:
|
102
114
|
- '5654'
|
103
115
|
Connection:
|
104
116
|
- keep-alive
|
105
117
|
body:
|
106
|
-
encoding:
|
107
|
-
string:
|
118
|
+
encoding: UTF-8
|
119
|
+
string: '{"data":[{"data":{"type":"sections.updated","data":{"object":{"course_name":"Grade
|
108
120
|
3 Math, Class 301","course_number":"301","district":"4fd43cc56d11340000000005","grade":"3","name":"Grade
|
109
121
|
3 Math, Class 301 - 301 - S. Block","period":"5","school":"530e595026403103360ff9fe","sis_id":"771","subject":"math","teacher":"530e5955d50c310f36112c15","term":{"name":"Y1","start_date":"2012-08-01","end_date":"2013-06-01"},"students":["530e5962049e75a9262d00fb","530e5962049e75a9262d015a","530e5963049e75a9262d0219","530e5964049e75a9262d0270","530e5964049e75a9262d02cf","530e5964049e75a9262d02fc","530e5965049e75a9262d0341","530e5965049e75a9262d0343","530e5965049e75a9262d038d","530e5965049e75a9262d03a7","530e5966049e75a9262d0415","530e5966049e75a9262d0439","530e5966049e75a9262d0458","530e5966049e75a9262d04d5","530e5967049e75a9262d04f4","530e5967049e75a9262d051f"],"last_modified":"2014-07-07T15:46:35.850Z","created":"2014-02-26T21:15:38.738Z","id":"530e597a049e75a9262d0baf"},"previous_attributes":{"students":["530e5960049e75a9262cff56","530e5962049e75a9262d00fb","530e5962049e75a9262d015a","530e5963049e75a9262d0219","530e5964049e75a9262d0270","530e5964049e75a9262d02cf","530e5964049e75a9262d02fc","530e5965049e75a9262d0341","530e5965049e75a9262d0343","530e5965049e75a9262d038d","530e5965049e75a9262d03a7","530e5966049e75a9262d0415","530e5966049e75a9262d0439","530e5966049e75a9262d0458","530e5966049e75a9262d04d5","530e5967049e75a9262d04f4","530e5967049e75a9262d051f"]}},"created":"2014-08-28T18:01:13.872Z","id":"53ff6e6b322eced002000088"},"uri":"/v1.1/events/53ff6e6b322eced002000088"},{"data":{"type":"sections.updated","data":{"object":{"course_name":"Kindergarten
|
110
122
|
Music, Class 002","course_number":"2","district":"4fd43cc56d11340000000005","grade":"Kindergarten","name":"Kindergarten
|
@@ -115,5 +127,5 @@ http_interactions:
|
|
115
127
|
Science, Class 003","course_number":"3","district":"4fd43cc56d11340000000005","grade":"Kindergarten","name":"Kindergarten
|
116
128
|
Science, Class 003 - 003 - J. Stark","period":"4","school":"530e595026403103360ff9fe","sis_id":"866","subject":"science","teacher":"50c20477987eda0d3d02d310","term":{"name":"Y1","start_date":"2012-08-01","end_date":"2013-06-01"},"students":["530e5961049e75a9262cffbe","530e5961049e75a9262cffc3","530e5961049e75a9262d0000","530e5961049e75a9262d0036","530e5961049e75a9262d0074","530e5962049e75a9262d00c5","530e5963049e75a9262d01fa","530e5964049e75a9262d027e","530e5964049e75a9262d02a8","530e5964049e75a9262d02ab","530e5964049e75a9262d02f7","530e5965049e75a9262d03b2","530e5965049e75a9262d03bf","530e5966049e75a9262d040a","530e5966049e75a9262d0449","530e5967049e75a9262d051b","530e5967049e75a9262d0565","530e5968049e75a9262d05f0","530e5968049e75a9262d061e","530e5968049e75a9262d0623"],"last_modified":"2014-02-26T21:15:39.195Z","created":"2014-02-26T21:15:39.193Z","id":"530e597b049e75a9262d0c12"},"previous_attributes":{"subject":"homeroom/advisory"}},"created":"2014-08-28T18:01:14.088Z","id":"53ff6e6b322eced00200008e"},"uri":"/v1.1/events/53ff6e6b322eced00200008e"}],"paging":{"current":1,"total":1,"count":4},"links":[{"rel":"self","uri":"/v1.1/events?where=%7B%22_id%22:%7B%22$in%22:[%2253ff6e6b322eced002000088%22,%2253ff6e6b322eced00200008a%22,%2253ff6e6b322eced00200008c%22,%2253ff6e6b322eced00200008e%22]%7D%7D"}]}'
|
117
129
|
http_version:
|
118
|
-
recorded_at: Sat,
|
130
|
+
recorded_at: Sat, 26 Sep 2015 17:41:22 GMT
|
119
131
|
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.clever.com/v1.1/school_admins
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Access-Control-Allow-Headers:
|
24
|
+
- Content-Type,Authorization,X-Requested-With,Accept,Origin,Referer,User-Agent
|
25
|
+
Access-Control-Allow-Methods:
|
26
|
+
- GET,PATCH,POST,DELETE
|
27
|
+
Access-Control-Allow-Origin:
|
28
|
+
- "*"
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Date:
|
32
|
+
- Sat, 26 Sep 2015 17:40:50 GMT
|
33
|
+
X-Powered-By:
|
34
|
+
- Express
|
35
|
+
X-Ratelimit-Bucket:
|
36
|
+
- bearer
|
37
|
+
X-Ratelimit-Limit:
|
38
|
+
- '1200'
|
39
|
+
X-Ratelimit-Remaining:
|
40
|
+
- '1190'
|
41
|
+
X-Ratelimit-Reset:
|
42
|
+
- '1443289303'
|
43
|
+
Content-Length:
|
44
|
+
- '352'
|
45
|
+
Connection:
|
46
|
+
- keep-alive
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"data":[{"data":{"district":"4fd43cc56d11340000000005","email":"thinkerton@example.com","name":{"first":"Think","last":"Thinkerton"},"schools":["530e595026403103360ff9fd"],"staff_id":"1212","title":"Principal","id":"5601b814141fd30001000017"},"uri":"/v1.1/school_admins/5601b814141fd30001000017"}],"links":[{"rel":"self","uri":"/v1.1/school_admins"}]}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Sat, 26 Sep 2015 17:40:51 GMT
|
52
|
+
- request:
|
53
|
+
method: get
|
54
|
+
uri: https://api.clever.com/v1.1/school_admins?count=true
|
55
|
+
body:
|
56
|
+
encoding: US-ASCII
|
57
|
+
string: ''
|
58
|
+
headers:
|
59
|
+
Accept:
|
60
|
+
- "*/*; q=0.5, application/xml"
|
61
|
+
Accept-Encoding:
|
62
|
+
- gzip, deflate
|
63
|
+
Authorization:
|
64
|
+
- Bearer DEMO_TOKEN
|
65
|
+
User-Agent:
|
66
|
+
- Ruby
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 200
|
70
|
+
message: OK
|
71
|
+
headers:
|
72
|
+
Access-Control-Allow-Headers:
|
73
|
+
- Content-Type,Authorization,X-Requested-With,Accept,Origin,Referer,User-Agent
|
74
|
+
Access-Control-Allow-Methods:
|
75
|
+
- GET,PATCH,POST,DELETE
|
76
|
+
Access-Control-Allow-Origin:
|
77
|
+
- "*"
|
78
|
+
Content-Type:
|
79
|
+
- application/json; charset=utf-8
|
80
|
+
Date:
|
81
|
+
- Sat, 26 Sep 2015 17:40:51 GMT
|
82
|
+
X-Powered-By:
|
83
|
+
- Express
|
84
|
+
X-Ratelimit-Bucket:
|
85
|
+
- bearer
|
86
|
+
X-Ratelimit-Limit:
|
87
|
+
- '1200'
|
88
|
+
X-Ratelimit-Remaining:
|
89
|
+
- '1189'
|
90
|
+
X-Ratelimit-Reset:
|
91
|
+
- '1443289303'
|
92
|
+
Content-Length:
|
93
|
+
- '75'
|
94
|
+
Connection:
|
95
|
+
- keep-alive
|
96
|
+
body:
|
97
|
+
encoding: UTF-8
|
98
|
+
string: '{"count":1,"links":[{"rel":"self","uri":"/v1.1/school_admins?count=true"}]}'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Sat, 26 Sep 2015 17:40:51 GMT
|
101
|
+
recorded_with: VCR 2.9.3
|
data/test/data/vcr_cassettes/Clever_APIOperations_List/finds_school_admins_with_multiple_ids.yml
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.clever.com/v1.1/school_admins?limit=20
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Access-Control-Allow-Headers:
|
24
|
+
- Content-Type,Authorization,X-Requested-With,Accept,Origin,Referer,User-Agent
|
25
|
+
Access-Control-Allow-Methods:
|
26
|
+
- GET,PATCH,POST,DELETE
|
27
|
+
Access-Control-Allow-Origin:
|
28
|
+
- "*"
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Date:
|
32
|
+
- Sat, 26 Sep 2015 17:41:02 GMT
|
33
|
+
X-Powered-By:
|
34
|
+
- Express
|
35
|
+
X-Ratelimit-Bucket:
|
36
|
+
- bearer
|
37
|
+
X-Ratelimit-Limit:
|
38
|
+
- '1200'
|
39
|
+
X-Ratelimit-Remaining:
|
40
|
+
- '1159'
|
41
|
+
X-Ratelimit-Reset:
|
42
|
+
- '1443289303'
|
43
|
+
Content-Length:
|
44
|
+
- '361'
|
45
|
+
Connection:
|
46
|
+
- keep-alive
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"data":[{"data":{"district":"4fd43cc56d11340000000005","email":"thinkerton@example.com","name":{"first":"Think","last":"Thinkerton"},"schools":["530e595026403103360ff9fd"],"staff_id":"1212","title":"Principal","id":"5601b814141fd30001000017"},"uri":"/v1.1/school_admins/5601b814141fd30001000017"}],"links":[{"rel":"self","uri":"/v1.1/school_admins?limit=20"}]}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Sat, 26 Sep 2015 17:41:03 GMT
|
52
|
+
- request:
|
53
|
+
method: get
|
54
|
+
uri: https://api.clever.com/v1.1/school_admins?where=%7B%22_id%22:%7B%22$in%22:%5B%225601b814141fd30001000017%22%5D%7D%7D
|
55
|
+
body:
|
56
|
+
encoding: US-ASCII
|
57
|
+
string: ''
|
58
|
+
headers:
|
59
|
+
Accept:
|
60
|
+
- "*/*; q=0.5, application/xml"
|
61
|
+
Accept-Encoding:
|
62
|
+
- gzip, deflate
|
63
|
+
Authorization:
|
64
|
+
- Bearer DEMO_TOKEN
|
65
|
+
User-Agent:
|
66
|
+
- Ruby
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 200
|
70
|
+
message: OK
|
71
|
+
headers:
|
72
|
+
Access-Control-Allow-Headers:
|
73
|
+
- Content-Type,Authorization,X-Requested-With,Accept,Origin,Referer,User-Agent
|
74
|
+
Access-Control-Allow-Methods:
|
75
|
+
- GET,PATCH,POST,DELETE
|
76
|
+
Access-Control-Allow-Origin:
|
77
|
+
- "*"
|
78
|
+
Content-Type:
|
79
|
+
- application/json; charset=utf-8
|
80
|
+
Date:
|
81
|
+
- Sat, 26 Sep 2015 17:41:03 GMT
|
82
|
+
X-Powered-By:
|
83
|
+
- Express
|
84
|
+
X-Ratelimit-Bucket:
|
85
|
+
- bearer
|
86
|
+
X-Ratelimit-Limit:
|
87
|
+
- '1200'
|
88
|
+
X-Ratelimit-Remaining:
|
89
|
+
- '1158'
|
90
|
+
X-Ratelimit-Reset:
|
91
|
+
- '1443289303'
|
92
|
+
Content-Length:
|
93
|
+
- '433'
|
94
|
+
Connection:
|
95
|
+
- keep-alive
|
96
|
+
body:
|
97
|
+
encoding: UTF-8
|
98
|
+
string: '{"data":[{"data":{"district":"4fd43cc56d11340000000005","email":"thinkerton@example.com","name":{"first":"Think","last":"Thinkerton"},"schools":["530e595026403103360ff9fd"],"staff_id":"1212","title":"Principal","id":"5601b814141fd30001000017"},"uri":"/v1.1/school_admins/5601b814141fd30001000017"}],"links":[{"rel":"self","uri":"/v1.1/school_admins?where=%7B%22_id%22%3A%7B%22%24in%22%3A%5B%225601b814141fd30001000017%22%5D%7D%7D"}]}'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Sat, 26 Sep 2015 17:41:03 GMT
|
101
|
+
recorded_with: VCR 2.9.3
|