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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de923f29d0022525ca79e95b7858115a09f54483d2165e884943cde1c8dcd870
4
- data.tar.gz: 77f0819faeaa3a6cb67bf526058719a81e0aee8077f69be09901b2d88bbf114c
3
+ metadata.gz: 86b68e05a2ef558d45929e56c660abee761b42d21634b7957e992173506f8faf
4
+ data.tar.gz: d23cc7336ad16ef5a74856d22bcad124cfbb47a811e6a8e241fb1876bcf821d8
5
5
  SHA512:
6
- metadata.gz: a9f4679ec7df13c35044bc643799ddef973d191024c61f79b75c629106389e4f0e2b43cbb6cb0a898ac00450b0f42f476798ca83860758e0fac88654c53695d9
7
- data.tar.gz: 0c36b3615eab670eddaaffcc192e7ead58477201c28c95113ab8bc717f159eedd64f68d9f96410f64c2f1f3290d3cca20a325c0273bf80a607e889d07e1e31c9
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SophiaService
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
data/sig/api_client.rbs CHANGED
@@ -16,6 +16,8 @@ module SophiaService
16
16
 
17
17
  def get_classes_by_units: -> SophiaResponse
18
18
 
19
+ def get_classes_by_units_and_situation: -> SophiaResponse
20
+
19
21
  def get_collaborator_by_email: -> SophiaResponse
20
22
 
21
23
  def get_courses: -> SophiaResponse
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.1.0
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: 2024-12-19 00:00:00.000000000 Z
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: