clever-ruby 0.7.0 → 0.8.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 +8 -8
- data/CHANGELOG.md +4 -0
- data/clever-ruby.gemspec +2 -1
- data/lib/clever-ruby/api_operations/list.rb +71 -0
- data/lib/clever-ruby/api_operations/nested_list.rb +49 -0
- data/lib/clever-ruby/api_operations/page.rb +16 -8
- data/lib/clever-ruby/version.rb +1 -1
- data/test/data/vcr_cassettes/{district_count.yml → Clever_APIOperations_List/counts_district_properly.yml} +6 -4
- data/test/data/vcr_cassettes/{event_count.yml → Clever_APIOperations_List/counts_event_properly.yml} +6 -4
- data/test/data/vcr_cassettes/{school_count.yml → Clever_APIOperations_List/counts_school_properly.yml} +6 -4
- data/test/data/vcr_cassettes/{section_count.yml → Clever_APIOperations_List/counts_section_properly.yml} +6 -4
- data/test/data/vcr_cassettes/{student_count.yml → Clever_APIOperations_List/counts_student_properly.yml} +6 -4
- data/test/data/vcr_cassettes/{teacher_count.yml → Clever_APIOperations_List/counts_teacher_properly.yml} +6 -4
- data/test/data/vcr_cassettes/{district_find_one.yml → Clever_APIOperations_List/finds_a_single_district.yml} +11 -7
- data/test/data/vcr_cassettes/{event_find_one.yml → Clever_APIOperations_List/finds_a_single_event.yml} +11 -7
- data/test/data/vcr_cassettes/{school_find_one.yml → Clever_APIOperations_List/finds_a_single_school.yml} +11 -7
- data/test/data/vcr_cassettes/{section_find_one.yml → Clever_APIOperations_List/finds_a_single_section.yml} +11 -7
- data/test/data/vcr_cassettes/{student_find_one.yml → Clever_APIOperations_List/finds_a_single_student.yml} +11 -7
- data/test/data/vcr_cassettes/{teacher_find_one.yml → Clever_APIOperations_List/finds_a_single_teacher.yml} +11 -7
- data/test/data/vcr_cassettes/{districts.yml → Clever_APIOperations_List/finds_districts_by_page.yml} +11 -7
- data/test/data/vcr_cassettes/{district_find_multiple.yml → Clever_APIOperations_List/finds_districts_with_multiple_ids.yml} +11 -7
- data/test/data/vcr_cassettes/{events.yml → Clever_APIOperations_List/finds_events_by_page.yml} +11 -7
- data/test/data/vcr_cassettes/{event_find_multiple.yml → Clever_APIOperations_List/finds_events_with_multiple_ids.yml} +11 -7
- data/test/data/vcr_cassettes/{schools.yml → Clever_APIOperations_List/finds_schools_by_page.yml} +11 -7
- data/test/data/vcr_cassettes/{school_find_multiple.yml → Clever_APIOperations_List/finds_schools_with_multiple_ids.yml} +11 -7
- data/test/data/vcr_cassettes/{section_find_by_page.yml → Clever_APIOperations_List/finds_sections_by_page.yml} +26 -16
- data/test/data/vcr_cassettes/{section_find_multiple.yml → Clever_APIOperations_List/finds_sections_with_multiple_ids.yml} +11 -7
- data/test/data/vcr_cassettes/{students.yml → Clever_APIOperations_List/finds_students_by_page.yml} +61 -37
- data/test/data/vcr_cassettes/{student_find_multiple.yml → Clever_APIOperations_List/finds_students_with_multiple_ids.yml} +11 -7
- data/test/data/vcr_cassettes/{teachers.yml → Clever_APIOperations_List/finds_teachers_by_page.yml} +11 -7
- data/test/data/vcr_cassettes/{teacher_find_multiple.yml → Clever_APIOperations_List/finds_teachers_with_multiple_ids.yml} +11 -7
- data/test/data/vcr_cassettes/{district_find_by_page.yml → Clever_APIOperations_List/retrieves_all_district.yml} +11 -7
- data/test/data/vcr_cassettes/{event_find_by_page.yml → Clever_APIOperations_List/retrieves_all_event.yml} +11 -7
- data/test/data/vcr_cassettes/{school_find_by_page.yml → Clever_APIOperations_List/retrieves_all_school.yml} +11 -7
- data/test/data/vcr_cassettes/{sections.yml → Clever_APIOperations_List/retrieves_all_section.yml} +26 -16
- data/test/data/vcr_cassettes/{student_find_by_page.yml → Clever_APIOperations_List/retrieves_all_student.yml} +61 -37
- data/test/data/vcr_cassettes/{teacher_find_by_page.yml → Clever_APIOperations_List/retrieves_all_teacher.yml} +11 -7
- data/test/data/vcr_cassettes/{districts_event_pages.yml → Clever_District/pages_methods/pages_a_district_s_events.yml} +56 -34
- data/test/data/vcr_cassettes/{districts_school_pages.yml → Clever_District/pages_methods/pages_a_district_s_schools.yml} +26 -16
- data/test/data/vcr_cassettes/{districts_section_pages.yml → Clever_District/pages_methods/pages_a_district_s_sections.yml} +206 -124
- data/test/data/vcr_cassettes/{districts_student_pages.yml → Clever_District/pages_methods/pages_a_district_s_students.yml} +121 -73
- data/test/data/vcr_cassettes/{districts_teacher_pages.yml → Clever_District/pages_methods/pages_a_district_s_teachers.yml} +61 -37
- data/test/data/vcr_cassettes/{district_events.yml → Clever_NestedResource/retrieves_a_district_s_events.yml} +21 -13
- data/test/data/vcr_cassettes/{district_schools.yml → Clever_NestedResource/retrieves_a_district_s_schools.yml} +21 -13
- data/test/data/vcr_cassettes/{district_sections.yml → Clever_NestedResource/retrieves_a_district_s_sections.yml} +51 -31
- data/test/data/vcr_cassettes/{district_students.yml → Clever_NestedResource/retrieves_a_district_s_students.yml} +121 -73
- data/test/data/vcr_cassettes/{district_teachers.yml → Clever_NestedResource/retrieves_a_district_s_teachers.yml} +21 -13
- data/test/data/vcr_cassettes/{school_district.yml → Clever_NestedResource/retrieves_a_school_s_district.yml} +16 -10
- data/test/data/vcr_cassettes/{school_events.yml → Clever_NestedResource/retrieves_a_school_s_events.yml} +21 -13
- data/test/data/vcr_cassettes/{school_sections.yml → Clever_NestedResource/retrieves_a_school_s_sections.yml} +31 -19
- data/test/data/vcr_cassettes/{school_students.yml → Clever_NestedResource/retrieves_a_school_s_students.yml} +61 -37
- data/test/data/vcr_cassettes/{school_teachers.yml → Clever_NestedResource/retrieves_a_school_s_teachers.yml} +21 -13
- data/test/data/vcr_cassettes/{section_district.yml → Clever_NestedResource/retrieves_a_section_s_district.yml} +16 -10
- data/test/data/vcr_cassettes/{section_events.yml → Clever_NestedResource/retrieves_a_section_s_events.yml} +21 -13
- data/test/data/vcr_cassettes/{section_school.yml → Clever_NestedResource/retrieves_a_section_s_school.yml} +16 -10
- data/test/data/vcr_cassettes/{section_students.yml → Clever_NestedResource/retrieves_a_section_s_students.yml} +21 -13
- data/test/data/vcr_cassettes/{section_teacher.yml → Clever_NestedResource/retrieves_a_section_s_teacher.yml} +16 -10
- data/test/data/vcr_cassettes/{student_district.yml → Clever_NestedResource/retrieves_a_student_s_district.yml} +16 -10
- data/test/data/vcr_cassettes/{student_events.yml → Clever_NestedResource/retrieves_a_student_s_events.yml} +21 -13
- data/test/data/vcr_cassettes/{student_school.yml → Clever_NestedResource/retrieves_a_student_s_school.yml} +16 -10
- data/test/data/vcr_cassettes/{student_sections.yml → Clever_NestedResource/retrieves_a_student_s_sections.yml} +21 -13
- data/test/data/vcr_cassettes/{student_teachers.yml → Clever_NestedResource/retrieves_a_student_s_teachers.yml} +21 -13
- data/test/data/vcr_cassettes/{teacher_district.yml → Clever_NestedResource/retrieves_a_teacher_s_district.yml} +16 -10
- data/test/data/vcr_cassettes/{teacher_events.yml → Clever_NestedResource/retrieves_a_teacher_s_events.yml} +21 -13
- data/test/data/vcr_cassettes/{teacher_school.yml → Clever_NestedResource/retrieves_a_teacher_s_school.yml} +16 -10
- data/test/data/vcr_cassettes/{teacher_sections.yml → Clever_NestedResource/retrieves_a_teacher_s_sections.yml} +21 -13
- data/test/data/vcr_cassettes/{teacher_students.yml → Clever_NestedResource/retrieves_a_teacher_s_students.yml} +21 -13
- data/test/data/vcr_cassettes/{error_handling.yml → Error_handling/raises_an_InvalidRequestError_when_given_a_bad_created_since.yml} +16 -10
- data/test/data/vcr_cassettes/Optional_attributes/has_the_expected_value_for_an_optional_attribute_that_is_present.yml +49 -0
- data/test/data/vcr_cassettes/last_method/page/has_working_first_and_last_methods.yml +719 -0
- data/test/data/vcr_cassettes/last_method/resource/has_working_first_and_last_methods.yml +648 -0
- data/test/integration/api_operations/list_test.rb +40 -50
- data/test/integration/district_test.rb +13 -15
- data/test/integration/error_handling_test.rb +6 -8
- data/test/integration/last_test.rb +70 -0
- data/test/integration/nested_resource_test.rb +7 -9
- data/test/test_helper.rb +3 -0
- data/test/unit/clever_test.rb +1 -1
- data/test/unit/configuration_test.rb +6 -0
- data/test/unit/optional_attributes_test.rb +4 -10
- metadata +147 -129
- data/test/data/vcr_cassettes/schools_optional_attributes.yml +0 -55
- data/test/data/vcr_cassettes/student_teacher.yml +0 -161
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTg5ZDQyM2U1NTU1N2JkOWEwYWNjN2FlNmIyOTRjM2Q3NWJlZTQ4YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzA5MDg3ODc0YzNkYmI5ZDZlN2NlYzU2ZGQyYjNmZjZiZjIyYmQ0Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDYzNDBmNjFlYTM4Mjc1Yjk4MmM2ZThjNzgzZDdiYzI2YzAxMjIwY2E1Mzhl
|
10
|
+
YjlkZTZhNjI5NjM1YmZjZDg2NzNlZWIyZGJjMzVmMjYwOWIyYTNkOTNiZGY1
|
11
|
+
NGQwNzA4MzhiNjk0ODc5YzUyNmExM2M1MGQyMWUwYzcyM2IyZWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTMwNTI0M2UxODcxNThkYWJkOWEwMmZmNWIxNTY4NjI5YTZiNzE4MGRhMzBi
|
14
|
+
ZjExYjQ1ZGY1MThjNmQyNTEzNDc5M2E2MWEzM2VmMjU3NzU1MzNiMzVmOGVi
|
15
|
+
NjZmYTY3Y2QzZTBkOGJkNjA2OTFmMzFhY2U0MDRlM2MxNTA1YTE=
|
data/CHANGELOG.md
CHANGED
data/clever-ruby.gemspec
CHANGED
@@ -28,7 +28,8 @@ Gem::Specification.new do |gem|
|
|
28
28
|
gem.add_development_dependency 'yard', '~> 0.8.7'
|
29
29
|
gem.add_development_dependency 'yardstick', '~> 0.9.9'
|
30
30
|
gem.add_development_dependency 'redcarpet', '~> 3.1.2'
|
31
|
-
gem.add_development_dependency 'vcr', '~> 2.
|
31
|
+
gem.add_development_dependency 'vcr', '~> 2.9.3'
|
32
|
+
gem.add_development_dependency 'minitest-vcr', '~> 0.1.1'
|
32
33
|
gem.add_development_dependency 'webmock', '~> 1.9.0'
|
33
34
|
gem.add_development_dependency 'rubocop', '~> 0.26.0'
|
34
35
|
end
|
@@ -58,6 +58,77 @@ module Clever
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
# Query for the first element or n elements in the resource
|
62
|
+
# @api public
|
63
|
+
# @param num [nil, Integer] If nil, first elem; else, num elems to fetch
|
64
|
+
# @param filters [Hash] Filters to request with, as per Clever API spec
|
65
|
+
# @return [CleverObject, Clever::APIOperations::Page] elem, or
|
66
|
+
# elems found.
|
67
|
+
# @example
|
68
|
+
# first_elem = Clever::District.first
|
69
|
+
# first_elems = Clever::District.first 20
|
70
|
+
# first_elems.each do |e|
|
71
|
+
# puts e.name
|
72
|
+
# end
|
73
|
+
def first(num = nil, filters = {})
|
74
|
+
if num.nil?
|
75
|
+
filters[:limit] = 1
|
76
|
+
response = Clever.request :get, url, filters
|
77
|
+
Util.convert_to_clever_object response[:data].last
|
78
|
+
else
|
79
|
+
filters[:limit] = num
|
80
|
+
Clever::APIOperations::PageList.new(url, filters).first
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Query for the last element or n elements in the resource
|
85
|
+
# @api public
|
86
|
+
# @param num [nil, Integer] If nil, last elem; else, num elems to fetch
|
87
|
+
# @param filters [Hash] Filters to request with, as per Clever API spec
|
88
|
+
# @return [CleverObject, Clever::APIOperations::ResultsList] elem, or
|
89
|
+
# elems found. If list, sorted in ascending order of ids.
|
90
|
+
# @example
|
91
|
+
# last_elem = Clever::District.last
|
92
|
+
# last_elems = Clever::District.last 20
|
93
|
+
# last_elems.each do |e|
|
94
|
+
# puts e.name
|
95
|
+
# end
|
96
|
+
def last(num = nil, filters = {})
|
97
|
+
filters[:ending_before] = 'last'
|
98
|
+
if num.nil?
|
99
|
+
filters[:limit] = 1
|
100
|
+
response = Clever.request :get, url, filters
|
101
|
+
Util.convert_to_clever_object response[:data].last
|
102
|
+
else
|
103
|
+
filters[:limit] = num
|
104
|
+
Clever::APIOperations::PageList.new(url, filters).to_results_list
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Query for the last element or n elements in the resource
|
109
|
+
# @api public
|
110
|
+
# @param num [nil, Integer] If nil, last elem; else, num elems to fetch
|
111
|
+
# @param filters [Hash] Filters to request with, as per Clever API spec
|
112
|
+
# @return [CleverObject, Clever::APIOperations::ResultsList] elem, or
|
113
|
+
# elems found. If list, sorted in ascending order of ids.
|
114
|
+
# @example
|
115
|
+
# last_elem = Clever::District.last
|
116
|
+
# last_elems = Clever::District.last 20
|
117
|
+
# last_elems.each do |e|
|
118
|
+
# puts e.name
|
119
|
+
# end
|
120
|
+
def last(num = nil, filters = {})
|
121
|
+
filters[:ending_before] = 'last'
|
122
|
+
if num.nil?
|
123
|
+
filters[:limit] = 1
|
124
|
+
response = Clever.request :get, url, filters
|
125
|
+
Util.convert_to_clever_object response[:data].last
|
126
|
+
else
|
127
|
+
filters[:limit] = num
|
128
|
+
Clever::APIOperations::PageList.new(url, filters).to_results_list
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
61
132
|
# Requests number of elements matching the query
|
62
133
|
# @api public
|
63
134
|
# @param filters [Hash, nil] Query parameters to pass, as per Clever API spec
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Clever
|
2
2
|
module APIOperations
|
3
3
|
# Methods for interacting with the API on nested resources
|
4
|
+
# TODO: find a way to not duplicate list.rb code
|
4
5
|
module NestedList
|
5
6
|
# Query a nested list with Clever API params, overriding initialized keys
|
6
7
|
# @api public
|
@@ -41,6 +42,54 @@ module Clever
|
|
41
42
|
response = Clever.request :get, @uri, filters
|
42
43
|
response[:count]
|
43
44
|
end
|
45
|
+
|
46
|
+
# Query for the first element or n elements in the resource
|
47
|
+
# @api public
|
48
|
+
# @param num [nil, Integer] If nil, last elem; else, num elems to fetch
|
49
|
+
# @param filters [Hash] Filters to request with, as per Clever API spec
|
50
|
+
# @return [CleverObject, Clever::APIOperations::Page] elem, or
|
51
|
+
# elems found. If list, sorted in ascending order of ids.
|
52
|
+
# @example
|
53
|
+
# first_elem = Clever::District.first
|
54
|
+
# first_elems = Clever::District.first 20
|
55
|
+
# first_elems.each do |e|
|
56
|
+
# puts e.name
|
57
|
+
# end
|
58
|
+
def first(num = nil, filters = {})
|
59
|
+
filters = @filters.merge filters
|
60
|
+
if num.nil?
|
61
|
+
filters[:limit] = 1
|
62
|
+
response = Clever.request :get, url, filters
|
63
|
+
Util.convert_to_clever_object response[:data].last
|
64
|
+
else
|
65
|
+
filters[:limit] = num
|
66
|
+
Clever::APIOperations::PageList.new(url, filters).first
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Query for the last element or n elements in the resource
|
71
|
+
# @api public
|
72
|
+
# @param num [nil, Integer] If nil, last elem; else, num elems to fetch
|
73
|
+
# @return [CleverObject, Clever::APIOperations::ResultsList] elem, or
|
74
|
+
# elems found. If list, sorted in ascending order of ids.
|
75
|
+
# @example
|
76
|
+
# last_elem = Clever::District.last
|
77
|
+
# last_elems = Clever::District.last 20
|
78
|
+
# last_elems.each do |e|
|
79
|
+
# puts e.name
|
80
|
+
# end
|
81
|
+
def last(num = nil, filters = {})
|
82
|
+
filters = @filters.merge filters
|
83
|
+
filters[:ending_before] = 'last'
|
84
|
+
if num.nil?
|
85
|
+
filters[:limit] = 1
|
86
|
+
response = Clever.request :get, @uri, filters
|
87
|
+
Util.convert_to_clever_object response[:data].last
|
88
|
+
else
|
89
|
+
filters[:limit] = num
|
90
|
+
Clever::APIOperations::PageList.new(@uri, filters).to_results_list
|
91
|
+
end
|
92
|
+
end
|
44
93
|
end
|
45
94
|
end
|
46
95
|
end
|
@@ -14,7 +14,7 @@ module Clever
|
|
14
14
|
@filters = filters
|
15
15
|
|
16
16
|
response = Clever.request :get, uri, filters
|
17
|
-
@
|
17
|
+
@all = Util.convert_to_clever_object response[:data]
|
18
18
|
@links = {}
|
19
19
|
response[:links].each do |link|
|
20
20
|
@links[link[:rel].to_sym] = link[:uri]
|
@@ -38,7 +38,7 @@ module Clever
|
|
38
38
|
# @example
|
39
39
|
# page.each { |elem| puts elem }
|
40
40
|
def each(&blk)
|
41
|
-
@
|
41
|
+
@all.each(&blk)
|
42
42
|
end
|
43
43
|
|
44
44
|
# Get all elements in page
|
@@ -46,12 +46,20 @@ module Clever
|
|
46
46
|
# @return [Array] List of all elements
|
47
47
|
# @example
|
48
48
|
# all_elems = page.all
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
attr_reader :all
|
50
|
+
|
51
|
+
# Retrieve the last element or n elements in the resource
|
52
|
+
# @api public
|
53
|
+
# @param num [nil, Integer] If nil, last elem; else, num elems to fetch
|
54
|
+
# @return [CleverObject, Clever::APIOperations::Page] elem, or
|
55
|
+
# elems found. If list, sorted in ascending order of ids.
|
56
|
+
# @example
|
57
|
+
# elems = Clever::District.first(20)
|
58
|
+
# last_elem = elems.last
|
59
|
+
# last_elems = elems.last 5
|
60
|
+
def last(num = nil)
|
61
|
+
return @all.last num if num
|
62
|
+
@all.last
|
55
63
|
end
|
56
64
|
end
|
57
65
|
end
|
data/lib/clever-ruby/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.clever.com/v1.1/districts?count=true
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -11,6 +11,8 @@ http_interactions:
|
|
11
11
|
- ! '*/*; q=0.5, application/xml'
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
14
16
|
User-Agent:
|
15
17
|
- Ruby
|
16
18
|
response:
|
@@ -27,7 +29,7 @@ http_interactions:
|
|
27
29
|
Content-Type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
Date:
|
30
|
-
-
|
32
|
+
- Sat, 13 Sep 2014 00:03:49 GMT
|
31
33
|
Server:
|
32
34
|
- nginx/1.4.7
|
33
35
|
X-Powered-By:
|
@@ -40,5 +42,5 @@ http_interactions:
|
|
40
42
|
encoding: US-ASCII
|
41
43
|
string: ! '{"count":1,"links":[{"rel":"self","uri":"/v1.1/districts?count=true"}]}'
|
42
44
|
http_version:
|
43
|
-
recorded_at:
|
44
|
-
recorded_with: VCR 2.
|
45
|
+
recorded_at: Sat, 13 Sep 2014 00:03:49 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
data/test/data/vcr_cassettes/{event_count.yml → Clever_APIOperations_List/counts_event_properly.yml}
RENAMED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.clever.com/v1.1/events?count=true
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -11,6 +11,8 @@ http_interactions:
|
|
11
11
|
- ! '*/*; q=0.5, application/xml'
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
14
16
|
User-Agent:
|
15
17
|
- Ruby
|
16
18
|
response:
|
@@ -27,7 +29,7 @@ http_interactions:
|
|
27
29
|
Content-Type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
Date:
|
30
|
-
-
|
32
|
+
- Sat, 13 Sep 2014 00:05:05 GMT
|
31
33
|
Server:
|
32
34
|
- nginx/1.4.7
|
33
35
|
X-Powered-By:
|
@@ -40,5 +42,5 @@ http_interactions:
|
|
40
42
|
encoding: US-ASCII
|
41
43
|
string: ! '{"count":7,"links":[{"rel":"self","uri":"/v1.1/events?count=true"}]}'
|
42
44
|
http_version:
|
43
|
-
recorded_at:
|
44
|
-
recorded_with: VCR 2.
|
45
|
+
recorded_at: Sat, 13 Sep 2014 00:05:05 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.clever.com/v1.1/schools?count=true
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -11,6 +11,8 @@ http_interactions:
|
|
11
11
|
- ! '*/*; q=0.5, application/xml'
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
14
16
|
User-Agent:
|
15
17
|
- Ruby
|
16
18
|
response:
|
@@ -27,7 +29,7 @@ http_interactions:
|
|
27
29
|
Content-Type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
Date:
|
30
|
-
-
|
32
|
+
- Sat, 13 Sep 2014 00:02:46 GMT
|
31
33
|
Server:
|
32
34
|
- nginx/1.4.7
|
33
35
|
X-Powered-By:
|
@@ -40,5 +42,5 @@ http_interactions:
|
|
40
42
|
encoding: US-ASCII
|
41
43
|
string: ! '{"count":3,"links":[{"rel":"self","uri":"/v1.1/schools?count=true"}]}'
|
42
44
|
http_version:
|
43
|
-
recorded_at:
|
44
|
-
recorded_with: VCR 2.
|
45
|
+
recorded_at: Sat, 13 Sep 2014 00:02:46 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.clever.com/v1.1/sections?count=true
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -11,6 +11,8 @@ http_interactions:
|
|
11
11
|
- ! '*/*; q=0.5, application/xml'
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
14
16
|
User-Agent:
|
15
17
|
- Ruby
|
16
18
|
response:
|
@@ -27,7 +29,7 @@ http_interactions:
|
|
27
29
|
Content-Type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
Date:
|
30
|
-
-
|
32
|
+
- Sat, 13 Sep 2014 00:05:04 GMT
|
31
33
|
Server:
|
32
34
|
- nginx/1.4.7
|
33
35
|
X-Powered-By:
|
@@ -40,5 +42,5 @@ http_interactions:
|
|
40
42
|
encoding: US-ASCII
|
41
43
|
string: ! '{"count":379,"links":[{"rel":"self","uri":"/v1.1/sections?count=true"}]}'
|
42
44
|
http_version:
|
43
|
-
recorded_at:
|
44
|
-
recorded_with: VCR 2.
|
45
|
+
recorded_at: Sat, 13 Sep 2014 00:05:04 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.clever.com/v1.1/students?count=true
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -11,6 +11,8 @@ http_interactions:
|
|
11
11
|
- ! '*/*; q=0.5, application/xml'
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
14
16
|
User-Agent:
|
15
17
|
- Ruby
|
16
18
|
response:
|
@@ -27,7 +29,7 @@ http_interactions:
|
|
27
29
|
Content-Type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
Date:
|
30
|
-
-
|
32
|
+
- Sat, 13 Sep 2014 00:05:02 GMT
|
31
33
|
Server:
|
32
34
|
- nginx/1.4.7
|
33
35
|
X-Powered-By:
|
@@ -40,5 +42,5 @@ http_interactions:
|
|
40
42
|
encoding: US-ASCII
|
41
43
|
string: ! '{"count":1004,"links":[{"rel":"self","uri":"/v1.1/students?count=true"}]}'
|
42
44
|
http_version:
|
43
|
-
recorded_at:
|
44
|
-
recorded_with: VCR 2.
|
45
|
+
recorded_at: Sat, 13 Sep 2014 00:05:02 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.clever.com/v1.1/teachers?count=true
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -11,6 +11,8 @@ http_interactions:
|
|
11
11
|
- ! '*/*; q=0.5, application/xml'
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
14
16
|
User-Agent:
|
15
17
|
- Ruby
|
16
18
|
response:
|
@@ -27,7 +29,7 @@ http_interactions:
|
|
27
29
|
Content-Type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
Date:
|
30
|
-
-
|
32
|
+
- Sat, 13 Sep 2014 00:02:46 GMT
|
31
33
|
Server:
|
32
34
|
- nginx/1.4.7
|
33
35
|
X-Powered-By:
|
@@ -40,5 +42,5 @@ http_interactions:
|
|
40
42
|
encoding: US-ASCII
|
41
43
|
string: ! '{"count":89,"links":[{"rel":"self","uri":"/v1.1/teachers?count=true"}]}'
|
42
44
|
http_version:
|
43
|
-
recorded_at:
|
44
|
-
recorded_with: VCR 2.
|
45
|
+
recorded_at: Sat, 13 Sep 2014 00:02:46 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.clever.com/v1.1/districts
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -11,6 +11,8 @@ http_interactions:
|
|
11
11
|
- ! '*/*; q=0.5, application/xml'
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
|
+
Authorization:
|
15
|
+
- Bearer DEMO_TOKEN
|
14
16
|
User-Agent:
|
15
17
|
- Ruby
|
16
18
|
response:
|
@@ -27,7 +29,7 @@ http_interactions:
|
|
27
29
|
Content-Type:
|
28
30
|
- application/json; charset=utf-8
|
29
31
|
Date:
|
30
|
-
-
|
32
|
+
- Sat, 13 Sep 2014 00:04:54 GMT
|
31
33
|
Server:
|
32
34
|
- nginx/1.4.7
|
33
35
|
X-Powered-By:
|
@@ -40,10 +42,10 @@ http_interactions:
|
|
40
42
|
encoding: US-ASCII
|
41
43
|
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"}]}'
|
42
44
|
http_version:
|
43
|
-
recorded_at:
|
45
|
+
recorded_at: Sat, 13 Sep 2014 00:04:54 GMT
|
44
46
|
- request:
|
45
47
|
method: get
|
46
|
-
uri: https://
|
48
|
+
uri: https://api.clever.com/v1.1/districts/4fd43cc56d11340000000005
|
47
49
|
body:
|
48
50
|
encoding: US-ASCII
|
49
51
|
string: ''
|
@@ -52,6 +54,8 @@ http_interactions:
|
|
52
54
|
- ! '*/*; q=0.5, application/xml'
|
53
55
|
Accept-Encoding:
|
54
56
|
- gzip, deflate
|
57
|
+
Authorization:
|
58
|
+
- Bearer DEMO_TOKEN
|
55
59
|
User-Agent:
|
56
60
|
- Ruby
|
57
61
|
response:
|
@@ -68,7 +72,7 @@ http_interactions:
|
|
68
72
|
Content-Type:
|
69
73
|
- application/json; charset=utf-8
|
70
74
|
Date:
|
71
|
-
-
|
75
|
+
- Sat, 13 Sep 2014 00:04:54 GMT
|
72
76
|
Server:
|
73
77
|
- nginx/1.4.7
|
74
78
|
X-Powered-By:
|
@@ -81,5 +85,5 @@ http_interactions:
|
|
81
85
|
encoding: US-ASCII
|
82
86
|
string: ! '{"data":{"name":"Demo District","id":"4fd43cc56d11340000000005"},"links":[{"rel":"self","uri":"/v1.1/districts/4fd43cc56d11340000000005"},{"rel":"schools","uri":"/v1.1/districts/4fd43cc56d11340000000005/schools"},{"rel":"teachers","uri":"/v1.1/districts/4fd43cc56d11340000000005/teachers"},{"rel":"students","uri":"/v1.1/districts/4fd43cc56d11340000000005/students"},{"rel":"sections","uri":"/v1.1/districts/4fd43cc56d11340000000005/sections"},{"rel":"events","uri":"/v1.1/districts/4fd43cc56d11340000000005/events"}]}'
|
83
87
|
http_version:
|
84
|
-
recorded_at:
|
85
|
-
recorded_with: VCR 2.
|
88
|
+
recorded_at: Sat, 13 Sep 2014 00:04:54 GMT
|
89
|
+
recorded_with: VCR 2.9.3
|