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: 3d0ab2bf3b584a58dd5ff1910327b299578cfdca8652626b96875ae8739e8069
4
- data.tar.gz: 023bfd2f65938daac6e6a499cbaa779f1a4207665b9a3f2ab02138279d0cf9df
3
+ metadata.gz: 1b4adaea90620c1414be5f78d31cba6f521114b6692f1b5917b93eda23857169
4
+ data.tar.gz: 624f6830f28c28ea5261be09495440cb2bdfa527e5d69c5e67f9c1ac8afd820d
5
5
  SHA512:
6
- metadata.gz: 82126ddbfac4653562ee968be3e3e20edeef457b75f29b9542354e771a989404c1b201ccb4959769916e7dfa139573f746192b5a2ec07cbbfeb19fa9931ae74a
7
- data.tar.gz: 1727d3db2822510fd11b1b5648605156ee4003d1d42efa599ef9ff1a590dbd68d848280e8ac37115b2372a70c4247c627d33bc5ab161e9806cd66ef321c4baed
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SchoologyClient
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
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
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-02 00:00:00.000000000 Z
11
+ date: 2023-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday