bearcat 1.4.4 → 1.4.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0857221e4d0ad037b8ff726dbb24110994f4bf6b
4
- data.tar.gz: d2d95e0503296a927e082c7d71e0ca43a8b961c0
2
+ SHA256:
3
+ metadata.gz: 9b90ec8e90ea31d17bebe5b08edbb4af296b201af79c052250c2655dedf734e6
4
+ data.tar.gz: db220f338bdcd6ad166fed415080eb7f65367c6db99e13781ad3b1cc1335be2e
5
5
  SHA512:
6
- metadata.gz: 2951d3c1ced27bd655e0aa22e334540f75faf0773ecb4508381a20d3098027cdeb1191d56170501fa9d91686236812a752fee354272c0440fd7c76916eb0dda5
7
- data.tar.gz: 1dcfb8372c50727e46d98f6f17c04d10b04495535faf916c04913a17f905827be4080e52ad4681856f5b0459fef9b09fd34a9084fc41cae1fdbe6b4d52b68b6f
6
+ metadata.gz: 6c3ada3e912c59d97757232c5451cc5ffc5fc1f289d3009d8a1e71cc24e556d0529b43742778b94ded2a73294a7bae7043dd302720e82f755cdbd2e5e930c10f
7
+ data.tar.gz: 6cbe47361dbfcb48cefc96353cf2cd34fc5e6974cbbaa673dc04b4363ed0d14669b3ed6c02b567a5266e08fdb1ede99402a498c7630b0a0ba38f2976cb96a40c
@@ -2,13 +2,69 @@ module Bearcat
2
2
  class Client < Footrest::Client
3
3
  module Folders
4
4
 
5
+ def get_course_folder(course, folder, params = {})
6
+ get("/api/v1/courses/#{course}/folders/#{folder}", params)
7
+ end
8
+
5
9
  def list_course_folders(course, params = {})
6
10
  get("/api/v1/courses/#{course}/folders", params)
7
11
  end
8
12
 
13
+ def resolve_path_for_course(course, full_path = nil, params)
14
+ get("/api/v1/courses/#{course}/folders/by_path#{full_path == nil ? "" : "/#{full_path}"}", params)
15
+ end
16
+
9
17
  def create_course_folder(course, params = {})
10
18
  post("/api/v1/courses/#{course}/folders", params)
11
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
12
68
  end
13
69
  end
14
70
  end
@@ -0,0 +1,15 @@
1
+ module Bearcat
2
+ class Client < Footrest::Client
3
+ module Tabs
4
+
5
+ def get_tabs(course, params={})
6
+ get("/api/v1/courses/#{course}/tabs", params)
7
+ end
8
+
9
+ def update_tab(id, course, params={})
10
+ put("/api/v1/courses/#{course}/tabs/#{id}", params)
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -45,6 +45,7 @@ module Bearcat
45
45
  require 'bearcat/client/rubric_assessment'
46
46
  require 'bearcat/client/rubric_association'
47
47
  require 'bearcat/client/progresses'
48
+ require 'bearcat/client/tabs'
48
49
 
49
50
  include Assignments
50
51
  include Accounts
@@ -86,6 +87,7 @@ module Bearcat
86
87
  include RubricAssessment
87
88
  include RubricAssociation
88
89
  include Progresses
90
+ include Tabs
89
91
 
90
92
  # Override Footrest request for ApiArray support
91
93
  def request(method, &block)
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.4.4' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.4.8' unless defined?(Bearcat::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills, Jake Sorce
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-20 00:00:00.000000000 Z
11
+ date: 2021-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -174,6 +174,7 @@ files:
174
174
  - lib/bearcat/client/search.rb
175
175
  - lib/bearcat/client/sections.rb
176
176
  - lib/bearcat/client/submissions.rb
177
+ - lib/bearcat/client/tabs.rb
177
178
  - lib/bearcat/client/users.rb
178
179
  - lib/bearcat/spec_helpers.rb
179
180
  - lib/bearcat/version.rb
@@ -363,10 +364,10 @@ files:
363
364
  - spec/fixtures/user_page_views.json
364
365
  - spec/fixtures/user_profile.json
365
366
  - spec/helper.rb
366
- homepage:
367
+ homepage:
367
368
  licenses: []
368
369
  metadata: {}
369
- post_install_message:
370
+ post_install_message:
370
371
  rdoc_options: []
371
372
  require_paths:
372
373
  - lib
@@ -381,9 +382,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
381
382
  - !ruby/object:Gem::Version
382
383
  version: '0'
383
384
  requirements: []
384
- rubyforge_project:
385
- rubygems_version: 2.4.5.1
386
- signing_key:
385
+ rubygems_version: 3.1.2
386
+ signing_key:
387
387
  specification_version: 4
388
388
  summary: Canvas API
389
389
  test_files: