namecheap-client 0.1.1 → 0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/namecheap-client.rb +11 -4
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03c4ea68d701b6b743bf6289f826fae4e7ac8af5c1dfe65aa1ba0f4734851d8b
4
- data.tar.gz: e005d6a732e26397d16d663e94cff09915527a9d00308d2b2b44e58a94f60da5
3
+ metadata.gz: 82fd94811ffc532aac0b2e9fbdf08b96660993f4196486aaea959eafea04abc8
4
+ data.tar.gz: f1b24f4561d2206878ddff49daf9cb76f166d32c21e058220fa391dfc9b96b4a
5
5
  SHA512:
6
- metadata.gz: 770a4fbd5c5029087822c8f71d8799a8986989a0daacc9be5c33d8b39021744b2ab1f8e5ae93763d05c4f16d9a35def47b0ac1140d58b0f818280c371f0cbd7e
7
- data.tar.gz: 35d06f859aced4784b136b6a524c46e60afa20387c9c26f86bed0f05f5bdcbaa7f9cb3c85152bb7b1ea285ee45edff321d5f48d7e5b453fe04cb90e1b0bfb567
6
+ metadata.gz: 5709e2b3b40e39aa7ab324246e6628e633034d6febcb76ca86913e2e598eb199dc24d82d9abbc9a2cb4f1084fa06f86f9e96be36c1da19347d6c3e31c5e9ec9f
7
+ data.tar.gz: 5c2266df31eb45f91ead7cd724b84a2f73dffef4aeaaf162e3813363768151a9ab6e34b38d63257065a2739691254d0d03ac54f1c88acb9b275227a3d7612841
@@ -134,17 +134,24 @@ class NamecheapClient
134
134
  end
135
135
 
136
136
  def parse_dns_records(xml_response)
137
+ namespaces = { 'nc' => 'http://api.namecheap.com/xml.response' }
137
138
  records = []
138
- xml_response.xpath('//DomainDNSGetHostsResult/host').each do |host_node|
139
+ xml_response.xpath('//nc:DomainDNSGetHostsResult/nc:host', namespaces).each do |host_node|
139
140
  records << {
140
- 'Type' => host_node['Type'],
141
+ 'HostId' => host_node['HostId'],
141
142
  'Name' => host_node['Name'],
143
+ 'Type' => host_node['Type'],
142
144
  'Address' => host_node['Address'],
143
- 'TTL' => host_node['TTL']
145
+ 'MXPref' => host_node['MXPref'],
146
+ 'TTL' => host_node['TTL'],
147
+ 'AssociatedAppTitle' => host_node['AssociatedAppTitle'],
148
+ 'FriendlyName' => host_node['FriendlyName'],
149
+ 'IsActive' => host_node['IsActive'],
150
+ 'IsDDNSEnabled' => host_node['IsDDNSEnabled']
144
151
  }
145
152
  end
146
153
  records
147
- end
154
+ end
148
155
 
149
156
  def parse_errors(xml_response)
150
157
  errors = xml_response.xpath('//Errors/Error').map(&:text)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: namecheap-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-23 00:00:00.000000000 Z
11
+ date: 2024-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.13.10
47
+ version: 1.13.10
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.13.10
54
+ version: 1.13.10
55
55
  description: A simple Ruby client library for interacting with the [Namecheap API](https://www.namecheap.com/support/api/intro/),
56
56
  allowing you to manage your domains programmatically.
57
57
  email: leandro@massprospecting.com