easyllama-client 0.2.2 → 0.2.3
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 +4 -4
- data/lib/easyllama/client/version.rb +1 -1
- data/lib/easyllama/client.rb +5 -0
- data/lib/easyllama/learner_trainings.rb +18 -0
- data/lib/easyllama/learners.rb +4 -3
- data/lib/easyllama/locations.rb +4 -3
- data/lib/easyllama/trainings.rb +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 903c7bae3a844f73ab2d96243015e7a738a385878308fd1bb20e8061c807aec4
|
4
|
+
data.tar.gz: de4509cfc6fb7cf02e6d20cb8631d0cd83251c5a35a7ff0639d50c463c96e133
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa7f902ba1ce705fecde58e46ffc011ac4426cacd10597fa82124b57f33127a6b24bb72effb0e69c5810dd5c193210682d4a3a01552f5697789226538bf04c88
|
7
|
+
data.tar.gz: db0620a5e4995a3a36a9f834f1ec0f15526c2ae02bff243c97ee8e50e75a800293e64a821eee3ef62d7e522f0317f4fe26da37d41dabda8a9ecd85e23dd61b2a
|
data/lib/easyllama/client.rb
CHANGED
@@ -8,6 +8,7 @@ require_relative 'oauth'
|
|
8
8
|
require_relative 'locations'
|
9
9
|
require_relative 'learners'
|
10
10
|
require_relative 'trainings'
|
11
|
+
require_relative 'learner_trainings'
|
11
12
|
|
12
13
|
module EasyLlama
|
13
14
|
# This class provides methods for interacting with the Easy Llama API interface.
|
@@ -26,6 +27,10 @@ module EasyLlama
|
|
26
27
|
def trainings
|
27
28
|
Trainings.new(api_token)
|
28
29
|
end
|
30
|
+
|
31
|
+
def learner_trainings
|
32
|
+
LearnerTrainings.new(api_token)
|
33
|
+
end
|
29
34
|
end
|
30
35
|
end
|
31
36
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EasyLlama
|
4
|
+
class Client
|
5
|
+
# This class provides methods for interacting with the Easy Llama API for learner trainings.
|
6
|
+
class LearnerTrainings < Api
|
7
|
+
# Sends a GET request to retrieve all learner trainings.
|
8
|
+
#
|
9
|
+
# @param page [Integer] The page number.
|
10
|
+
# @return [Array] The learner trainings or an error message.
|
11
|
+
def where(page: 1, learner_id: nil, training_id: nil, status: nil, sort: nil)
|
12
|
+
response = send_request(path: '/learner_trainings', body: { page:, learner_id:, training_id:, status:, sort: })
|
13
|
+
|
14
|
+
parse_response!(response, 'learner_trainings')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/easyllama/learners.rb
CHANGED
@@ -6,9 +6,10 @@ module EasyLlama
|
|
6
6
|
class Learners < Api
|
7
7
|
# Sends a GET request to retrieve all learners.
|
8
8
|
#
|
9
|
-
# @
|
10
|
-
|
11
|
-
|
9
|
+
# @param page [Integer] The page number.
|
10
|
+
# @return [Array] The learners or an error message.
|
11
|
+
def all(page: 1)
|
12
|
+
response = send_request(path: '/learners', body: { page: })
|
12
13
|
|
13
14
|
parse_response!(response, 'learners')
|
14
15
|
end
|
data/lib/easyllama/locations.rb
CHANGED
@@ -6,9 +6,10 @@ module EasyLlama
|
|
6
6
|
class Locations < Api
|
7
7
|
# Sends a GET request to retrieve all locations.
|
8
8
|
#
|
9
|
-
# @
|
10
|
-
|
11
|
-
|
9
|
+
# @param page [Integer] The page number.
|
10
|
+
# @return [Array] The locations or an error message.
|
11
|
+
def all(page: 1)
|
12
|
+
response = send_request(path: '/locations', body: { page: })
|
12
13
|
|
13
14
|
parse_response!(response, 'locations')
|
14
15
|
end
|
data/lib/easyllama/trainings.rb
CHANGED
@@ -6,9 +6,10 @@ module EasyLlama
|
|
6
6
|
class Trainings < Api
|
7
7
|
# Sends a GET request to retrieve all trainings.
|
8
8
|
#
|
9
|
-
# @
|
10
|
-
|
11
|
-
|
9
|
+
# @param page [Integer] The page number.
|
10
|
+
# @return [Array] The trainings or an error message.
|
11
|
+
def all(page: 1)
|
12
|
+
response = send_request(path: '/trainings', body: { page: })
|
12
13
|
|
13
14
|
parse_response!(response, 'trainings')
|
14
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easyllama-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitalii Kashoid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- lib/easyllama/api.rb
|
49
49
|
- lib/easyllama/client.rb
|
50
50
|
- lib/easyllama/client/version.rb
|
51
|
+
- lib/easyllama/learner_trainings.rb
|
51
52
|
- lib/easyllama/learners.rb
|
52
53
|
- lib/easyllama/locations.rb
|
53
54
|
- lib/easyllama/oauth.rb
|