Class: LattesApi::Api
- Inherits:
-
Object
- Object
- LattesApi::Api
- Defined in:
- lib/lattes_api/api.rb
Instance Method Summary collapse
- #get_curriculo_compactado(id_cnpq) ⇒ Object
- #get_identificador_cnpq(cpf) ⇒ Object
-
#initialize ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize ⇒ Api
Returns a new instance of Api.
5 6 7 |
# File 'lib/lattes_api/api.rb', line 5 def initialize @client = Savon.client(wsdl: wsdl, endpoint: endpoint) end |
Instance Method Details
#get_curriculo_compactado(id_cnpq) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/lattes_api/api.rb', line 16 def get_curriculo_compactado(id_cnpq) response = @client.call( :get_curriculo_compactado, message: { id: id_cnpq }) result = response.body[:get_curriculo_compactado_response][:return] fail_or_return result end |
#get_identificador_cnpq(cpf) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/lattes_api/api.rb', line 9 def get_identificador_cnpq(cpf) response = @client.call(:get_identificador_cn_pq, message: { cpf: cpf, nomeCompleto: nil, dataNascimento: nil }) result = response.body[:get_identificador_cn_pq_response][:return] fail_or_return result end |