sophia_service 1.1.0 → 1.2.0
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/README.md +10 -0
- data/lib/sophia_service/api_client.rb +14 -0
- data/lib/sophia_service/version.rb +1 -1
- data/sig/api_client.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86b68e05a2ef558d45929e56c660abee761b42d21634b7957e992173506f8faf
|
4
|
+
data.tar.gz: d23cc7336ad16ef5a74856d22bcad124cfbb47a811e6a8e241fb1876bcf821d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f264b012bdb218ff95a8517348d3336c77b9290cd6d02b1b11b6a9b19eb119fb630bb1adeffbd9feadd7c6a008d174e94a9ca1d22f33a6689bb8ff2f0a77752
|
7
|
+
data.tar.gz: cd29d08feebee908bfa66e6b3cdfa3eccb5841338ce8bba207ff948defd4865481ec915dfda07277f306078f6fd01da0b087c118fac11b202c0ca8e730b58305
|
data/README.md
CHANGED
@@ -37,3 +37,13 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
37
37
|
## Code of Conduct
|
38
38
|
|
39
39
|
Everyone interacting in the SophiaApiService project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sophia_api_service/blob/master/CODE_OF_CONDUCT.md).
|
40
|
+
|
41
|
+
### Generating a GEM
|
42
|
+
|
43
|
+
# Generating a new GEM
|
44
|
+
|
45
|
+
1 - Define new version number on `version.rb` file;
|
46
|
+
|
47
|
+
2 - Use the command `gem build` to create the gem package;
|
48
|
+
|
49
|
+
3 - Publish the gem on rubygem through the command `gem push sophia_service-[VERSION].gem`
|
@@ -63,6 +63,20 @@ module SophiaService
|
|
63
63
|
SophiaResponse.new(https.request(request))
|
64
64
|
end
|
65
65
|
|
66
|
+
def get_classes_by_units_and_situation(class_units, class_situation)
|
67
|
+
# Convert array of units and situation to a String separated by comma, to send it to Sophia API
|
68
|
+
class_units_query = class_units.join(",")
|
69
|
+
class_situation_query = class_situation.join(",")
|
70
|
+
url = URI("#{@sophia_routes.classes_route}?Situacoes=#{class_situation_query}&Unidades=#{class_units_query}")
|
71
|
+
https = Net::HTTP.new(url.host, url.port)
|
72
|
+
https.use_ssl = @should_use_ssl
|
73
|
+
request = Net::HTTP::Get.new(url)
|
74
|
+
request["Accept"] = "application/json"
|
75
|
+
request["Content-Type"] = "application/json"
|
76
|
+
request["Token"] = @sophia_token
|
77
|
+
SophiaResponse.new(https.request(request))
|
78
|
+
end
|
79
|
+
|
66
80
|
def get_collaborator_by_email(email)
|
67
81
|
url = URI("#{@sophia_routes.collaborators_route}?Email=#{email}")
|
68
82
|
https = Net::HTTP.new(url.host, url.port)
|
data/sig/api_client.rbs
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sophia_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João F.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Implements the main calls to the routes of the Sophia API ERP
|
14
14
|
email:
|