sticapi_client 3.1.0 → 3.1.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/sticapi_client/sip.rb +7 -0
- data/lib/sticapi_client/sticapi_controller.rb +2 -11
- data/lib/sticapi_client/user.rb +9 -0
- data/lib/sticapi_client/version.rb +1 -1
- data/lib/sticapi_client.rb +5 -4
- 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: d5db8859f80df496d77936de8d0bccaf603cec12218353ffac11a1ba565e41cb
|
4
|
+
data.tar.gz: 240b37c8caad43e2c476f5d71538b06eab62d8f04dc3ea991b3c53995e73c127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad9301d98fe8b7e03386030a5a6e9feebcb7a6efed6a31ceb4b12952fea429f78a8fd525f1dfda2e5100b14a9b606b38169d0e780825cdaecc3dbda512381452
|
7
|
+
data.tar.gz: b569f45ebb45c621ce79e6b90d15a054b1c0fb44bd897fc05fe5a3303c1104f5cfd5f16cb98c7e29f9736bbd9b1c0ad928f51ad6df28ab9ac5e4178084e26049
|
data/lib/sticapi_client/sip.rb
CHANGED
@@ -32,5 +32,12 @@ module SticapiClient
|
|
32
32
|
options[:kind] = 'get'
|
33
33
|
Sticapi::SticapiClient.instance.sticapi_request("/sip/unidades_do_usuario", options)
|
34
34
|
end
|
35
|
+
|
36
|
+
# Consulta os ids de documentos de um processo SEI
|
37
|
+
# Parâmetro processo [String] número do processo SEI
|
38
|
+
# Retorno [JSON] IDs dos documentos SEI
|
39
|
+
def self.processo_documentos(options = {})
|
40
|
+
Sticapi::SticapiClient.instance.sticapi_request("/sip/processo_documentos", options)
|
41
|
+
end
|
35
42
|
end
|
36
43
|
end
|
@@ -1,16 +1,7 @@
|
|
1
|
+
# This module is deprecated!!!
|
1
2
|
module SticapiController
|
2
|
-
def self.included(base)
|
3
|
-
base.send(:before_action, :get_token)
|
4
|
-
# base.send(:after_action, :update_token)
|
5
|
-
end
|
6
|
-
|
7
3
|
def initialize
|
8
4
|
super
|
9
|
-
|
10
|
-
return
|
11
|
-
end
|
12
|
-
|
13
|
-
def get_token
|
14
|
-
Sticapi::SticapiClient.instance.get_token
|
5
|
+
ActiveSupport::Deprecation.warn("SticapiController module is deprecated!!!")
|
15
6
|
end
|
16
7
|
end
|
data/lib/sticapi_client/user.rb
CHANGED
@@ -78,6 +78,15 @@ module SticapiClient
|
|
78
78
|
def self.change_password(options = {})
|
79
79
|
Sticapi::SticapiClient.instance.sticapi_request("/users/change_password", options)
|
80
80
|
end
|
81
|
+
|
82
|
+
# Altera o email de um usuário no AD
|
83
|
+
# Parâmetro username [string] username
|
84
|
+
# Parâmetro email [String] novo email do usuário
|
85
|
+
# Retorno [JSON] Sucesso ou falha ao alterar o email do usuário
|
86
|
+
# user: { string }
|
87
|
+
def self.change_email(options = {})
|
88
|
+
Sticapi::SticapiClient.instance.sticapi_request("/users/change_email", options)
|
89
|
+
end
|
81
90
|
end
|
82
91
|
end
|
83
92
|
end
|
data/lib/sticapi_client.rb
CHANGED
@@ -68,13 +68,14 @@ module Sticapi
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def update_token(response)
|
71
|
-
@access_token = response['access-token']
|
72
|
-
@client = response['client']
|
73
|
-
@uid = response['uid']
|
74
|
-
@expiry = response['expiry']
|
71
|
+
@access_token = response['access-token'] if response['access-token']
|
72
|
+
@client = response['client'] if response['client']
|
73
|
+
@uid = response['uid'] if response['uid']
|
74
|
+
@expiry = response['expiry'] if response['expiry']
|
75
75
|
end
|
76
76
|
|
77
77
|
def sticapi_request(route, options = {})
|
78
|
+
get_token
|
78
79
|
kind = options[:kind] || 'post'
|
79
80
|
uri = URI.parse("#{self.uri}#{route}")
|
80
81
|
http = Net::HTTP.new(uri.host, uri.port)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sticapi_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Viana
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|