namecheap-client 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/namecheap-client.rb +11 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03c4ea68d701b6b743bf6289f826fae4e7ac8af5c1dfe65aa1ba0f4734851d8b
4
- data.tar.gz: e005d6a732e26397d16d663e94cff09915527a9d00308d2b2b44e58a94f60da5
3
+ metadata.gz: f1bcf23bd469fa4342bb5b6b2f95b55c159ae97f27bb2be711868f79964a5429
4
+ data.tar.gz: 7a94aeb933aca1d619a87835ab74837015bdcb729c7a10403abdec24f3d0e1b2
5
5
  SHA512:
6
- metadata.gz: 770a4fbd5c5029087822c8f71d8799a8986989a0daacc9be5c33d8b39021744b2ab1f8e5ae93763d05c4f16d9a35def47b0ac1140d58b0f818280c371f0cbd7e
7
- data.tar.gz: 35d06f859aced4784b136b6a524c46e60afa20387c9c26f86bed0f05f5bdcbaa7f9cb3c85152bb7b1ea285ee45edff321d5f48d7e5b453fe04cb90e1b0bfb567
6
+ metadata.gz: c3c37fd4ebac4830b7e9d0bd0ffdaef2fba725b363de2ee51d0684febf01887ece815c0b8f7333a5241682f374aa5248b72efc2efc181c39b72da444931c7711
7
+ data.tar.gz: 4d85b6ed4ba2a748813b6977e14675ec88c5f6f5fe5bafe4c83bcfea67632f25fe3d894fd52e0fbb1bdad39a68921a74afc252adfc3283046f8013194f6ecfcd
@@ -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,7 +1,7 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi