api_registro 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_registro/client.rb +6 -6
- data/lib/api_registro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31c65ac5e2525dd1ebbe6cdb72b2fed0aa281ca8
|
4
|
+
data.tar.gz: e841004942b406b2f90ce5ec70c39e6da2c63d47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f42c8ea2f4b1b2096c2cb4bfe91932b54ab51e8f2b6d5fb3e0d30bffe4cdc5c200d6a9084593576ff1d238461e8b63bbabe59384b8d85bb002661117a0e7735
|
7
|
+
data.tar.gz: 328f0bb8847d6211415121224dd9803c857194dc794346c83d79a32fcc97edde23e9c9eadc2fe99bbda75c7b4683a9cd7d694008bc11ae866f8af92de7d6604e
|
data/lib/api_registro/client.rb
CHANGED
@@ -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
|
data/lib/api_registro/version.rb
CHANGED