bearcat 1.5.30 → 1.5.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/badgrcat/client/methods.rb +1 -1
- data/lib/badgrcat/client.rb +6 -1
- data/lib/bearcat/client/account_notifications.rb +19 -0
- data/lib/bearcat/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e3ef3764b8ecc32d384cee21aeb95017b060ceaa0cb2bd4975d51be8ce58a96
|
4
|
+
data.tar.gz: 72711af874a71e4f326fef590ccded2d10bbc85f088bed94047bab806c5b808c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a0da1e0ad1daa07cd70a918490e774ea6de3755bff1c2c497877af7dea38b4bcc1b11776cf1bd36f3e9cd8215384bf36719ce39c76032d54bf34dff50b4cd3b
|
7
|
+
data.tar.gz: f6baf52e50c7e688b5178c42f79bc2f5bd425cd8bc55cd173da447813a445e7c66b087c5dc666698f5ad35efe12f2ecc9ac089ff0b3e1ec64177556a4478c5cc
|
data/lib/badgrcat/client.rb
CHANGED
@@ -14,7 +14,7 @@ module Badgrcat
|
|
14
14
|
def request(method, &block)
|
15
15
|
response = begin
|
16
16
|
connection.send(method, &block)
|
17
|
-
rescue Footrest::HttpError::NotFound => e
|
17
|
+
rescue Footrest::HttpError::BadRequest, Footrest::HttpError::NotFound => e
|
18
18
|
raise e unless connection.headers[:authorization].nil?
|
19
19
|
|
20
20
|
# Reauthenticate and retry if authorization header is nil
|
@@ -37,6 +37,11 @@ module Badgrcat
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
# Modify delete request to send params in body instead of query params
|
41
|
+
def delete(path, options = {})
|
42
|
+
request_with_params_in_body(:delete, path, options)
|
43
|
+
end
|
44
|
+
|
40
45
|
def authenticate!
|
41
46
|
connection.headers[:authorization] = nil
|
42
47
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bearcat
|
4
|
+
class Client < Footrest::Client
|
5
|
+
module AccountNotifications
|
6
|
+
extend ClientModule
|
7
|
+
|
8
|
+
prefix "/api/v1/accounts/:account_id/account_notifications/" do
|
9
|
+
get :global_notifications_for_user
|
10
|
+
post :create_global_notification
|
11
|
+
prefix ":id/" do
|
12
|
+
get :global_notification
|
13
|
+
put :update_global_notification
|
14
|
+
delete :close_global_notification_for_user
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/bearcat/version.rb
CHANGED
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.5.
|
4
|
+
version: 1.5.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure CustomDev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/bearcat.rb
|
173
173
|
- lib/bearcat/api_array.rb
|
174
174
|
- lib/bearcat/client.rb
|
175
|
+
- lib/bearcat/client/account_notifications.rb
|
175
176
|
- lib/bearcat/client/account_reports.rb
|
176
177
|
- lib/bearcat/client/accounts.rb
|
177
178
|
- lib/bearcat/client/analytics.rb
|
@@ -445,7 +446,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
445
446
|
- !ruby/object:Gem::Version
|
446
447
|
version: '0'
|
447
448
|
requirements: []
|
448
|
-
rubygems_version: 3.
|
449
|
+
rubygems_version: 3.4.10
|
449
450
|
signing_key:
|
450
451
|
specification_version: 4
|
451
452
|
summary: Canvas API
|