easyllama-client 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90e02be82a179df253b9307fe743895d2a0cb506d9ca9c860437b915c4d2125a
4
- data.tar.gz: ade84697ba0a443078331fa59f6a537968047bcd9bd2a68e66f6687f8da56146
3
+ metadata.gz: e5d38f0ff660ed2744a84dbfd7397e8c1449f9ba783900bd5c87f8c783274712
4
+ data.tar.gz: 49685a461195dad89aa66713b1f8e6e9914fdc643001ffcf83546cd95e35d1e7
5
5
  SHA512:
6
- metadata.gz: 0f253b970ad0ee4bf658f238186ecddb693853cf07400ea750a4af1ffb7ff149547b1e9a049be3f0465ca72324918583e31a64d4bfc13b44e8ac95ae8630eff1
7
- data.tar.gz: 893b1c44a5ab43c4fc290040c7abe51d1253c3729a0571b803ba0af7948864254d8f2bfe72dfff040a6396c5a4b1959347376bbff7a1159218882c50598bc834
6
+ metadata.gz: 7ef08ef8712c7a293b89b7b5042d1e7724b8735030f70d0c11a980efcb546b344b6e6ff74d4a5a48a2faaa9e1cfe9a11a0030f6f828b3c3d675f7edd3e4d82a8
7
+ data.tar.gz: 5b40765a317c5d28a6f3e7803a65f3a0594ca07613ab35fd0d5bbd410b60fc244d24d552f4999fe0841017bf1a13b09e6925fbb7698768e55816e23de6afdc1d
data/lib/easyllama/api.rb CHANGED
@@ -60,7 +60,7 @@ module EasyLlama
60
60
  request['content-type'] = 'application/json'
61
61
  request['accept'] = 'application/json'
62
62
  request['authorization'] = "Bearer #{@token}"
63
- request.body = body if body.present?
63
+ request.body = body.to_json if body.present?
64
64
  request
65
65
  end
66
66
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module EasyLlama
4
4
  module Client
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
@@ -48,7 +48,7 @@ module EasyLlama
48
48
  #
49
49
  # @param training_id [Integer] The ID of the training.
50
50
  # @param learner_id [Integer] The ID of the learner.
51
- # @return [Object] The training assignment details or an error message.
51
+ # @return [Object] The learner training or an error message.
52
52
  def assign_training_to_learner(training_id:, learner_id:)
53
53
  response = send_request(
54
54
  path: "/learners/#{learner_id}/learner_trainings",
@@ -56,7 +56,7 @@ module EasyLlama
56
56
  body: { learner_id:, training_id: }
57
57
  )
58
58
 
59
- parse_response!(response)
59
+ parse_response!(response, 'learner_training')
60
60
  end
61
61
 
62
62
  # Sends a DELETE request to unassign a training from a learner.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easyllama-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitalii Kashoid