strongmind-schoology-client 0.1.4 → 0.1.5
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b4adaea90620c1414be5f78d31cba6f521114b6692f1b5917b93eda23857169
|
4
|
+
data.tar.gz: 624f6830f28c28ea5261be09495440cb2bdfa527e5d69c5e67f9c1ac8afd820d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2ca0fcdf5eb50bc8826cc2e041de18aae11501eb3c8df2bfcbaa09a46f03265d67d73f73f24c01bca6b784aa61a0606b9ca3b57e0727244c1dff034118dccfb
|
7
|
+
data.tar.gz: b334eade9ffe19115844aee89b0b6374bf5a730308ba58f03823018a3227109165ce128207cc1a7a3c9d7bffd109f13c1545e4b704f7559eed6e8e6212f918d8
|
@@ -12,6 +12,10 @@ module SchoologyClient
|
|
12
12
|
handle_response @client.connection.post(url, body, headers)
|
13
13
|
end
|
14
14
|
|
15
|
+
def put_request(url, body:, headers: {})
|
16
|
+
handle_response @client.connection.put(url, body, headers)
|
17
|
+
end
|
18
|
+
|
15
19
|
def handle_response(response)
|
16
20
|
case response.status
|
17
21
|
when 400
|
@@ -6,6 +6,10 @@ module SchoologyClient
|
|
6
6
|
def create(**attributes)
|
7
7
|
GroupResource.new post_request("groups", body: attributes.to_json).body
|
8
8
|
end
|
9
|
+
|
10
|
+
def update(id, **attributes)
|
11
|
+
GroupResource.new put_request("groups/#{id}", body: attributes.to_json).body
|
12
|
+
end
|
9
13
|
end
|
10
14
|
end
|
11
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strongmind-schoology-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Strongmind
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|