bearcat 1.4.13 → 1.5.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bearcat.gemspec +9 -3
- data/lib/bearcat/client/account_reports.rb +6 -14
- data/lib/bearcat/client/accounts.rb +20 -56
- data/lib/bearcat/client/analytics.rb +4 -7
- data/lib/bearcat/client/assignment_groups.rb +7 -19
- data/lib/bearcat/client/assignments.rb +15 -39
- data/lib/bearcat/client/blueprint_courses.rb +14 -20
- data/lib/bearcat/client/calendar_events.rb +9 -17
- data/lib/bearcat/client/canvas_files.rb +0 -2
- data/lib/bearcat/client/conferences.rb +3 -8
- data/lib/bearcat/client/conversations.rb +3 -8
- data/lib/bearcat/client/courses.rb +15 -45
- data/lib/bearcat/client/custom_gradebook_columns.rb +11 -25
- data/lib/bearcat/client/discussions.rb +11 -37
- data/lib/bearcat/client/enrollments.rb +9 -29
- data/lib/bearcat/client/external_tools.rb +9 -36
- data/lib/bearcat/client/file_helper.rb +2 -2
- data/lib/bearcat/client/files.rb +2 -4
- data/lib/bearcat/client/folders.rb +13 -59
- data/lib/bearcat/client/group_categories.rb +8 -17
- data/lib/bearcat/client/group_memberships.rb +6 -14
- data/lib/bearcat/client/groups.rb +9 -24
- data/lib/bearcat/client/module_items.rb +9 -17
- data/lib/bearcat/client/modules.rb +10 -20
- data/lib/bearcat/client/outcome_groups.rb +2 -4
- data/lib/bearcat/client/outcomes.rb +4 -7
- data/lib/bearcat/client/pages.rb +8 -23
- data/lib/bearcat/client/progresses.rb +2 -3
- data/lib/bearcat/client/quizzes.rb +15 -35
- data/lib/bearcat/client/reports.rb +8 -19
- data/lib/bearcat/client/roles.rb +1 -1
- data/lib/bearcat/client/rubric.rb +8 -20
- data/lib/bearcat/client/rubric_assessment.rb +5 -11
- data/lib/bearcat/client/rubric_association.rb +6 -12
- data/lib/bearcat/client/search.rb +2 -4
- data/lib/bearcat/client/sections.rb +11 -26
- data/lib/bearcat/client/submissions.rb +13 -36
- data/lib/bearcat/client/tabs.rb +4 -7
- data/lib/bearcat/client/users.rb +17 -44
- data/lib/bearcat/client.rb +72 -44
- data/lib/bearcat/client_module.rb +101 -0
- data/lib/bearcat/rate_limiting/redis_script.rb +164 -0
- data/lib/bearcat/rate_limiting.rb +70 -0
- data/lib/bearcat/spec_helpers.rb +62 -31
- data/lib/bearcat/version.rb +1 -1
- data/lib/bearcat.rb +8 -21
- data/lib/catalogcat/api_array.rb +18 -0
- data/lib/catalogcat/client/catalogs.rb +21 -0
- data/lib/catalogcat/client/certificates.rb +9 -0
- data/lib/catalogcat/client/courses.rb +25 -0
- data/lib/catalogcat/client/orders.rb +9 -0
- data/lib/catalogcat/client.rb +39 -0
- data/lib/catalogcat/version.rb +3 -0
- data/lib/catalogcat.rb +14 -0
- data/spec/bearcat/client/canvas_files_spec.rb +1 -2
- data/spec/bearcat/client/content_migrations_spec.rb +1 -1
- data/spec/bearcat/client/courses_spec.rb +2 -4
- data/spec/bearcat/{group_memberships_spec.rb → client/group_memberships_spec.rb} +0 -0
- data/spec/bearcat/client_spec.rb +1 -4
- data/spec/bearcat/rate_limiting_spec.rb +62 -0
- data/spec/bearcat/stub_bearcat_spec.rb +15 -0
- data/spec/helper.rb +1 -0
- metadata +195 -180
@@ -1,44 +1,17 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module ExternalTools
|
4
|
-
|
5
|
-
get("/api/v1/courses/#{course_id}/external_tools", params)
|
6
|
-
end
|
7
|
-
|
8
|
-
def account_external_tools(account_id, params={})
|
9
|
-
get("/api/v1/accounts/#{account_id}/external_tools", params)
|
10
|
-
end
|
11
|
-
|
12
|
-
def course_external_tool(course_id, tool_id, params={})
|
13
|
-
get("/api/v1/courses/#{course_id}/external_tools/#{tool_id}", params)
|
14
|
-
end
|
15
|
-
|
16
|
-
def account_external_tool(account_id, tool_id, params={})
|
17
|
-
get("/api/v1/accounts/#{account_id}/external_tools/#{tool_id}", params)
|
18
|
-
end
|
19
|
-
|
20
|
-
def create_course_external_tool(course_id, params={})
|
21
|
-
post("/api/v1/courses/#{course_id}/external_tools", params)
|
22
|
-
end
|
23
|
-
|
24
|
-
def create_account_external_tool(account_id, params={})
|
25
|
-
post("/api/v1/accounts/#{account_id}/external_tools", params)
|
26
|
-
end
|
27
|
-
|
28
|
-
def edit_course_external_tool(course_id, tool_id, params={})
|
29
|
-
put("/api/v1/courses/#{course_id}/external_tools/#{tool_id}", params)
|
30
|
-
end
|
31
|
-
|
32
|
-
def edit_account_external_tool(account_id, tool_id, params={})
|
33
|
-
put("/api/v1/accounts/#{account_id}/external_tools/#{tool_id}", params)
|
34
|
-
end
|
4
|
+
extend ClientModule
|
35
5
|
|
36
|
-
|
37
|
-
|
38
|
-
|
6
|
+
context_types %i[course account] do |ct|
|
7
|
+
prefix "/api/v1/#{ct}s/:#{ct}/external_tools/" do
|
8
|
+
get :"#{ct}_external_tools"
|
9
|
+
post :"create_#{ct}_external_tool"
|
39
10
|
|
40
|
-
|
41
|
-
|
11
|
+
get :"#{ct}_external_tool", ":tool"
|
12
|
+
put :"edit_#{ct}_external_tool", ":tool"
|
13
|
+
delete :"delete_#{ct}_external_tool", ":tool"
|
14
|
+
end
|
42
15
|
end
|
43
16
|
end
|
44
17
|
end
|
data/lib/bearcat/client/files.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Files
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
get("/api/v1/courses/#{course}/files", params)
|
7
|
-
end
|
8
|
-
|
6
|
+
get :list_course_files, "/api/v1/courses/:course/files"
|
9
7
|
end
|
10
8
|
end
|
11
9
|
end
|
@@ -1,70 +1,24 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Folders
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
|
6
|
+
context_types %i[course user group] do |ct|
|
7
|
+
prefix "/api/v1/#{ct}s/:#{ct}/folders/" do
|
8
|
+
get :"list_#{ct}_folders"
|
9
|
+
post :"create_#{ct}_folder"
|
10
|
+
get :"get_#{ct}_folder", ":folder"
|
11
|
+
get :"resolve_path_for_#{ct}", "by_path/:full_path"
|
12
|
+
end
|
7
13
|
end
|
8
14
|
|
9
|
-
|
10
|
-
|
15
|
+
prefix "/api/v1/folders/:folder/" do
|
16
|
+
put :update_folder
|
17
|
+
delete :delete_folder
|
11
18
|
end
|
12
19
|
|
13
|
-
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
def create_course_folder(course, params = {})
|
18
|
-
post("/api/v1/courses/#{course}/folders", params)
|
19
|
-
end
|
20
|
-
|
21
|
-
def get_user_folder(user, folder, params = {})
|
22
|
-
get("/api/v1/users/#{user}/folders/#{folder}", params)
|
23
|
-
end
|
24
|
-
|
25
|
-
def list_user_folders(user, params = {})
|
26
|
-
get("/api/v1/users/#{user}/folders", params)
|
27
|
-
end
|
28
|
-
|
29
|
-
def resolve_path_for_user(user, full_path = nil, params = {})
|
30
|
-
get("/api/v1/users/#{user}/folders/by_path#{full_path == nil ? "" : "/#{full_path}"}", params)
|
31
|
-
end
|
32
|
-
|
33
|
-
def create_user_folder(user, params = {})
|
34
|
-
post("/api/v1/users/#{user}/folders", params)
|
35
|
-
end
|
36
|
-
|
37
|
-
def get_group_folder(group, folder, params = {})
|
38
|
-
get("/api/v1/groups/#{group}/folders/#{folder}", params)
|
39
|
-
end
|
40
|
-
|
41
|
-
def list_group_folders(group, params = {})
|
42
|
-
get("/api/v1/groups/#{group}/folders", params)
|
43
|
-
end
|
44
|
-
|
45
|
-
def resolve_path_for_group(group, full_path = nil, params = {})
|
46
|
-
get("/api/v1/groups/#{group}/folders/by_path#{full_path == nil ? "" : "/#{full_path}"}", params)
|
47
|
-
end
|
48
|
-
|
49
|
-
def create_group_folder(group, params = {})
|
50
|
-
post("/api/v1/groups/#{group}/folders", params)
|
51
|
-
end
|
52
|
-
|
53
|
-
def update_folder(folder, params = {})
|
54
|
-
put("/api/v1/folders/#{folder}", params)
|
55
|
-
end
|
56
|
-
|
57
|
-
def delete_folder(folder, params = {})
|
58
|
-
delete("/api/v1/folders/#{folder}", params)
|
59
|
-
end
|
60
|
-
|
61
|
-
def copy_folder(destination_folder, params = {})
|
62
|
-
post("/api/v1/folders/#{destination_folder}/copy_folder", params)
|
63
|
-
end
|
64
|
-
|
65
|
-
def copy_file_to_folder(destination_folder, params = {})
|
66
|
-
post("/api/v1/folders/#{destination_folder}/copy_file", params)
|
67
|
-
end
|
20
|
+
post :copy_folder, "/api/v1/folders/:destination_folder/copy_folder"
|
21
|
+
post :copy_file_to_folder, "/api/v1/folders/:destination_folder/copy_file"
|
68
22
|
end
|
69
23
|
end
|
70
24
|
end
|
@@ -1,27 +1,18 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module GroupCategories
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
get
|
6
|
+
prefix "/api/v1/:context/:id/group_categories/" do
|
7
|
+
get :list_group_categories
|
8
|
+
post :create_group_category
|
7
9
|
end
|
8
10
|
|
9
|
-
|
10
|
-
get
|
11
|
+
prefix "/api/v1/group_categories/:id/" do
|
12
|
+
get :group_category
|
13
|
+
put :edit_group_category
|
14
|
+
delete :delete_group_category
|
11
15
|
end
|
12
|
-
|
13
|
-
def edit_group_category(id, params={})
|
14
|
-
put("/api/v1/group_categories/#{id}", params)
|
15
|
-
end
|
16
|
-
|
17
|
-
def create_group_category(context, id, params={})
|
18
|
-
post("/api/v1/#{context}/#{id}/group_categories", params)
|
19
|
-
end
|
20
|
-
|
21
|
-
def delete_group_category(id, params={})
|
22
|
-
delete("/api/v1/group_categories/#{id}/", params)
|
23
|
-
end
|
24
|
-
|
25
16
|
end
|
26
17
|
end
|
27
18
|
end
|
@@ -1,21 +1,13 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module GroupMemberships
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
get
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
get("/api/v1/groups/#{group.to_s}/memberships")
|
11
|
-
end
|
12
|
-
|
13
|
-
def create_group_membership(group_id, params={})
|
14
|
-
post("/api/v1/groups/#{group_id}/memberships", params)
|
15
|
-
end
|
16
|
-
|
17
|
-
def delete_group_membership(group_id, context, context_id)
|
18
|
-
delete("/api/v1/groups/#{group_id}/#{context}/#{context_id}")
|
6
|
+
prefix "/api/v1/groups/:group/" do
|
7
|
+
get :group_membership, "memberships/:group_membership"
|
8
|
+
get :list_group_memberships, "memberships"
|
9
|
+
post :create_group_membership, "memberships"
|
10
|
+
delete :delete_group_membership, ":context/:context_id"
|
19
11
|
end
|
20
12
|
end
|
21
13
|
end
|
@@ -1,34 +1,19 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Groups
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
get
|
6
|
+
prefix "/api/v1/groups/:group/" do
|
7
|
+
get :group
|
8
|
+
put :edit_group
|
9
|
+
delete :delete_group
|
7
10
|
end
|
8
11
|
|
9
|
-
|
10
|
-
|
11
|
-
end
|
12
|
-
|
13
|
-
def category_groups(group_category_id)
|
14
|
-
get("/api/v1/group_categories/#{group_category_id}/groups")
|
15
|
-
end
|
16
|
-
|
17
|
-
def group(id)
|
18
|
-
get("/api/v1/groups/#{id}")
|
19
|
-
end
|
12
|
+
get :course_groups, "/api/v1/courses/:course/groups"
|
13
|
+
get :account_groups, "/api/v1/accounts/:account/groups"
|
20
14
|
|
21
|
-
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def edit_group(group_id, params={})
|
26
|
-
put("/api/v1/groups/#{group_id}", params)
|
27
|
-
end
|
28
|
-
|
29
|
-
def delete_group(group_id)
|
30
|
-
delete("/api/v1/groups/#{group_id}")
|
31
|
-
end
|
15
|
+
get :category_groups, "/api/v1/group_categories/:group_category/groups"
|
16
|
+
post :create_group, "/api/v1/group_categories/:group_category/groups"
|
32
17
|
end
|
33
18
|
end
|
34
19
|
end
|
@@ -1,25 +1,17 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module ModuleItems
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
get
|
7
|
-
|
8
|
-
|
9
|
-
def module_item(course_id, module_id, module_item_id, params = {})
|
10
|
-
get("/api/v1/courses/#{course_id}/modules/#{module_id}/items/#{module_item_id}", params)
|
11
|
-
end
|
12
|
-
|
13
|
-
def create_module_item(course_id, module_id, params={})
|
14
|
-
post("/api/v1/courses/#{course_id}/modules/#{module_id}/items", params)
|
15
|
-
end
|
16
|
-
|
17
|
-
def update_module_item(course_id, module_id, module_item_id, params={})
|
18
|
-
put("/api/v1/courses/#{course_id}/modules/#{module_id}/items/#{module_item_id}", params)
|
19
|
-
end
|
6
|
+
prefix "/api/v1/courses/:course/modules/:module/items/" do
|
7
|
+
get :list_module_items
|
8
|
+
post :create_module_item
|
20
9
|
|
21
|
-
|
22
|
-
|
10
|
+
prefix ":module_item/" do
|
11
|
+
get :module_item
|
12
|
+
put :update_module_item
|
13
|
+
delete :delete_module_item
|
14
|
+
end
|
23
15
|
end
|
24
16
|
end
|
25
17
|
end
|
@@ -1,29 +1,19 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Modules
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
def course_module_item_sequence(course, params = {})
|
10
|
-
get("/api/v1/courses/#{course}/module_item_sequence", params)
|
11
|
-
end
|
12
|
-
|
13
|
-
def course_module(course_id, context_module_id, params={})
|
14
|
-
get("/api/v1/courses/#{course_id}/modules/#{context_module_id}", params)
|
15
|
-
end
|
16
|
-
|
17
|
-
def create_module(course, params={})
|
18
|
-
post("/api/v1/courses/#{course}/modules", params)
|
19
|
-
end
|
6
|
+
prefix "/api/v1/courses/:course/" do
|
7
|
+
prefix "modules/" do
|
8
|
+
get :course_modules
|
9
|
+
post :create_module
|
20
10
|
|
21
|
-
|
22
|
-
|
23
|
-
|
11
|
+
get :course_module, ":context_module_id"
|
12
|
+
put :update_module, ":module_id"
|
13
|
+
delete :delete_module, ":module_id"
|
14
|
+
end
|
24
15
|
|
25
|
-
|
26
|
-
delete("/api/v1/courses/#{course}/modules/#{module_id}", params)
|
16
|
+
get :course_module_item_sequence, "module_item_sequence"
|
27
17
|
end
|
28
18
|
end
|
29
19
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module OutcomeGroups
|
4
|
+
extend ClientModule
|
4
5
|
|
5
6
|
def show_outcome_group(outcome_group_id, params={})
|
6
7
|
get("#{outcomes_context_slug(params)}#{outcome_group_id}")
|
@@ -61,21 +62,18 @@ module Bearcat
|
|
61
62
|
end
|
62
63
|
|
63
64
|
private
|
65
|
+
|
64
66
|
def account_slug(account_id)
|
65
67
|
"accounts/#{account_id}/outcome_groups/"
|
66
68
|
end
|
67
69
|
|
68
|
-
|
69
|
-
private
|
70
70
|
def course_slug(course_id)
|
71
71
|
"courses/#{course_id}/outcome_groups/"
|
72
72
|
end
|
73
73
|
|
74
|
-
private
|
75
74
|
def global_slug
|
76
75
|
"global/outcome_groups/"
|
77
76
|
end
|
78
|
-
|
79
77
|
end
|
80
78
|
end
|
81
79
|
end
|
@@ -1,15 +1,12 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Outcomes
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
get
|
6
|
+
prefix "/api/v1/outcomes/:outcome/" do
|
7
|
+
get :show_outcome
|
8
|
+
put :update_outcome
|
7
9
|
end
|
8
|
-
|
9
|
-
def update_outcome(id, params={})
|
10
|
-
put("/api/v1/outcomes/#{id}", params)
|
11
|
-
end
|
12
|
-
|
13
10
|
end
|
14
11
|
end
|
15
12
|
end
|
data/lib/bearcat/client/pages.rb
CHANGED
@@ -1,29 +1,14 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Pages
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
def show_course_page(course, url, params={})
|
14
|
-
get("/api/v1/courses/#{course}/pages/#{url}", params)
|
15
|
-
end
|
16
|
-
|
17
|
-
def show_group_page(group, url, params={})
|
18
|
-
get("/api/v1/groups/#{group}/pages/#{url}", params)
|
19
|
-
end
|
20
|
-
|
21
|
-
def add_course_page(course, params={})
|
22
|
-
post("api/v1/courses/#{course}/pages", params)
|
23
|
-
end
|
24
|
-
|
25
|
-
def add_group_page(group, params={})
|
26
|
-
post("/api/v1/groups/#{group}/pages", params)
|
4
|
+
extend ClientModule
|
5
|
+
|
6
|
+
context_types %i[course group] do |ct|
|
7
|
+
prefix "/api/v1/#{ct}s/:#{ct}/pages/" do
|
8
|
+
get :"list_#{ct}_pages"
|
9
|
+
post :"add_#{ct}_page"
|
10
|
+
get :"show_#{ct}_page", ":url"
|
11
|
+
end
|
27
12
|
end
|
28
13
|
end
|
29
14
|
end
|
@@ -1,41 +1,21 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Quizzes
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
def quiz_assignment_overrides(course, params={})
|
22
|
-
get("/api/v1/courses/#{course}/quizzes/assignment_overrides", params)
|
23
|
-
end
|
24
|
-
|
25
|
-
def quiz_questions(course, quiz, params={})
|
26
|
-
get("/api/v1/courses/#{course}/quizzes/#{quiz}/questions", params)
|
27
|
-
end
|
28
|
-
|
29
|
-
def create_quiz(course, params={})
|
30
|
-
post("/api/v1/courses/#{course}/quizzes", params)
|
31
|
-
end
|
32
|
-
|
33
|
-
def create_quiz_report(course, quiz, params={})
|
34
|
-
post("/api/v1/courses/#{course}/quizzes/#{quiz}/reports", params)
|
35
|
-
end
|
36
|
-
|
37
|
-
def get_quiz_report(course, quiz, report, params)
|
38
|
-
get("/api/v1/courses/#{course}/quizzes/#{quiz}/reports/#{report}", params)
|
4
|
+
extend ClientModule
|
5
|
+
|
6
|
+
prefix "/api/v1/courses/:course/" do
|
7
|
+
get :list_course_quizzes, "quizzes"
|
8
|
+
post :create_quiz, "quizzes"
|
9
|
+
get :quiz_assignment_overrides, "quizzes/assignment_overrides"
|
10
|
+
|
11
|
+
prefix "quizzes/:quiz/" do
|
12
|
+
get :quiz
|
13
|
+
put :edit_quiz
|
14
|
+
post :quiz_extensions, "extensions"
|
15
|
+
get :quiz_questions, "questions"
|
16
|
+
post :create_quiz_report, "reports"
|
17
|
+
get :get_quiz_report, "reports/:report"
|
18
|
+
end
|
39
19
|
end
|
40
20
|
end
|
41
21
|
end
|
@@ -3,25 +3,14 @@ require 'csv'
|
|
3
3
|
module Bearcat
|
4
4
|
class Client < Footrest::Client
|
5
5
|
module Reports
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
def report_history(account, report_name)
|
16
|
-
get("/api/v1/accounts/#{account}/reports/#{report_name}")
|
17
|
-
end
|
18
|
-
|
19
|
-
def report_status(account, report_name, report_id)
|
20
|
-
get("/api/v1/accounts/#{account}/reports/#{report_name}/#{report_id}")
|
21
|
-
end
|
22
|
-
|
23
|
-
def delete_report(account, report_name, report_id)
|
24
|
-
delete("/api/v1/accounts/#{account}/reports/#{report_name}/#{report_id}")
|
6
|
+
extend ClientModule
|
7
|
+
|
8
|
+
prefix "/api/v1/accounts/:account/reports/" do
|
9
|
+
get :report_list
|
10
|
+
post :start_report, ":report_name"
|
11
|
+
get :report_history, ":report_name"
|
12
|
+
get :report_status, ":report_name/:report_id"
|
13
|
+
delete :delete_report, ":report_name/:report_id"
|
25
14
|
end
|
26
15
|
|
27
16
|
def download_report(url, save_location=nil)
|
data/lib/bearcat/client/roles.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Roles
|
4
|
+
extend ClientModule
|
4
5
|
|
5
6
|
def roles(account_id='self', params={})
|
6
7
|
get("/api/v1/accounts/#{account_id}/roles", params)
|
@@ -9,7 +10,6 @@ module Bearcat
|
|
9
10
|
def role(role_id, account_id='self', params={})
|
10
11
|
get("/api/v1/accounts/#{account_id}/roles/#{role_id}", params)
|
11
12
|
end
|
12
|
-
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -1,29 +1,17 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module Rubric
|
4
|
-
|
5
|
-
get("api/v1/courses/#{course}/rubrics/#{rubric}")
|
6
|
-
end
|
7
|
-
|
8
|
-
def course_rubrics(course, params={})
|
9
|
-
get("api/v1/courses/#{course}/rubrics", params)
|
10
|
-
end
|
11
|
-
|
12
|
-
def create_course_rubric(course, params={})
|
13
|
-
post("api/v1/courses/#{course}/rubrics/", params)
|
14
|
-
end
|
15
|
-
|
16
|
-
def update_course_rubric(course, rubric, params={})
|
17
|
-
put("api/v1/courses/#{course}/rubrics/#{rubric}", params)
|
18
|
-
end
|
4
|
+
extend ClientModule
|
19
5
|
|
20
|
-
|
21
|
-
|
6
|
+
prefix "/api/v1/courses/:course/rubrics/" do
|
7
|
+
get :course_rubric, ":rubric"
|
8
|
+
get :course_rubrics
|
9
|
+
post :create_course_rubric
|
10
|
+
put :update_course_rubric, ":rubric"
|
11
|
+
delete :delete_course_rubric, ":rubric"
|
22
12
|
end
|
23
13
|
|
24
|
-
|
25
|
-
get("api/v1/accounts/#{account}/rubrics", params={})
|
26
|
-
end
|
14
|
+
get :account_rubrics, "api/v1/accounts/:account/rubrics"
|
27
15
|
end
|
28
16
|
end
|
29
17
|
end
|
@@ -1,19 +1,13 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module RubricAssessment
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
post
|
6
|
+
prefix "/api/v1/courses/:course/rubric_associations/:rubric_association/rubric_assessments/" do
|
7
|
+
post :create_course_rubric_assessment
|
8
|
+
put :update_course_rubric_assessment, ":rubric_assessment"
|
9
|
+
delete :delete_course_rubric_assessment, ":rubric_assessment"
|
7
10
|
end
|
8
|
-
|
9
|
-
def update_course_rubric_assessment(course, rubric_association, rubric_assessment, params={})
|
10
|
-
put("api/v1/courses/#{course}/rubric_associations/#{rubric_association}/rubric_assessments/#{rubric_assessment}", params)
|
11
|
-
end
|
12
|
-
|
13
|
-
def delete_course_rubric_assessment(course, rubric_association, rubric_assessment)
|
14
|
-
delete("api/v1/courses/#{course}/rubric_associations/#{rubric_association}/rubric_assessments/#{rubric_assessment}")
|
15
|
-
end
|
16
|
-
|
17
11
|
end
|
18
12
|
end
|
19
13
|
end
|
@@ -1,19 +1,13 @@
|
|
1
1
|
module Bearcat
|
2
2
|
class Client < Footrest::Client
|
3
3
|
module RubricAssociation
|
4
|
+
extend ClientModule
|
4
5
|
|
5
|
-
|
6
|
-
post
|
6
|
+
prefix "/api/v1/courses/:course/rubric_associations/" do
|
7
|
+
post :create_course_rubric_association
|
8
|
+
put :update_course_rubric_association, ":rubric_association"
|
9
|
+
delete :delete_course_rubric_association, ":rubric_association"
|
7
10
|
end
|
8
|
-
|
9
|
-
def update_course_rubric_association(course, rubric_association, params={})
|
10
|
-
put("api/v1/courses/#{course}/rubric_associations/#{rubric_association}", params)
|
11
|
-
end
|
12
|
-
|
13
|
-
def delete_course_rubric_association(course, rubric_association)
|
14
|
-
delete("api/v1/courses/#{course}/rubric_associations/#{rubric_association}")
|
15
|
-
end
|
16
|
-
|
17
11
|
end
|
18
12
|
end
|
19
|
-
end
|
13
|
+
end
|