api_registro 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: dbf83e994f40555ae914dbec6c76c8387739e308
4
- data.tar.gz: 79179e27ee44f7e4fe258a21f2906cafb6bfd298
3
+ metadata.gz: 31c65ac5e2525dd1ebbe6cdb72b2fed0aa281ca8
4
+ data.tar.gz: e841004942b406b2f90ce5ec70c39e6da2c63d47
5
5
  SHA512:
6
- metadata.gz: 00637fef648f80c1c04a8a45ab08f42898f63741417c12685cef9912adb408c669bea80c60b46abd2e971dd0f89144d3044947396e8fbd3ca9d8a789ba9394c6
7
- data.tar.gz: 57c0c406d645fccb7cc1fff441908eebcdbe5d74e357b3205eb7e18d5f18d062f468b0153ea92b4af7a4a8ba1c782f11e3b46d2923ef594f532785b12f39f5fd
6
+ metadata.gz: 4f42c8ea2f4b1b2096c2cb4bfe91932b54ab51e8f2b6d5fb3e0d30bffe4cdc5c200d6a9084593576ff1d238461e8b63bbabe59384b8d85bb002661117a0e7735
7
+ data.tar.gz: 328f0bb8847d6211415121224dd9803c857194dc794346c83d79a32fcc97edde23e9c9eadc2fe99bbda75c7b4683a9cd7d694008bc11ae866f8af92de7d6604e
@@ -15,14 +15,14 @@ module ApiRegistro
15
15
  },
16
16
  body: opts.to_json
17
17
  }
18
- request(url_for(:create_contact), ApiRegistro::SupportedMethods::POST, message)
18
+ JSON.parse(request(url_for(:create_contact), ApiRegistro::SupportedMethods::POST, message))
19
19
  end
20
20
 
21
21
  def find_contact(document_number)
22
22
  message = {
23
23
  headers: { "Accept" => "application/json", "authorization" => @token }
24
24
  }
25
- request(url_for(:find_contact, document_number), ApiRegistro::SupportedMethods::GET, message)
25
+ JSON.parse(request(url_for(:find_contact, document_number), ApiRegistro::SupportedMethods::GET, message))
26
26
  end
27
27
 
28
28
  def register_domain(domain, document_number)
@@ -33,14 +33,14 @@ module ApiRegistro
33
33
  },
34
34
  body: {document: document_number}.to_json
35
35
  }
36
- request(url_for(:register_domain, domain), ApiRegistro::SupportedMethods::POST, message)
36
+ JSON.parse(request(url_for(:register_domain, domain), ApiRegistro::SupportedMethods::POST, message))
37
37
  end
38
38
 
39
39
  def find_domain(domain_name)
40
40
  message = {
41
41
  headers: { "Accept" => "application/json", "authorization" => @token }
42
42
  }
43
- request(url_for(:find_domain, domain_name), ApiRegistro::SupportedMethods::GET, message)
43
+ JSON.parse(request(url_for(:find_domain, domain_name), ApiRegistro::SupportedMethods::GET, message))
44
44
  end
45
45
 
46
46
  private
@@ -57,7 +57,7 @@ module ApiRegistro
57
57
  def uris
58
58
  {
59
59
  create_contact: "contacts/",
60
- find_contact: "contacts/%s",
60
+ find_contact: "contacts/%s/",
61
61
  register_domain: "domains/%s/buy/",
62
62
  find_domain: "domains/?search=%s"
63
63
  }
@@ -75,4 +75,4 @@ module ApiRegistro
75
75
  end
76
76
 
77
77
  end
78
- end
78
+ end
@@ -1,3 +1,3 @@
1
1
  module ApiRegistro
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_registro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Quirino Oliveira