whoisxmlapi2 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile.lock +25 -25
- data/README.md +25 -4
- data/lib/whoisxmlapi2/assets/api-response-cnncom +117 -0
- data/lib/whoisxmlapi2/assets/api-response-googlecom +101 -0
- data/lib/whoisxmlapi2/assets/api-response-stratecherycom +119 -0
- data/lib/whoisxmlapi2/configuration.rb +3 -2
- data/lib/whoisxmlapi2/request.rb +12 -0
- data/lib/whoisxmlapi2/version.rb +1 -1
- data/whoisxmlapi2.gemspec +1 -1
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe3742849c111594262b4bd25f44f4cc6327bf3475977efe91e30aed3b791548
|
4
|
+
data.tar.gz: a1e0418fc2d0383d5f7aaba0384ff23c7909cc6abd130c858c244346dcb0a16e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10c8922787de04a51a6fd405ed1875a77757ef9fb741eeb80b5b6ffe080a803d6e940a8d6510e02275add10531514a88c10fee4d3ac45e21b3842fc9a229f13f
|
7
|
+
data.tar.gz: aefce1771e65c893ec467de6bee69df757e7727af9c0bac856fa4efc80da469227cd5401d9b45b019c90acaa4031278563fa5c77d9232ec91d3859dd5fa8f4a8
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
55
55
|
## Enforcement
|
56
56
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at
|
58
|
+
reported by contacting the project team at scnissen@gmail.com. All
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
data/Gemfile.lock
CHANGED
@@ -1,53 +1,53 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
whoisxmlapi2 (0.
|
4
|
+
whoisxmlapi2 (0.2.0)
|
5
5
|
json (>= 2.0)
|
6
6
|
openssl (>= 2.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.
|
12
|
-
public_suffix (>= 2.0.2, <
|
11
|
+
addressable (2.7.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
13
13
|
crack (0.4.3)
|
14
14
|
safe_yaml (~> 1.0.0)
|
15
15
|
diff-lcs (1.3)
|
16
|
-
hashdiff (0.
|
17
|
-
json (2.
|
18
|
-
openssl (2.
|
19
|
-
public_suffix (
|
20
|
-
rake (
|
21
|
-
rspec (3.
|
22
|
-
rspec-core (~> 3.
|
23
|
-
rspec-expectations (~> 3.
|
24
|
-
rspec-mocks (~> 3.
|
25
|
-
rspec-core (3.
|
26
|
-
rspec-support (~> 3.
|
27
|
-
rspec-expectations (3.
|
16
|
+
hashdiff (1.0.1)
|
17
|
+
json (2.3.0)
|
18
|
+
openssl (2.2.0)
|
19
|
+
public_suffix (4.0.5)
|
20
|
+
rake (13.0.1)
|
21
|
+
rspec (3.9.0)
|
22
|
+
rspec-core (~> 3.9.0)
|
23
|
+
rspec-expectations (~> 3.9.0)
|
24
|
+
rspec-mocks (~> 3.9.0)
|
25
|
+
rspec-core (3.9.2)
|
26
|
+
rspec-support (~> 3.9.3)
|
27
|
+
rspec-expectations (3.9.2)
|
28
28
|
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
-
rspec-support (~> 3.
|
30
|
-
rspec-mocks (3.
|
29
|
+
rspec-support (~> 3.9.0)
|
30
|
+
rspec-mocks (3.9.1)
|
31
31
|
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
-
rspec-support (~> 3.
|
33
|
-
rspec-support (3.
|
34
|
-
safe_yaml (1.0.
|
35
|
-
vcr (
|
36
|
-
webmock (3.3
|
32
|
+
rspec-support (~> 3.9.0)
|
33
|
+
rspec-support (3.9.3)
|
34
|
+
safe_yaml (1.0.5)
|
35
|
+
vcr (6.0.0)
|
36
|
+
webmock (3.8.3)
|
37
37
|
addressable (>= 2.3.6)
|
38
38
|
crack (>= 0.3.2)
|
39
|
-
hashdiff
|
39
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
40
40
|
|
41
41
|
PLATFORMS
|
42
42
|
ruby
|
43
43
|
|
44
44
|
DEPENDENCIES
|
45
45
|
bundler (~> 1.16)
|
46
|
-
rake (
|
46
|
+
rake (>= 12.3.3)
|
47
47
|
rspec (~> 3.0)
|
48
48
|
vcr (>= 3.0)
|
49
49
|
webmock (>= 3.0)
|
50
50
|
whoisxmlapi2!
|
51
51
|
|
52
52
|
BUNDLED WITH
|
53
|
-
1.
|
53
|
+
1.17.3
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ Provide your credentials
|
|
22
22
|
|
23
23
|
```ruby
|
24
24
|
WhoisXMLAPI2.configure do |config|
|
25
|
-
config.api_key
|
25
|
+
config.api_key = "your-api-key"
|
26
26
|
end
|
27
27
|
```
|
28
28
|
|
@@ -33,8 +33,7 @@ WhoisXMLAPI2::Request.go("cnn.com")
|
|
33
33
|
# => {"WhoisRecord"=>{"createdDate"=>"1993-09-22T04:00:00Z", ...
|
34
34
|
```
|
35
35
|
|
36
|
-
The output is
|
37
|
-
|
36
|
+
The output is the parsed object from the the API's JSON response.
|
38
37
|
|
39
38
|
### API Version 1.0
|
40
39
|
|
@@ -55,7 +54,29 @@ WhoisXMLAPI2::Request::V1.go("cnn.com")
|
|
55
54
|
# => {"WhoisRecord"=>{"createdDate"=>"1993-09-22T04:00:00Z", ...
|
56
55
|
```
|
57
56
|
|
58
|
-
The output is
|
57
|
+
The output is the parsed object from the the API's JSON response.
|
58
|
+
|
59
|
+
### Testing your application
|
60
|
+
The gem has an additional feature:
|
61
|
+
mocking responses for testing using this gem.
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
WhoisXMLAPI2.configure do |config|
|
65
|
+
config.mock_out_for_testing = true
|
66
|
+
end
|
67
|
+
```
|
68
|
+
|
69
|
+
If `mock_out_for_testing` is set to evaluate as truthy, the app will
|
70
|
+
return one of the values in the gem's `assets` directory, chosen
|
71
|
+
at random from the files matching `/api-response-*/`,
|
72
|
+
instead of making a request to the API.
|
73
|
+
|
74
|
+
#### WARNING
|
75
|
+
|
76
|
+
This value will persist in your process!
|
77
|
+
Re-set the value to false if you intend to
|
78
|
+
address the API within the same context
|
79
|
+
as you are testing it.
|
59
80
|
|
60
81
|
## Development
|
61
82
|
|
@@ -0,0 +1,117 @@
|
|
1
|
+
{"WhoisRecord": {
|
2
|
+
"createdDate": "1993-09-22T04:00:00Z",
|
3
|
+
"updatedDate": "2017-02-15T16:01:26Z",
|
4
|
+
"expiresDate": "2018-09-21T04:00:00Z",
|
5
|
+
"registrant": {
|
6
|
+
"name": "Domain Name Manager",
|
7
|
+
"organization": "Turner Broadcasting System, Inc.",
|
8
|
+
"street1": "One CNN Center",
|
9
|
+
"city": "Atlanta",
|
10
|
+
"state": "GA",
|
11
|
+
"postalCode": "30303",
|
12
|
+
"country": "UNITED STATES",
|
13
|
+
"email": "tmgroup@turner.com",
|
14
|
+
"telephone": "14048275000",
|
15
|
+
"fax": "14048271995",
|
16
|
+
"rawText": "Registrant Name: Domain Name Manager\u000aRegistrant Organization: Turner Broadcasting System, Inc.\u000aRegistrant Street: One CNN Center\u000aRegistrant City: Atlanta\u000aRegistrant State/Province: GA\u000aRegistrant Postal Code: 30303\u000aRegistrant Country: US\u000aRegistrant Phone: +1.4048275000\u000aRegistrant Fax: +1.4048271995\u000aRegistrant Email: tmgroup@turner.com"
|
17
|
+
},
|
18
|
+
"administrativeContact": {
|
19
|
+
"name": "Domain Name Manager",
|
20
|
+
"organization": "Turner Broadcasting System, Inc.",
|
21
|
+
"street1": "One CNN Center",
|
22
|
+
"city": "Atlanta",
|
23
|
+
"state": "GA",
|
24
|
+
"postalCode": "30303",
|
25
|
+
"country": "UNITED STATES",
|
26
|
+
"email": "tmgroup@turner.com",
|
27
|
+
"telephone": "14048275000",
|
28
|
+
"fax": "14048271995",
|
29
|
+
"rawText": "Admin Name: Domain Name Manager\u000aAdmin Organization: Turner Broadcasting System, Inc.\u000aAdmin Street: One CNN Center\u000aAdmin City: Atlanta\u000aAdmin State/Province: GA\u000aAdmin Postal Code: 30303\u000aAdmin Country: US\u000aAdmin Phone: +1.4048275000\u000aAdmin Fax: +1.4048271995\u000aAdmin Email: tmgroup@turner.com"
|
30
|
+
},
|
31
|
+
"technicalContact": {
|
32
|
+
"name": "TBS Server Operations",
|
33
|
+
"organization": "Turner Broadcasting System, Inc.",
|
34
|
+
"street1": "One CNN Center",
|
35
|
+
"city": "Atlanta",
|
36
|
+
"state": "GA",
|
37
|
+
"postalCode": "30303",
|
38
|
+
"country": "UNITED STATES",
|
39
|
+
"email": "hostmaster@turner.com",
|
40
|
+
"telephone": "14048275000",
|
41
|
+
"fax": "14048271593",
|
42
|
+
"rawText": "Tech Name: TBS Server Operations\u000aTech Organization: Turner Broadcasting System, Inc.\u000aTech Street: One CNN Center\u000aTech City: Atlanta\u000aTech State/Province: GA\u000aTech Postal Code: 30303\u000aTech Country: US\u000aTech Phone: +1.4048275000\u000aTech Fax: +1.4048271593\u000aTech Email: hostmaster@turner.com"
|
43
|
+
},
|
44
|
+
"domainName": "cnn.com",
|
45
|
+
"nameServers": {
|
46
|
+
"rawText": "ns-47.awsdns-05.com\u000ans-576.awsdns-08.net\u000ans-1086.awsdns-07.org\u000ans-1630.awsdns-11.co.uk\u000a",
|
47
|
+
"hostNames": [
|
48
|
+
"ns-47.awsdns-05.com",
|
49
|
+
"ns-576.awsdns-08.net",
|
50
|
+
"ns-1086.awsdns-07.org",
|
51
|
+
"ns-1630.awsdns-11.co.uk"
|
52
|
+
],
|
53
|
+
"ips": [
|
54
|
+
]
|
55
|
+
},
|
56
|
+
"status": "clientTransferProhibited serverDeleteProhibited serverTransferProhibited serverUpdateProhibited",
|
57
|
+
"rawText": "Domain Name: cnn.com\u000aRegistry Domain ID: 3269879_DOMAIN_COM-VRSN\u000aRegistrar WHOIS Server: whois.corporatedomains.com\u000aRegistrar URL: www.cscprotectsbrands.com\u000aUpdated Date: 2017-02-15T16:01:26Z\u000aCreation Date: 1993-09-22T04:00:00Z\u000aRegistrar Registration Expiration Date: 2018-09-21T04:00:00Z\u000aRegistrar: CSC CORPORATE DOMAINS, INC.\u000aRegistrar IANA ID: 299\u000aRegistrar Abuse Contact Email: domainabuse@cscglobal.com\u000aRegistrar Abuse Contact Phone: +1.8887802723\u000aDomain Status: clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited\u000aDomain Status: serverDeleteProhibited http://www.icann.org/epp#serverDeleteProhibited\u000aDomain Status: serverTransferProhibited http://www.icann.org/epp#serverTransferProhibited\u000aDomain Status: serverUpdateProhibited http://www.icann.org/epp#serverUpdateProhibited\u000aRegistry Registrant ID: \u000aRegistrant Name: Domain Name Manager\u000aRegistrant Organization: Turner Broadcasting System, Inc.\u000aRegistrant Street: One CNN Center\u000aRegistrant City: Atlanta\u000aRegistrant State/Province: GA\u000aRegistrant Postal Code: 30303\u000aRegistrant Country: US\u000aRegistrant Phone: +1.4048275000\u000aRegistrant Phone Ext: \u000aRegistrant Fax: +1.4048271995\u000aRegistrant Fax Ext: \u000aRegistrant Email: tmgroup@turner.com\u000aRegistry Admin ID: \u000aAdmin Name: Domain Name Manager\u000aAdmin Organization: Turner Broadcasting System, Inc.\u000aAdmin Street: One CNN Center\u000aAdmin City: Atlanta\u000aAdmin State/Province: GA\u000aAdmin Postal Code: 30303\u000aAdmin Country: US\u000aAdmin Phone: +1.4048275000\u000aAdmin Phone Ext: \u000aAdmin Fax: +1.4048271995\u000aAdmin Fax Ext: \u000aAdmin Email: tmgroup@turner.com\u000aRegistry Tech ID: \u000aTech Name: TBS Server Operations\u000aTech Organization: Turner Broadcasting System, Inc.\u000aTech Street: One CNN Center\u000aTech City: Atlanta\u000aTech State/Province: GA\u000aTech Postal Code: 30303\u000aTech Country: US\u000aTech Phone: +1.4048275000\u000aTech Phone Ext: \u000aTech Fax: +1.4048271593\u000aTech Fax Ext: \u000aTech Email: hostmaster@turner.com\u000aName Server: ns-47.awsdns-05.com\u000aName Server: ns-576.awsdns-08.net\u000aName Server: ns-1086.awsdns-07.org\u000aName Server: ns-1630.awsdns-11.co.uk\u000aDNSSEC: unsigned\u000aURL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/\u000a>>> Last update of WHOIS database: 2017-02-15T16:01:26Z <<<\u000a\u000aFor more information on Whois status codes, please visit https://icann.org/epp\u000a\u000aCorporation Service Company(c) (CSC) The Trusted Partner of More than 50% of the 100 Best Global Brands.\u000a\u000aContact us to learn more about our enterprise solutions for Global Domain Name Registration and Management, Trademark Research and Watching, Brand, Logo and Auction Monitoring, as well SSL Certificate Services and DNS Hosting.\u000a\u000aNOTICE: You are not authorized to access or query our WHOIS database through the use of high-volume, automated, electronic processes or for the purpose or purposes of using the data in any manner that violates these terms of use. The Data in the CSC WHOIS database is provided by CSC for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. CSC does not guarantee its accuracy. By submitting a WHOIS query, you agree to abide by the following terms of use: you agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via direct mail, e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to CSC (or its computer systems). CSC reserves the right to terminate your access to the WHOIS database in its sole discretion for any violations by you of these terms of use. CSC reserves the right to modify these terms at any time.\u000a\u000aRegister your domain name at http://www.cscglobal.com",
|
58
|
+
"parseCode": 3579,
|
59
|
+
"header": "",
|
60
|
+
"strippedText": "Domain Name: cnn.com\u000aRegistrar WHOIS Server: whois.corporatedomains.com\u000aRegistrar URL: www.cscprotectsbrands.com\u000aUpdated Date: 2017-02-15T16:01:26Z\u000aCreation Date: 1993-09-22T04:00:00Z\u000aRegistrar Registration Expiration Date: 2018-09-21T04:00:00Z\u000aRegistrar: CSC CORPORATE DOMAINS, INC.\u000aRegistrar IANA ID: 299\u000aRegistrar Abuse Contact Email: domainabuse@cscglobal.com\u000aRegistrar Abuse Contact Phone: +1.8887802723\u000aDomain Status: clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited\u000aDomain Status: serverDeleteProhibited http://www.icann.org/epp#serverDeleteProhibited\u000aDomain Status: serverTransferProhibited http://www.icann.org/epp#serverTransferProhibited\u000aDomain Status: serverUpdateProhibited http://www.icann.org/epp#serverUpdateProhibited\u000aRegistrant Name: Domain Name Manager\u000aRegistrant Organization: Turner Broadcasting System, Inc.\u000aRegistrant Street: One CNN Center\u000aRegistrant City: Atlanta\u000aRegistrant State/Province: GA\u000aRegistrant Postal Code: 30303\u000aRegistrant Country: US\u000aRegistrant Phone: +1.4048275000\u000aRegistrant Fax: +1.4048271995\u000aRegistrant Email: tmgroup@turner.com\u000aAdmin Name: Domain Name Manager\u000aAdmin Organization: Turner Broadcasting System, Inc.\u000aAdmin Street: One CNN Center\u000aAdmin City: Atlanta\u000aAdmin State/Province: GA\u000aAdmin Postal Code: 30303\u000aAdmin Country: US\u000aAdmin Phone: +1.4048275000\u000aAdmin Fax: +1.4048271995\u000aAdmin Email: tmgroup@turner.com\u000aTech Name: TBS Server Operations\u000aTech Organization: Turner Broadcasting System, Inc.\u000aTech Street: One CNN Center\u000aTech City: Atlanta\u000aTech State/Province: GA\u000aTech Postal Code: 30303\u000aTech Country: US\u000aTech Phone: +1.4048275000\u000aTech Fax: +1.4048271593\u000aTech Email: hostmaster@turner.com\u000aName Server: ns-47.awsdns-05.com\u000aName Server: ns-576.awsdns-08.net\u000aName Server: ns-1086.awsdns-07.org\u000aName Server: ns-1630.awsdns-11.co.uk\u000a",
|
61
|
+
"footer": "\u000a",
|
62
|
+
"audit": {
|
63
|
+
"createdDate": "2018-02-01 03:20:33.000 UTC",
|
64
|
+
"updatedDate": "2018-02-01 03:20:33.000 UTC"
|
65
|
+
},
|
66
|
+
"customField1Name": "RegistrarContactEmail",
|
67
|
+
"customField1Value": "domainabuse@cscglobal.com",
|
68
|
+
"registrarName": "CSC CORPORATE DOMAINS, INC.",
|
69
|
+
"registrarIANAID": "299",
|
70
|
+
"whoisServer": "whois.corporatedomains.com",
|
71
|
+
"customField2Name": "RegistrarContactPhone",
|
72
|
+
"customField3Name": "RegistrarURL",
|
73
|
+
"customField2Value": "+1.8887802723",
|
74
|
+
"customField3Value": "www.cscprotectsbrands.com",
|
75
|
+
"registryData": {
|
76
|
+
"createdDate": "1993-09-22T04:00:00Z",
|
77
|
+
"updatedDate": "2017-02-15T17:31:58Z",
|
78
|
+
"expiresDate": "2018-09-21T04:00:00Z",
|
79
|
+
"domainName": "cnn.com",
|
80
|
+
"nameServers": {
|
81
|
+
"rawText": "NS-1086.AWSDNS-07.ORG\u000aNS-1630.AWSDNS-11.CO.UK\u000aNS-47.AWSDNS-05.COM\u000aNS-576.AWSDNS-08.NET\u000a",
|
82
|
+
"hostNames": [
|
83
|
+
"NS-1086.AWSDNS-07.ORG",
|
84
|
+
"NS-1630.AWSDNS-11.CO.UK",
|
85
|
+
"NS-47.AWSDNS-05.COM",
|
86
|
+
"NS-576.AWSDNS-08.NET"
|
87
|
+
],
|
88
|
+
"ips": [
|
89
|
+
]
|
90
|
+
},
|
91
|
+
"status": "clientTransferProhibited serverDeleteProhibited serverTransferProhibited serverUpdateProhibited",
|
92
|
+
"rawText": "Domain Name: CNN.COM\u000a Registry Domain ID: 3269879_DOMAIN_COM-VRSN\u000a Registrar WHOIS Server: whois.corporatedomains.com\u000a Registrar URL: http://www.cscglobal.com/global/web/csc/digital-brand-services.html\u000a Updated Date: 2017-02-15T17:31:58Z\u000a Creation Date: 1993-09-22T04:00:00Z\u000a Registry Expiry Date: 2018-09-21T04:00:00Z\u000a Registrar: CSC Corporate Domains, Inc.\u000a Registrar IANA ID: 299\u000a Registrar Abuse Contact Email: domainabuse@cscglobal.com\u000a Registrar Abuse Contact Phone: 8887802723\u000a Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited\u000a Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited\u000a Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited\u000a Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited\u000a Name Server: NS-1086.AWSDNS-07.ORG\u000a Name Server: NS-1630.AWSDNS-11.CO.UK\u000a Name Server: NS-47.AWSDNS-05.COM\u000a Name Server: NS-576.AWSDNS-08.NET\u000a DNSSEC: unsigned\u000a URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/\u000a>>> Last update of whois database: 2018-02-01T03:20:21Z <<<\u000a\u000aFor more information on Whois status codes, please visit https://icann.org/epp\u000a\u000aNOTICE: The expiration date displayed in this record is the date the\u000aregistrar's sponsorship of the domain name registration in the registry is\u000acurrently set to expire. This date does not necessarily reflect the expiration\u000adate of the domain name registrant's agreement with the sponsoring\u000aregistrar. Users may consult the sponsoring registrar's Whois database to\u000aview the registrar's reported date of expiration for this registration.\u000a\u000aTERMS OF USE: You are not authorized to access or query our Whois\u000adatabase through the use of electronic processes that are high-volume and\u000aautomated except as reasonably necessary to register domain names or\u000amodify existing registrations; the Data in VeriSign Global Registry\u000aServices' (\"VeriSign\") Whois database is provided by VeriSign for\u000ainformation purposes only, and to assist persons in obtaining information\u000aabout or related to a domain name registration record. VeriSign does not\u000aguarantee its accuracy. By submitting a Whois query, you agree to abide\u000aby the following terms of use: You agree that you may use this Data only\u000afor lawful purposes and that under no circumstances will you use this Data\u000ato: (1) allow, enable, or otherwise support the transmission of mass\u000aunsolicited, commercial advertising or solicitations via e-mail, telephone,\u000aor facsimile; or (2) enable high volume, automated, electronic processes\u000athat apply to VeriSign (or its computer systems). The compilation,\u000arepackaging, dissemination or other use of this Data is expressly\u000aprohibited without the prior written consent of VeriSign. You agree not to\u000ause electronic processes that are automated and high-volume to access or\u000aquery the Whois database except as reasonably necessary to register\u000adomain names or modify existing registrations. VeriSign reserves the right\u000ato restrict your access to the Whois database in its sole discretion to ensure\u000aoperational stability. VeriSign may restrict or terminate your access to the\u000aWhois database for failure to abide by these terms of use. VeriSign\u000areserves the right to modify these terms at any time.\u000a\u000aThe Registry database contains ONLY .COM, .NET, .EDU domains and\u000aRegistrars.",
|
93
|
+
"parseCode": 251,
|
94
|
+
"header": "",
|
95
|
+
"strippedText": "Domain Name: CNN.COM\u000aRegistry Domain ID: 3269879_DOMAIN_COM-VRSN\u000aRegistrar WHOIS Server: whois.corporatedomains.com\u000aRegistrar URL: http://www.cscglobal.com/global/web/csc/digital-brand-services.html\u000aUpdated Date: 2017-02-15T17:31:58Z\u000aCreation Date: 1993-09-22T04:00:00Z\u000aRegistry Expiry Date: 2018-09-21T04:00:00Z\u000aRegistrar: CSC Corporate Domains, Inc.\u000aRegistrar IANA ID: 299\u000aRegistrar Abuse Contact Email: domainabuse@cscglobal.com\u000aRegistrar Abuse Contact Phone: 8887802723\u000aDomain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited\u000aDomain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited\u000aDomain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited\u000aDomain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited\u000aName Server: NS-1086.AWSDNS-07.ORG\u000aName Server: NS-1630.AWSDNS-11.CO.UK\u000aName Server: NS-47.AWSDNS-05.COM\u000aName Server: NS-576.AWSDNS-08.NET\u000aDNSSEC: unsigned\u000aURL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/\u000a>>> Last update of whois database: 2018-02-01T03:20:21Z <<<\u000aFor more information on Whois status codes, please visit https://icann.org/epp\u000aNOTICE: The expiration date displayed in this record is the date the\u000aregistrar's sponsorship of the domain name registration in the registry is\u000acurrently set to expire. This date does not necessarily reflect the expiration\u000adate of the domain name registrant's agreement with the sponsoring\u000aregistrar. Users may consult the sponsoring registrar's Whois database to\u000aview the registrar's reported date of expiration for this registration.\u000aTERMS OF USE: You are not authorized to access or query our Whois\u000adatabase through the use of electronic processes that are high-volume and\u000aautomated except as reasonably necessary to register domain names or\u000amodify existing registrations; the Data in VeriSign Global Registry\u000aServices' (\"VeriSign\") Whois database is provided by VeriSign for\u000ainformation purposes only, and to assist persons in obtaining information\u000aabout or related to a domain name registration record. VeriSign does not\u000aguarantee its accuracy. By submitting a Whois query, you agree to abide\u000aby the following terms of use: You agree that you may use this Data only\u000afor lawful purposes and that under no circumstances will you use this Data\u000ato: (1) allow, enable, or otherwise support the transmission of mass\u000aunsolicited, commercial advertising or solicitations via e-mail, telephone,\u000aor facsimile; or (2) enable high volume, automated, electronic processes\u000athat apply to VeriSign (or its computer systems). The compilation,\u000arepackaging, dissemination or other use of this Data is expressly\u000aprohibited without the prior written consent of VeriSign. You agree not to\u000ause electronic processes that are automated and high-volume to access or\u000aquery the Whois database except as reasonably necessary to register\u000adomain names or modify existing registrations. VeriSign reserves the right\u000ato restrict your access to the Whois database in its sole discretion to ensure\u000aoperational stability. VeriSign may restrict or terminate your access to the\u000aWhois database for failure to abide by these terms of use. VeriSign\u000areserves the right to modify these terms at any time.\u000aThe Registry database contains ONLY .COM, .NET, .EDU domains and\u000aRegistrars.\u000a",
|
96
|
+
"footer": "\u000a",
|
97
|
+
"audit": {
|
98
|
+
"createdDate": "2018-02-01 03:20:33.000 UTC",
|
99
|
+
"updatedDate": "2018-02-01 03:20:33.000 UTC"
|
100
|
+
},
|
101
|
+
"customField1Name": "RegistrarContactEmail",
|
102
|
+
"customField1Value": "domainabuse@cscglobal.com",
|
103
|
+
"registrarName": "CSC Corporate Domains, Inc.",
|
104
|
+
"registrarIANAID": "299",
|
105
|
+
"createdDateNormalized": "1993-09-22 04:00:00 UTC",
|
106
|
+
"updatedDateNormalized": "2017-02-15 17:31:58 UTC",
|
107
|
+
"expiresDateNormalized": "2018-09-21 04:00:00 UTC",
|
108
|
+
"customField2Name": "RegistrarContactPhone",
|
109
|
+
"customField3Name": "RegistrarURL",
|
110
|
+
"customField2Value": "8887802723",
|
111
|
+
"customField3Value": "http://www.cscglobal.com/global/web/csc/digital-brand-services.html",
|
112
|
+
"whoisServer": "whois.corporatedomains.com"
|
113
|
+
},
|
114
|
+
"contactEmail": "tmgroup@turner.com",
|
115
|
+
"domainNameExt": ".com",
|
116
|
+
"estimatedDomainAge": 8898
|
117
|
+
}}
|
@@ -0,0 +1,101 @@
|
|
1
|
+
{
|
2
|
+
"createdDate": "1997-09-15T00:00:00-0700",
|
3
|
+
"updatedDate": "2019-09-09T08:39:04-0700",
|
4
|
+
"expiresDate": "2028-09-13T00:00:00-0700",
|
5
|
+
"registrant": {
|
6
|
+
"organization": "Google LLC",
|
7
|
+
"state": "CA",
|
8
|
+
"country": "UNITED STATES",
|
9
|
+
"countryCode": "US",
|
10
|
+
"rawText": "(omitted in the demo)"
|
11
|
+
},
|
12
|
+
"administrativeContact": {
|
13
|
+
"organization": "Google LLC",
|
14
|
+
"state": "CA",
|
15
|
+
"country": "UNITED STATES",
|
16
|
+
"countryCode": "US",
|
17
|
+
"rawText": "(omitted in the demo)"
|
18
|
+
},
|
19
|
+
"technicalContact": {
|
20
|
+
"organization": "Google LLC",
|
21
|
+
"state": "CA",
|
22
|
+
"country": "UNITED STATES",
|
23
|
+
"countryCode": "US",
|
24
|
+
"rawText": "(omitted in the demo)"
|
25
|
+
},
|
26
|
+
"domainName": "google.com",
|
27
|
+
"nameServers": {
|
28
|
+
"rawText": "(omitted in the demo)",
|
29
|
+
"hostNames": [
|
30
|
+
"ns1.google.com",
|
31
|
+
"ns4.google.com",
|
32
|
+
"ns3.google.com",
|
33
|
+
"ns2.google.com"
|
34
|
+
],
|
35
|
+
"ips": []
|
36
|
+
},
|
37
|
+
"status": "(omitted in the demo)",
|
38
|
+
"rawText": "(omitted in the demo)",
|
39
|
+
"parseCode": 3579,
|
40
|
+
"header": "(omitted in the demo)",
|
41
|
+
"strippedText": "(omitted in the demo)",
|
42
|
+
"footer": "(omitted in the demo)",
|
43
|
+
"audit": {
|
44
|
+
"createdDate": "2020-06-22 01:01:03.000 UTC",
|
45
|
+
"updatedDate": "2020-06-22 01:01:03.000 UTC"
|
46
|
+
},
|
47
|
+
"customField1Name": "RegistrarContactEmail",
|
48
|
+
"customField1Value": "abusecomplaints@markmonitor.com",
|
49
|
+
"registrarName": "MarkMonitor, Inc.",
|
50
|
+
"registrarIANAID": "292",
|
51
|
+
"whoisServer": "whois.markmonitor.com",
|
52
|
+
"createdDateNormalized": "1997-09-15 07:00:00 UTC",
|
53
|
+
"updatedDateNormalized": "2019-09-09 15:39:04 UTC",
|
54
|
+
"expiresDateNormalized": "2028-09-13 07:00:00 UTC",
|
55
|
+
"customField2Name": "RegistrarContactPhone",
|
56
|
+
"customField3Name": "RegistrarURL",
|
57
|
+
"customField2Value": "+1.2083895770",
|
58
|
+
"customField3Value": "http://www.markmonitor.com",
|
59
|
+
"registryData": {
|
60
|
+
"createdDate": "1997-09-15T04:00:00Z",
|
61
|
+
"updatedDate": "2019-09-09T15:39:04Z",
|
62
|
+
"expiresDate": "2028-09-14T04:00:00Z",
|
63
|
+
"domainName": "google.com",
|
64
|
+
"nameServers": {
|
65
|
+
"rawText": "(omitted in the demo)",
|
66
|
+
"hostNames": [
|
67
|
+
"NS1.GOOGLE.COM",
|
68
|
+
"NS2.GOOGLE.COM",
|
69
|
+
"NS3.GOOGLE.COM",
|
70
|
+
"NS4.GOOGLE.COM"
|
71
|
+
],
|
72
|
+
"ips": []
|
73
|
+
},
|
74
|
+
"status": "(omitted in the demo)",
|
75
|
+
"rawText": "(omitted in the demo)",
|
76
|
+
"parseCode": 251,
|
77
|
+
"header": "(omitted in the demo)",
|
78
|
+
"strippedText": "(omitted in the demo)",
|
79
|
+
"footer": "(omitted in the demo)",
|
80
|
+
"audit": {
|
81
|
+
"createdDate": "2020-06-22 01:01:02.000 UTC",
|
82
|
+
"updatedDate": "2020-06-22 01:01:02.000 UTC"
|
83
|
+
},
|
84
|
+
"customField1Name": "RegistrarContactEmail",
|
85
|
+
"customField1Value": "abusecomplaints@markmonitor.com",
|
86
|
+
"registrarName": "MarkMonitor Inc.",
|
87
|
+
"registrarIANAID": "292",
|
88
|
+
"createdDateNormalized": "1997-09-15 04:00:00 UTC",
|
89
|
+
"updatedDateNormalized": "2019-09-09 15:39:04 UTC",
|
90
|
+
"expiresDateNormalized": "2028-09-14 04:00:00 UTC",
|
91
|
+
"customField2Name": "RegistrarContactPhone",
|
92
|
+
"customField3Name": "RegistrarURL",
|
93
|
+
"customField2Value": "+1.2083895740",
|
94
|
+
"customField3Value": "http://www.markmonitor.com",
|
95
|
+
"whoisServer": "whois.markmonitor.com"
|
96
|
+
},
|
97
|
+
"domainAvailability": "UNAVAILABLE",
|
98
|
+
"contactEmail": "abusecomplaints@markmonitor.com",
|
99
|
+
"domainNameExt": ".com",
|
100
|
+
"estimatedDomainAge": 8316
|
101
|
+
}
|
@@ -0,0 +1,119 @@
|
|
1
|
+
{
|
2
|
+
"createdDate": "2012-11-20T02:20:22Z",
|
3
|
+
"updatedDate": "2020-03-25T22:24:16Z",
|
4
|
+
"expiresDate": "2024-11-20T02:20:22Z",
|
5
|
+
"registrant": {
|
6
|
+
"name": "REDACTED FOR PRIVACY",
|
7
|
+
"organization": "Stratechery LLC",
|
8
|
+
"street1": "REDACTED FOR PRIVACY",
|
9
|
+
"city": "REDACTED FOR PRIVACY",
|
10
|
+
"state": "California",
|
11
|
+
"postalCode": "REDACTED FOR PRIVACY",
|
12
|
+
"country": "UNITED STATES",
|
13
|
+
"countryCode": "US",
|
14
|
+
"email": "14fa79e8769122bafe31e5f72235d28f-12757985@contact.gandi.net",
|
15
|
+
"telephone": "",
|
16
|
+
"fax": "",
|
17
|
+
"rawText": "(omitted in the demo)"
|
18
|
+
},
|
19
|
+
"administrativeContact": {
|
20
|
+
"name": "REDACTED FOR PRIVACY",
|
21
|
+
"street1": "63-65 boulevard Massena",
|
22
|
+
"city": "Paris",
|
23
|
+
"state": "Paris",
|
24
|
+
"postalCode": "75013",
|
25
|
+
"country": "FRANCE",
|
26
|
+
"countryCode": "FR",
|
27
|
+
"email": "a5dba9803249014fa1d9bc847008759c-1422560@contact.gandi.net",
|
28
|
+
"telephone": "33170377666",
|
29
|
+
"fax": "33143730576",
|
30
|
+
"rawText": "(omitted in the demo)"
|
31
|
+
},
|
32
|
+
"technicalContact": {
|
33
|
+
"name": "REDACTED FOR PRIVACY",
|
34
|
+
"street1": "63-65 boulevard Massena",
|
35
|
+
"city": "Paris",
|
36
|
+
"state": "Paris",
|
37
|
+
"postalCode": "75013",
|
38
|
+
"country": "FRANCE",
|
39
|
+
"countryCode": "FR",
|
40
|
+
"email": "a5dba9803249014fa1d9bc847008759c-1422560@contact.gandi.net",
|
41
|
+
"telephone": "33170377666",
|
42
|
+
"fax": "33143730576",
|
43
|
+
"rawText": "(omitted in the demo)"
|
44
|
+
},
|
45
|
+
"domainName": "stratechery.com",
|
46
|
+
"nameServers": {
|
47
|
+
"rawText": "(omitted in the demo)",
|
48
|
+
"hostNames": [
|
49
|
+
"A.DNS.GANDI.NET",
|
50
|
+
"B.DNS.GANDI.NET",
|
51
|
+
"C.DNS.GANDI.NET"
|
52
|
+
],
|
53
|
+
"ips": []
|
54
|
+
},
|
55
|
+
"status": "(omitted in the demo)",
|
56
|
+
"rawText": "(omitted in the demo)",
|
57
|
+
"parseCode": 3579,
|
58
|
+
"header": "(omitted in the demo)",
|
59
|
+
"strippedText": "(omitted in the demo)",
|
60
|
+
"footer": "(omitted in the demo)",
|
61
|
+
"audit": {
|
62
|
+
"createdDate": "2020-06-22 10:25:51.048 UTC",
|
63
|
+
"updatedDate": "2020-06-22 10:25:51.048 UTC"
|
64
|
+
},
|
65
|
+
"customField1Name": "RegistrarContactEmail",
|
66
|
+
"customField1Value": "abuse@support.gandi.net",
|
67
|
+
"registrarName": "GANDI SAS",
|
68
|
+
"registrarIANAID": "81",
|
69
|
+
"whoisServer": "whois.gandi.net",
|
70
|
+
"createdDateNormalized": "2012-11-20 02:20:22 UTC",
|
71
|
+
"updatedDateNormalized": "2020-03-25 22:24:16 UTC",
|
72
|
+
"expiresDateNormalized": "2024-11-20 02:20:22 UTC",
|
73
|
+
"customField2Name": "RegistrarContactPhone",
|
74
|
+
"customField3Name": "RegistrarURL",
|
75
|
+
"customField2Value": "+33.170377661",
|
76
|
+
"customField3Value": "http://www.gandi.net",
|
77
|
+
"dataError": "MASKED_WHOIS_DATA",
|
78
|
+
"registryData": {
|
79
|
+
"createdDate": "2012-11-20T02:20:22Z",
|
80
|
+
"updatedDate": "2019-09-13T02:46:27Z",
|
81
|
+
"expiresDate": "2024-11-20T02:20:22Z",
|
82
|
+
"domainName": "stratechery.com",
|
83
|
+
"nameServers": {
|
84
|
+
"rawText": "(omitted in the demo)",
|
85
|
+
"hostNames": [
|
86
|
+
"A.DNS.GANDI.NET",
|
87
|
+
"B.DNS.GANDI.NET",
|
88
|
+
"C.DNS.GANDI.NET"
|
89
|
+
],
|
90
|
+
"ips": []
|
91
|
+
},
|
92
|
+
"status": "(omitted in the demo)",
|
93
|
+
"rawText": "(omitted in the demo)",
|
94
|
+
"parseCode": 251,
|
95
|
+
"header": "(omitted in the demo)",
|
96
|
+
"strippedText": "(omitted in the demo)",
|
97
|
+
"footer": "(omitted in the demo)",
|
98
|
+
"audit": {
|
99
|
+
"createdDate": "2020-06-22 10:25:50.170 UTC",
|
100
|
+
"updatedDate": "2020-06-22 10:25:50.170 UTC"
|
101
|
+
},
|
102
|
+
"customField1Name": "RegistrarContactEmail",
|
103
|
+
"customField1Value": "abuse@support.gandi.net",
|
104
|
+
"registrarName": "Gandi SAS",
|
105
|
+
"registrarIANAID": "81",
|
106
|
+
"createdDateNormalized": "2012-11-20 02:20:22 UTC",
|
107
|
+
"updatedDateNormalized": "2019-09-13 02:46:27 UTC",
|
108
|
+
"expiresDateNormalized": "2024-11-20 02:20:22 UTC",
|
109
|
+
"customField2Name": "RegistrarContactPhone",
|
110
|
+
"customField3Name": "RegistrarURL",
|
111
|
+
"customField2Value": "+33.170377661",
|
112
|
+
"customField3Value": "http://www.gandi.net",
|
113
|
+
"whoisServer": "whois.gandi.net"
|
114
|
+
},
|
115
|
+
"domainAvailability": "UNAVAILABLE",
|
116
|
+
"contactEmail": "14fa79e8769122bafe31e5f72235d28f-12757985@contact.gandi.net",
|
117
|
+
"domainNameExt": ".com",
|
118
|
+
"estimatedDomainAge": 2771
|
119
|
+
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
module WhoisXMLAPI2
|
2
2
|
class Configuration
|
3
|
-
attr_accessor :username, :api_key, :secret, :url, :browser_key
|
3
|
+
attr_accessor :username, :api_key, :secret, :url, :browser_key,
|
4
|
+
:mock_out_for_testing
|
4
5
|
|
5
6
|
DEFAULT_SERVICE_ENDPOINT = "https://whoisxmlapi.com/whoisserver/WhoisService?".freeze
|
6
7
|
|
7
8
|
def initialize
|
8
|
-
@url
|
9
|
+
@url = DEFAULT_SERVICE_ENDPOINT
|
9
10
|
end
|
10
11
|
|
11
12
|
def self.set?
|
data/lib/whoisxmlapi2/request.rb
CHANGED
@@ -2,6 +2,8 @@ module WhoisXMLAPI2
|
|
2
2
|
class Request
|
3
3
|
class << self
|
4
4
|
def go(domain)
|
5
|
+
return fixture_value if config.mock_out_for_testing
|
6
|
+
|
5
7
|
JSON.parse(open(config.url + params(domain)).read)
|
6
8
|
end
|
7
9
|
|
@@ -15,11 +17,21 @@ module WhoisXMLAPI2
|
|
15
17
|
|
16
18
|
WhoisXMLAPI2.configuration
|
17
19
|
end
|
20
|
+
|
21
|
+
def fixture_value
|
22
|
+
directory = File.dirname(File.expand_path(__FILE__))
|
23
|
+
dir_pattern = File.join(directory, "assets/api-response-*")
|
24
|
+
file_path = Dir[dir_pattern].sample
|
25
|
+
|
26
|
+
JSON.parse(File.read(file_path))
|
27
|
+
end
|
18
28
|
end
|
19
29
|
|
20
30
|
class V1
|
21
31
|
class << self
|
22
32
|
def go(domain)
|
33
|
+
return WhoisXMLAPI2::Request.send(:fixture_value) if config.mock_out_for_testing
|
34
|
+
|
23
35
|
timestamp = (Time.now.to_f * 1000).to_i
|
24
36
|
digest = generate_digest(timestamp)
|
25
37
|
|
data/lib/whoisxmlapi2/version.rb
CHANGED
data/whoisxmlapi2.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.16"
|
34
|
-
spec.add_development_dependency "rake", "
|
34
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
35
35
|
spec.add_development_dependency "rspec", "~> 3.0"
|
36
36
|
spec.add_development_dependency "vcr", ">= 3.0"
|
37
37
|
spec.add_development_dependency "webmock", ">= 3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whoisxmlapi2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Nissen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,6 +127,9 @@ files:
|
|
127
127
|
- bin/console
|
128
128
|
- bin/setup
|
129
129
|
- lib/whoisxmlapi2.rb
|
130
|
+
- lib/whoisxmlapi2/assets/api-response-cnncom
|
131
|
+
- lib/whoisxmlapi2/assets/api-response-googlecom
|
132
|
+
- lib/whoisxmlapi2/assets/api-response-stratecherycom
|
130
133
|
- lib/whoisxmlapi2/configuration.rb
|
131
134
|
- lib/whoisxmlapi2/request.rb
|
132
135
|
- lib/whoisxmlapi2/version.rb
|
@@ -150,8 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
153
|
- !ruby/object:Gem::Version
|
151
154
|
version: '0'
|
152
155
|
requirements: []
|
153
|
-
|
154
|
-
rubygems_version: 2.7.4
|
156
|
+
rubygems_version: 3.1.2
|
155
157
|
signing_key:
|
156
158
|
specification_version: 4
|
157
159
|
summary: An open source WhoisXMLAPI interface
|