edools-api 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/edools-api.gemspec +11 -3
- data/lib/edools/core.rb +1 -0
- data/lib/edools/core/category.rb +8 -0
- data/spec/edools/core/category_spec.rb +36 -0
- data/spec/edools/core/media_spec.rb +10 -0
- data/spec/fixtures/vcr_cassettes/Edools_Core_Category/create_the_category.yml +65 -0
- data/spec/fixtures/vcr_cassettes/Edools_Core_Category/destroy_the_category.yml +113 -0
- data/spec/fixtures/vcr_cassettes/Edools_Core_Category/finds_all_category.yml +107 -0
- data/spec/fixtures/vcr_cassettes/Edools_Core_Category/finds_the_category.yml +61 -0
- data/spec/fixtures/vcr_cassettes/Edools_Core_Category/update_the_category.yml +115 -0
- data/spec/fixtures/vcr_cassettes/Edools_Core_Media/filters_by_title.yml +62 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fa55fee4b82476f64aab7826bcae137d6f37ec9
|
4
|
+
data.tar.gz: 813226a49d621170dcf4ca2abcd60db7d36086d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68e6014ed080938e31d380799e132c2acc8ea23dcd8668e33504dbd1e0f6e5b0cea28dc6c068a498fd9aca5fe9e04fdfd3fbc689ef064967401bc6cd402cb421
|
7
|
+
data.tar.gz: 464cfa8f034ffa4a31d7f7df3ba8697b7b8caab9a7239d875aa9ebb84888d577a80d0e38d811af7d1b1734bb2470269039e22ede498e7444a10bf3df4ee3bcec
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/edools-api.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: edools-api 0.
|
5
|
+
# stub: edools-api 0.6.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "edools-api"
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.6.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Vinicius Kastrup"]
|
14
|
-
s.date = "2015-07-
|
14
|
+
s.date = "2015-07-08"
|
15
15
|
s.description = "\n With this gem you'll be able to access and manipulate all the data of your School or Organization\n hosted at Edools.\n "
|
16
16
|
s.email = "viniciusmkm@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
"lib/edools/core.rb",
|
35
35
|
"lib/edools/core/api_key.rb",
|
36
36
|
"lib/edools/core/base.rb",
|
37
|
+
"lib/edools/core/category.rb",
|
37
38
|
"lib/edools/core/course.rb",
|
38
39
|
"lib/edools/core/course_content.rb",
|
39
40
|
"lib/edools/core/course_module.rb",
|
@@ -54,6 +55,7 @@ Gem::Specification.new do |s|
|
|
54
55
|
"lib/edools/paginated_collection.rb",
|
55
56
|
"spec/edools/core/api_key_spec.rb",
|
56
57
|
"spec/edools/core/base_spec.rb",
|
58
|
+
"spec/edools/core/category_spec.rb",
|
57
59
|
"spec/edools/core/course_content_spec.rb",
|
58
60
|
"spec/edools/core/course_module_spec.rb",
|
59
61
|
"spec/edools/core/course_spec.rb",
|
@@ -70,6 +72,11 @@ Gem::Specification.new do |s|
|
|
70
72
|
"spec/edools/ecommerce/base_spec.rb",
|
71
73
|
"spec/edools/ecommerce/product_spec.rb",
|
72
74
|
"spec/fixtures/vcr_cassettes/Edools_Core_ApiKey/finds_the_api_key.yml",
|
75
|
+
"spec/fixtures/vcr_cassettes/Edools_Core_Category/create_the_category.yml",
|
76
|
+
"spec/fixtures/vcr_cassettes/Edools_Core_Category/destroy_the_category.yml",
|
77
|
+
"spec/fixtures/vcr_cassettes/Edools_Core_Category/finds_all_category.yml",
|
78
|
+
"spec/fixtures/vcr_cassettes/Edools_Core_Category/finds_the_category.yml",
|
79
|
+
"spec/fixtures/vcr_cassettes/Edools_Core_Category/update_the_category.yml",
|
73
80
|
"spec/fixtures/vcr_cassettes/Edools_Core_Course/create_the_course.yml",
|
74
81
|
"spec/fixtures/vcr_cassettes/Edools_Core_Course/destroy_the_course.yml",
|
75
82
|
"spec/fixtures/vcr_cassettes/Edools_Core_Course/finds_all_course.yml",
|
@@ -96,6 +103,7 @@ Gem::Specification.new do |s|
|
|
96
103
|
"spec/fixtures/vcr_cassettes/Edools_Core_Lesson/update_the_lesson.yml",
|
97
104
|
"spec/fixtures/vcr_cassettes/Edools_Core_Media/create_the_media.yml",
|
98
105
|
"spec/fixtures/vcr_cassettes/Edools_Core_Media/destroy_the_media.yml",
|
106
|
+
"spec/fixtures/vcr_cassettes/Edools_Core_Media/filters_by_title.yml",
|
99
107
|
"spec/fixtures/vcr_cassettes/Edools_Core_Media/finds_all_media.yml",
|
100
108
|
"spec/fixtures/vcr_cassettes/Edools_Core_Media/finds_the_media.yml",
|
101
109
|
"spec/fixtures/vcr_cassettes/Edools_Core_Media/update_the_media.yml",
|
data/lib/edools/core.rb
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
2
|
+
|
3
|
+
describe Edools::Core::Category, :vcr do
|
4
|
+
it 'finds all category' do
|
5
|
+
categories = Edools::Core::Category.all
|
6
|
+
|
7
|
+
expect(categories.count).to eq 24
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'finds the category' do
|
11
|
+
category = Edools::Core::Category.find(1432)
|
12
|
+
|
13
|
+
expect(category.id).to eq 1432
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'update the category' do
|
17
|
+
category = Edools::Core::Category.find(1432)
|
18
|
+
category.order = '26'
|
19
|
+
|
20
|
+
expect(category.save).to eq true
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'create the category' do
|
24
|
+
category = Edools::Core::Category.new()
|
25
|
+
category.title = 'Edools API Test'
|
26
|
+
category.order = 25
|
27
|
+
category.school_id = '224'
|
28
|
+
|
29
|
+
expect(category.save).to eq true
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'destroy the category' do
|
33
|
+
category = Edools::Core::Category.find(1432)
|
34
|
+
expect(category.destroy).to be_truthy
|
35
|
+
end
|
36
|
+
end
|
@@ -11,6 +11,16 @@ describe Edools::Core::Media, :vcr do
|
|
11
11
|
expect(all_media.total_pages). to eq 64
|
12
12
|
end
|
13
13
|
|
14
|
+
it 'filters by title' do
|
15
|
+
all_media = Edools::Core::Media.all(params: { title: '~Video-teste' })
|
16
|
+
|
17
|
+
expect(all_media.count).to eq 1
|
18
|
+
expect(all_media.per_page). to eq 10
|
19
|
+
expect(all_media.current_page). to eq 1
|
20
|
+
expect(all_media.total_count). to eq 1
|
21
|
+
expect(all_media.total_pages). to eq 1
|
22
|
+
end
|
23
|
+
|
14
24
|
it 'finds the media' do
|
15
25
|
media = Edools::Core::Media.find(54344)
|
16
26
|
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://core.edools.com/categories.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"category":{"title":"Edools API Test","order":25,"school_id":"224"}}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Authorization:
|
13
|
+
- Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
|
14
|
+
Accept:
|
15
|
+
- application/+json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=0, private, must-revalidate
|
27
|
+
Content-Security-Policy-Report-Only:
|
28
|
+
- default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
|
29
|
+
'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
|
30
|
+
https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
|
31
|
+
style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
|
32
|
+
Content-Type:
|
33
|
+
- application/vnd.edools.core.v1+json; charset=utf-8
|
34
|
+
Date:
|
35
|
+
- Wed, 08 Jul 2015 14:40:06 GMT
|
36
|
+
Etag:
|
37
|
+
- '"1db929c65453bc4e9c8fec9c165dc112"'
|
38
|
+
Location:
|
39
|
+
- https://core.edools.com/categories/1432
|
40
|
+
Server:
|
41
|
+
- nginx/1.4.7
|
42
|
+
Status:
|
43
|
+
- 201 Created
|
44
|
+
Strict-Transport-Security:
|
45
|
+
- max-age=631152000; includeSubdomains
|
46
|
+
X-Content-Type-Options:
|
47
|
+
- nosniff
|
48
|
+
X-Frame-Options:
|
49
|
+
- DENY
|
50
|
+
X-Request-Id:
|
51
|
+
- c6ac3b00-2e8c-4336-99cf-d476d76162f2
|
52
|
+
X-Runtime:
|
53
|
+
- '0.092406'
|
54
|
+
X-Xss-Protection:
|
55
|
+
- 1; mode=block
|
56
|
+
Content-Length:
|
57
|
+
- '157'
|
58
|
+
Connection:
|
59
|
+
- keep-alive
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: '{"id":1432,"title":"Edools API Test","order":25,"school_id":224,"created_at":"2015-07-08T14:40:06.777Z","updated_at":"2015-07-08T14:40:06.777Z","flag":false}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Wed, 08 Jul 2015 14:40:07 GMT
|
65
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,113 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://core.edools.com/categories/1432.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/+json
|
12
|
+
Authorization:
|
13
|
+
- Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Security-Policy-Report-Only:
|
26
|
+
- default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
|
27
|
+
'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
|
28
|
+
https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
|
29
|
+
style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
|
30
|
+
Content-Type:
|
31
|
+
- application/vnd.edools.core.v1+json; charset=utf-8
|
32
|
+
Date:
|
33
|
+
- Wed, 08 Jul 2015 14:41:18 GMT
|
34
|
+
Etag:
|
35
|
+
- '"105e68baef8e644c53a57b74371a5087"'
|
36
|
+
Server:
|
37
|
+
- nginx/1.4.7
|
38
|
+
Status:
|
39
|
+
- 200 OK
|
40
|
+
Strict-Transport-Security:
|
41
|
+
- max-age=631152000; includeSubdomains
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
X-Frame-Options:
|
45
|
+
- DENY
|
46
|
+
X-Request-Id:
|
47
|
+
- a43e0177-deeb-44d2-9ac1-b84189551445
|
48
|
+
X-Runtime:
|
49
|
+
- '0.048905'
|
50
|
+
X-Xss-Protection:
|
51
|
+
- 1; mode=block
|
52
|
+
Content-Length:
|
53
|
+
- '87'
|
54
|
+
Connection:
|
55
|
+
- keep-alive
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '{"id":1432,"title":"Edools API Test","order":26,"flag":false,"school_products_count":0}'
|
59
|
+
http_version:
|
60
|
+
recorded_at: Wed, 08 Jul 2015 14:41:19 GMT
|
61
|
+
- request:
|
62
|
+
method: delete
|
63
|
+
uri: https://core.edools.com/categories/1432.json
|
64
|
+
body:
|
65
|
+
encoding: US-ASCII
|
66
|
+
string: ''
|
67
|
+
headers:
|
68
|
+
Accept:
|
69
|
+
- application/+json
|
70
|
+
Authorization:
|
71
|
+
- Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
|
72
|
+
Accept-Encoding:
|
73
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
74
|
+
User-Agent:
|
75
|
+
- Ruby
|
76
|
+
response:
|
77
|
+
status:
|
78
|
+
code: 204
|
79
|
+
message: No Content
|
80
|
+
headers:
|
81
|
+
Cache-Control:
|
82
|
+
- no-cache
|
83
|
+
Content-Security-Policy-Report-Only:
|
84
|
+
- default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
|
85
|
+
'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
|
86
|
+
https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
|
87
|
+
style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
|
88
|
+
Date:
|
89
|
+
- Wed, 08 Jul 2015 14:41:19 GMT
|
90
|
+
Server:
|
91
|
+
- nginx/1.4.7
|
92
|
+
Status:
|
93
|
+
- 204 No Content
|
94
|
+
Strict-Transport-Security:
|
95
|
+
- max-age=631152000; includeSubdomains
|
96
|
+
X-Content-Type-Options:
|
97
|
+
- nosniff
|
98
|
+
X-Frame-Options:
|
99
|
+
- DENY
|
100
|
+
X-Request-Id:
|
101
|
+
- de3388d4-cef6-490b-8c2c-3456c7e67eec
|
102
|
+
X-Runtime:
|
103
|
+
- '0.055280'
|
104
|
+
X-Xss-Protection:
|
105
|
+
- 1; mode=block
|
106
|
+
Connection:
|
107
|
+
- keep-alive
|
108
|
+
body:
|
109
|
+
encoding: UTF-8
|
110
|
+
string: ''
|
111
|
+
http_version:
|
112
|
+
recorded_at: Wed, 08 Jul 2015 14:41:20 GMT
|
113
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,107 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://core.edools.com/categories.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/+json
|
12
|
+
Authorization:
|
13
|
+
- Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Security-Policy-Report-Only:
|
26
|
+
- default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
|
27
|
+
'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
|
28
|
+
https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
|
29
|
+
style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
|
30
|
+
Content-Type:
|
31
|
+
- application/vnd.edools.core.v1+json; charset=utf-8
|
32
|
+
Date:
|
33
|
+
- Wed, 08 Jul 2015 14:40:06 GMT
|
34
|
+
Etag:
|
35
|
+
- '"8d12c406054942b2219638314bb00d1a"'
|
36
|
+
Server:
|
37
|
+
- nginx/1.4.7
|
38
|
+
Status:
|
39
|
+
- 200 OK
|
40
|
+
Strict-Transport-Security:
|
41
|
+
- max-age=631152000; includeSubdomains
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
X-Frame-Options:
|
45
|
+
- DENY
|
46
|
+
X-Request-Id:
|
47
|
+
- 28b4a376-f0e2-4382-9ebd-3dbe23060bae
|
48
|
+
X-Runtime:
|
49
|
+
- '0.129828'
|
50
|
+
X-Xss-Protection:
|
51
|
+
- 1; mode=block
|
52
|
+
Content-Length:
|
53
|
+
- '2038'
|
54
|
+
Connection:
|
55
|
+
- keep-alive
|
56
|
+
body:
|
57
|
+
encoding: ASCII-8BIT
|
58
|
+
string: !binary |-
|
59
|
+
eyJjYXRlZ29yaWVzIjpbeyJpZCI6NDcxLCJ0aXRsZSI6IkdlcmFsIiwib3Jk
|
60
|
+
ZXIiOjEsImZsYWciOnRydWUsInNjaG9vbF9wcm9kdWN0c19jb3VudCI6MzR9
|
61
|
+
LHsiaWQiOjU2NSwidGl0bGUiOiJ5ZXQgYW5vdGhlciBjYXRlZ29yeSIsIm9y
|
62
|
+
ZGVyIjoxLCJmbGFnIjp0cnVlLCJzY2hvb2xfcHJvZHVjdHNfY291bnQiOjIw
|
63
|
+
fSx7ImlkIjo1NzIsInRpdGxlIjoibGFzdCBvbmUgbW9yZSIsIm9yZGVyIjoz
|
64
|
+
LCJmbGFnIjp0cnVlLCJzY2hvb2xfcHJvZHVjdHNfY291bnQiOjJ9LHsiaWQi
|
65
|
+
OjU3NSwidGl0bGUiOiJzaG93Iiwib3JkZXIiOjQsImZsYWciOmZhbHNlLCJz
|
66
|
+
Y2hvb2xfcHJvZHVjdHNfY291bnQiOjB9LHsiaWQiOjY0NywidGl0bGUiOiJU
|
67
|
+
b3BvIiwib3JkZXIiOjYsImZsYWciOnRydWUsInNjaG9vbF9wcm9kdWN0c19j
|
68
|
+
b3VudCI6Mn0seyJpZCI6MTI1MSwidGl0bGUiOiJ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oWdpbmEgZGUgQ2F0ZWdvcmlhcyIsIm9yZGVyIjoyMywiZmxhZyI6ZmFs
|
100
|
+
c2UsInNjaG9vbF9wcm9kdWN0c19jb3VudCI6MX0seyJpZCI6MTQwOSwidGl0
|
101
|
+
bGUiOiJDYXRlZ29yaWEiLCJvcmRlciI6MjQsImZsYWciOmZhbHNlLCJzY2hv
|
102
|
+
b2xfcHJvZHVjdHNfY291bnQiOjB9LHsiaWQiOjE0MTAsInRpdGxlIjoiRGVz
|
103
|
+
dGFxdWUiLCJvcmRlciI6MjUsImZsYWciOnRydWUsInNjaG9vbF9wcm9kdWN0
|
104
|
+
c19jb3VudCI6MX1dfQ==
|
105
|
+
http_version:
|
106
|
+
recorded_at: Wed, 08 Jul 2015 14:40:06 GMT
|
107
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://core.edools.com/categories/1432.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/+json
|
12
|
+
Authorization:
|
13
|
+
- Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Security-Policy-Report-Only:
|
26
|
+
- default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
|
27
|
+
'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
|
28
|
+
https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
|
29
|
+
style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
|
30
|
+
Content-Type:
|
31
|
+
- application/vnd.edools.core.v1+json; charset=utf-8
|
32
|
+
Date:
|
33
|
+
- Wed, 08 Jul 2015 14:40:59 GMT
|
34
|
+
Etag:
|
35
|
+
- '"e89835d5795c345723f45565931640ab"'
|
36
|
+
Server:
|
37
|
+
- nginx/1.4.7
|
38
|
+
Status:
|
39
|
+
- 200 OK
|
40
|
+
Strict-Transport-Security:
|
41
|
+
- max-age=631152000; includeSubdomains
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
X-Frame-Options:
|
45
|
+
- DENY
|
46
|
+
X-Request-Id:
|
47
|
+
- c14dddee-8c00-40af-bd07-73c9b24c93d9
|
48
|
+
X-Runtime:
|
49
|
+
- '0.050665'
|
50
|
+
X-Xss-Protection:
|
51
|
+
- 1; mode=block
|
52
|
+
Content-Length:
|
53
|
+
- '87'
|
54
|
+
Connection:
|
55
|
+
- keep-alive
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '{"id":1432,"title":"Edools API Test","order":25,"flag":false,"school_products_count":0}'
|
59
|
+
http_version:
|
60
|
+
recorded_at: Wed, 08 Jul 2015 14:41:00 GMT
|
61
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,115 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://core.edools.com/categories/1432.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/+json
|
12
|
+
Authorization:
|
13
|
+
- Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Security-Policy-Report-Only:
|
26
|
+
- default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
|
27
|
+
'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
|
28
|
+
https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
|
29
|
+
style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
|
30
|
+
Content-Type:
|
31
|
+
- application/vnd.edools.core.v1+json; charset=utf-8
|
32
|
+
Date:
|
33
|
+
- Wed, 08 Jul 2015 14:41:00 GMT
|
34
|
+
Etag:
|
35
|
+
- '"e89835d5795c345723f45565931640ab"'
|
36
|
+
Server:
|
37
|
+
- nginx/1.4.7
|
38
|
+
Status:
|
39
|
+
- 200 OK
|
40
|
+
Strict-Transport-Security:
|
41
|
+
- max-age=631152000; includeSubdomains
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
X-Frame-Options:
|
45
|
+
- DENY
|
46
|
+
X-Request-Id:
|
47
|
+
- 04700b92-b03a-4b04-96f9-1ce0633ae55f
|
48
|
+
X-Runtime:
|
49
|
+
- '0.058143'
|
50
|
+
X-Xss-Protection:
|
51
|
+
- 1; mode=block
|
52
|
+
Transfer-Encoding:
|
53
|
+
- chunked
|
54
|
+
Connection:
|
55
|
+
- keep-alive
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '{"id":1432,"title":"Edools API Test","order":25,"flag":false,"school_products_count":0}'
|
59
|
+
http_version:
|
60
|
+
recorded_at: Wed, 08 Jul 2015 14:41:01 GMT
|
61
|
+
- request:
|
62
|
+
method: put
|
63
|
+
uri: https://core.edools.com/categories/1432.json
|
64
|
+
body:
|
65
|
+
encoding: UTF-8
|
66
|
+
string: '{"category":{"id":1432,"title":"Edools API Test","order":"26","flag":false,"school_products_count":0}}'
|
67
|
+
headers:
|
68
|
+
Content-Type:
|
69
|
+
- application/json
|
70
|
+
Authorization:
|
71
|
+
- Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
|
72
|
+
Accept:
|
73
|
+
- application/+json
|
74
|
+
Accept-Encoding:
|
75
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
76
|
+
User-Agent:
|
77
|
+
- Ruby
|
78
|
+
response:
|
79
|
+
status:
|
80
|
+
code: 204
|
81
|
+
message: No Content
|
82
|
+
headers:
|
83
|
+
Cache-Control:
|
84
|
+
- no-cache
|
85
|
+
Content-Security-Policy-Report-Only:
|
86
|
+
- default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
|
87
|
+
'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
|
88
|
+
https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
|
89
|
+
style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
|
90
|
+
Date:
|
91
|
+
- Wed, 08 Jul 2015 14:41:00 GMT
|
92
|
+
Server:
|
93
|
+
- nginx/1.4.7
|
94
|
+
Status:
|
95
|
+
- 204 No Content
|
96
|
+
Strict-Transport-Security:
|
97
|
+
- max-age=631152000; includeSubdomains
|
98
|
+
X-Content-Type-Options:
|
99
|
+
- nosniff
|
100
|
+
X-Frame-Options:
|
101
|
+
- DENY
|
102
|
+
X-Request-Id:
|
103
|
+
- 56166569-b093-495d-bf47-74af304dad86
|
104
|
+
X-Runtime:
|
105
|
+
- '0.092269'
|
106
|
+
X-Xss-Protection:
|
107
|
+
- 1; mode=block
|
108
|
+
Connection:
|
109
|
+
- keep-alive
|
110
|
+
body:
|
111
|
+
encoding: UTF-8
|
112
|
+
string: ''
|
113
|
+
http_version:
|
114
|
+
recorded_at: Wed, 08 Jul 2015 14:41:01 GMT
|
115
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://core.edools.com/media.json?title=~Video-teste
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/+json
|
12
|
+
Authorization:
|
13
|
+
- Token token=84cc0400cd52f62f2e12309b502889ab:2fee1e06d56ab6394ab9acd4c6a8c62f
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
Content-Security-Policy-Report-Only:
|
26
|
+
- default-src https://* 'self'; connect-src https://* 'self'; font-src https://*
|
27
|
+
'self'; frame-src https://* 'self'; img-src https://* 'self' data:; media-src
|
28
|
+
https://* 'self'; object-src https://* 'self'; script-src https://* 'self';
|
29
|
+
style-src https://* 'self'; report-uri https://core.edools.com/uri-directive;
|
30
|
+
Content-Type:
|
31
|
+
- application/vnd.edools.core.v1+json; charset=utf-8
|
32
|
+
Date:
|
33
|
+
- Tue, 07 Jul 2015 18:46:34 GMT
|
34
|
+
Etag:
|
35
|
+
- '"596cca6b34c3c06a0192abb6477857f5"'
|
36
|
+
Server:
|
37
|
+
- nginx/1.4.7
|
38
|
+
Status:
|
39
|
+
- 200 OK
|
40
|
+
Strict-Transport-Security:
|
41
|
+
- max-age=631152000; includeSubdomains
|
42
|
+
X-Content-Type-Options:
|
43
|
+
- nosniff
|
44
|
+
X-Frame-Options:
|
45
|
+
- DENY
|
46
|
+
X-Request-Id:
|
47
|
+
- 0b3b0a02-ac86-47c4-a113-70f4de953360
|
48
|
+
X-Runtime:
|
49
|
+
- '0.303022'
|
50
|
+
X-Xss-Protection:
|
51
|
+
- 1; mode=block
|
52
|
+
Content-Length:
|
53
|
+
- '531'
|
54
|
+
Connection:
|
55
|
+
- keep-alive
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '{"media":[{"id":53839,"type":"Video","title":"Video-teste-Base","description":null,"host":"Wistia","host_key":"nsygjssjj7","status":"ready","message":null,"created_at":"2015-06-25
|
59
|
+
19:07:53 UTC","updated_at":"2015-06-25 19:09:19 UTC","samba_player_key":"154f766fe4bdcf7cd6730542a851372b","usage_count":0,"lesson_ids":[],"extra_content_ids":[],"library_resource":{"id":119502,"library":{"id":2,"samba_player_key":"154f766fe4bdcf7cd6730542a851372b"},"library_tags":[]}}],"current_page":1,"per_page":10,"total_pages":1,"total_count":1}'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Tue, 07 Jul 2015 18:46:34 GMT
|
62
|
+
recorded_with: VCR 2.9.2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edools-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vinicius Kastrup
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- lib/edools/core.rb
|
175
175
|
- lib/edools/core/api_key.rb
|
176
176
|
- lib/edools/core/base.rb
|
177
|
+
- lib/edools/core/category.rb
|
177
178
|
- lib/edools/core/course.rb
|
178
179
|
- lib/edools/core/course_content.rb
|
179
180
|
- lib/edools/core/course_module.rb
|
@@ -194,6 +195,7 @@ files:
|
|
194
195
|
- lib/edools/paginated_collection.rb
|
195
196
|
- spec/edools/core/api_key_spec.rb
|
196
197
|
- spec/edools/core/base_spec.rb
|
198
|
+
- spec/edools/core/category_spec.rb
|
197
199
|
- spec/edools/core/course_content_spec.rb
|
198
200
|
- spec/edools/core/course_module_spec.rb
|
199
201
|
- spec/edools/core/course_spec.rb
|
@@ -210,6 +212,11 @@ files:
|
|
210
212
|
- spec/edools/ecommerce/base_spec.rb
|
211
213
|
- spec/edools/ecommerce/product_spec.rb
|
212
214
|
- spec/fixtures/vcr_cassettes/Edools_Core_ApiKey/finds_the_api_key.yml
|
215
|
+
- spec/fixtures/vcr_cassettes/Edools_Core_Category/create_the_category.yml
|
216
|
+
- spec/fixtures/vcr_cassettes/Edools_Core_Category/destroy_the_category.yml
|
217
|
+
- spec/fixtures/vcr_cassettes/Edools_Core_Category/finds_all_category.yml
|
218
|
+
- spec/fixtures/vcr_cassettes/Edools_Core_Category/finds_the_category.yml
|
219
|
+
- spec/fixtures/vcr_cassettes/Edools_Core_Category/update_the_category.yml
|
213
220
|
- spec/fixtures/vcr_cassettes/Edools_Core_Course/create_the_course.yml
|
214
221
|
- spec/fixtures/vcr_cassettes/Edools_Core_Course/destroy_the_course.yml
|
215
222
|
- spec/fixtures/vcr_cassettes/Edools_Core_Course/finds_all_course.yml
|
@@ -236,6 +243,7 @@ files:
|
|
236
243
|
- spec/fixtures/vcr_cassettes/Edools_Core_Lesson/update_the_lesson.yml
|
237
244
|
- spec/fixtures/vcr_cassettes/Edools_Core_Media/create_the_media.yml
|
238
245
|
- spec/fixtures/vcr_cassettes/Edools_Core_Media/destroy_the_media.yml
|
246
|
+
- spec/fixtures/vcr_cassettes/Edools_Core_Media/filters_by_title.yml
|
239
247
|
- spec/fixtures/vcr_cassettes/Edools_Core_Media/finds_all_media.yml
|
240
248
|
- spec/fixtures/vcr_cassettes/Edools_Core_Media/finds_the_media.yml
|
241
249
|
- spec/fixtures/vcr_cassettes/Edools_Core_Media/update_the_media.yml
|