godaddy23 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
  SHA256:
3
- metadata.gz: 46e1d4914b33543a26c795ab05cb50e5f67736661314dd378b72abb66055dca7
4
- data.tar.gz: 71527846315a60ae5db2d7ae393b44b8b024392e5aaf213e295504c98f83d72a
3
+ metadata.gz: afb0f7096b018e115f6cd9569ffb5f921199b289cf70eb7797c453706c9b25ac
4
+ data.tar.gz: ffed7ba33007967d6cf8cbb4cb2b71f033a85b71971b8922a5a8a1d871a2c825
5
5
  SHA512:
6
- metadata.gz: d80d70092fbe4fe8c5d89b48d9be5797e58caf8f601006d3ec94de7c9388aedb89fc53c1595b7f2017490853c59b340d38c1d27295a9cdf97964387c98446e52
7
- data.tar.gz: 1c63b577156a5115e2af2ac907cedadea6605c96efc8f2bb7c6e47c69070f07dfc217f13f921893fccc6718a3ccbe45ddf140f1744a05d1085d9b2a6fbdb5d61
6
+ metadata.gz: 5234d45d9634003f6654f6ac68efc8424f088ccc30bb48a4baeb5ca64b577778ebedef4b56a6fad6d4d5f67a6f9a0437cbac307982621c1c3a27c173994bb2aa
7
+ data.tar.gz: d85765dca0dadf9edcebd5c977578d714acc6f99253c974e60820f4f3251c9ac87b8a770e7e81f5e0a42478a4004f170985394434ef1868a34757383ab54e7d2
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/godaddy23.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  # file: godaddy23.rb
4
4
 
5
5
  # see https://developer.godaddy.com/doc/endpoint/domains#/
6
+ # to view or create new API keys, see https://developer.godaddy.com/keys
6
7
 
7
8
  # For the OTE environment, use https://api.ote-godaddy.com
8
9
  # For the production environment, use https://api.godaddy.com
@@ -36,6 +37,34 @@ module GoDaddy23
36
37
  def details(domain)
37
38
  submit(domain)
38
39
  end
40
+
41
+ # Retrieve DNS Records for the specified Domain, optionally with the
42
+ # specified Type and/or Name
43
+ #
44
+ # type: e.g. A
45
+ # name: e.g. www
46
+ #
47
+ # curl -X 'GET' \
48
+ # 'https://api.godaddy.com/v1/domains/[MYDOMAIN]' \
49
+ # -H 'accept: application/json' \
50
+ # -H 'Authorization: sso-key [APIKEY]:[SECRET]
51
+ #
52
+ def list_records(domain, type: nil, name: nil)
53
+
54
+ uri = domain
55
+ uri += '/records'
56
+ uri += '/' + type if type
57
+
58
+ if name then
59
+ uri += '/A' if type.nil?
60
+ uri += '/' + name
61
+ end
62
+
63
+ submit(uri)
64
+
65
+ end
66
+
67
+ private
39
68
 
40
69
  def submit(s)
41
70
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: godaddy23
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
  - James Robertson
metadata.gz.sig CHANGED
Binary file