dnsimple 2.2.0 → 3.0.0.pre.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +3 -1
  4. data/CHANGELOG.md +13 -2
  5. data/CONTRIBUTING.md +35 -0
  6. data/Gemfile +2 -0
  7. data/LICENSE.txt +1 -1
  8. data/README.md +30 -82
  9. data/dnsimple.gemspec +2 -1
  10. data/lib/dnsimple.rb +0 -2
  11. data/lib/dnsimple/client.rb +64 -64
  12. data/lib/dnsimple/client/clients.rb +82 -58
  13. data/lib/dnsimple/client/contacts.rb +74 -37
  14. data/lib/dnsimple/client/domains.rb +82 -28
  15. data/lib/dnsimple/client/domains_email_forwards.rb +107 -0
  16. data/lib/dnsimple/client/identity.rb +38 -0
  17. data/lib/dnsimple/client/oauth.rb +42 -0
  18. data/lib/dnsimple/client/registrar.rb +64 -72
  19. data/lib/dnsimple/client/registrar_auto_renewal.rb +41 -0
  20. data/lib/dnsimple/client/registrar_whois_privacy.rb +74 -0
  21. data/lib/dnsimple/client/tlds.rb +88 -0
  22. data/lib/dnsimple/client/webhooks.rb +82 -0
  23. data/lib/dnsimple/client/zones.rb +68 -0
  24. data/lib/dnsimple/client/zones_records.rb +127 -0
  25. data/lib/dnsimple/default.rb +10 -17
  26. data/lib/dnsimple/error.rb +5 -8
  27. data/lib/dnsimple/extra.rb +1 -1
  28. data/lib/dnsimple/response.rb +80 -0
  29. data/lib/dnsimple/struct.rb +13 -14
  30. data/lib/dnsimple/struct/account.rb +13 -0
  31. data/lib/dnsimple/struct/contact.rb +6 -3
  32. data/lib/dnsimple/struct/domain.rb +10 -10
  33. data/lib/dnsimple/struct/domain_check.rb +16 -0
  34. data/lib/dnsimple/struct/email_forward.rb +11 -1
  35. data/lib/dnsimple/struct/oauth_token.rb +19 -0
  36. data/lib/dnsimple/struct/record.rb +25 -7
  37. data/lib/dnsimple/struct/tld.rb +22 -0
  38. data/lib/dnsimple/struct/user.rb +3 -7
  39. data/lib/dnsimple/struct/webhook.rb +13 -0
  40. data/lib/dnsimple/struct/whois_privacy.rb +8 -5
  41. data/lib/dnsimple/struct/zone.rb +25 -0
  42. data/lib/dnsimple/version.rb +1 -1
  43. data/spec/dnsimple/client/client_service_spec.rb +37 -0
  44. data/spec/dnsimple/client/contacts_spec.rb +108 -78
  45. data/spec/dnsimple/client/domains_email_forwards_spec.rb +190 -0
  46. data/spec/dnsimple/client/domains_spec.rb +121 -58
  47. data/spec/dnsimple/client/identity_spec.rb +56 -0
  48. data/spec/dnsimple/client/oauth_spec.rb +48 -0
  49. data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +80 -0
  50. data/spec/dnsimple/client/registrar_spec.rb +109 -122
  51. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +119 -0
  52. data/spec/dnsimple/client/tlds_spec.rb +139 -0
  53. data/spec/dnsimple/client/webhooks_spec.rb +142 -0
  54. data/spec/dnsimple/client/zones_records_spec.rb +277 -0
  55. data/spec/dnsimple/client/zones_spec.rb +109 -0
  56. data/spec/dnsimple/client_spec.rb +34 -46
  57. data/spec/dnsimple/extra_spec.rb +22 -0
  58. data/spec/{files → fixtures.http}/badgateway.http +14 -14
  59. data/spec/fixtures.http/checkDomain/success.http +17 -0
  60. data/spec/fixtures.http/createContact/created.http +17 -0
  61. data/spec/fixtures.http/createDomain/created.http +16 -0
  62. data/spec/fixtures.http/createEmailForward/created.http +17 -0
  63. data/spec/fixtures.http/createWebhook/created.http +17 -0
  64. data/spec/fixtures.http/createZoneRecord/created.http +17 -0
  65. data/spec/fixtures.http/deleteContact/success.http +13 -0
  66. data/spec/fixtures.http/deleteDomain/success.http +13 -0
  67. data/spec/fixtures.http/deleteEmailForward/success.http +12 -0
  68. data/spec/fixtures.http/deleteWebhook/success.http +13 -0
  69. data/spec/fixtures.http/deleteZoneRecord/success.http +13 -0
  70. data/spec/fixtures.http/disableAutoRenewal/success.http +12 -0
  71. data/spec/fixtures.http/disableWhoisPrivacy/success.http +17 -0
  72. data/spec/fixtures.http/enableAutoRenewal/success.http +12 -0
  73. data/spec/fixtures.http/enableWhoisPrivacy/created.http +17 -0
  74. data/spec/fixtures.http/enableWhoisPrivacy/success.http +17 -0
  75. data/spec/fixtures.http/getContact/success.http +17 -0
  76. data/spec/fixtures.http/getDomain/success.http +16 -0
  77. data/spec/fixtures.http/getEmailForward/success.http +17 -0
  78. data/spec/fixtures.http/getTld/success.http +17 -0
  79. data/spec/fixtures.http/getTldExtendedAttributes/success-noattributes.http +17 -0
  80. data/spec/fixtures.http/getTldExtendedAttributes/success.http +17 -0
  81. data/spec/fixtures.http/getWebhook/success.http +17 -0
  82. data/spec/fixtures.http/getWhoisPrivacy/success.http +17 -0
  83. data/spec/fixtures.http/getZone/success.http +17 -0
  84. data/spec/fixtures.http/getZoneRecord/success.http +17 -0
  85. data/spec/fixtures.http/listContacts/success.http +17 -0
  86. data/spec/fixtures.http/listDomains/success.http +16 -0
  87. data/spec/fixtures.http/listEmailForwards/success.http +17 -0
  88. data/spec/fixtures.http/listTlds/success.http +17 -0
  89. data/spec/fixtures.http/listWebhooks/success.http +17 -0
  90. data/spec/fixtures.http/listZoneRecords/success.http +17 -0
  91. data/spec/fixtures.http/listZones/success.http +17 -0
  92. data/spec/fixtures.http/notfound-contact.http +12 -0
  93. data/spec/fixtures.http/notfound-domain.http +12 -0
  94. data/spec/fixtures.http/notfound-emailforward.http +12 -0
  95. data/spec/fixtures.http/notfound-record.http +12 -0
  96. data/spec/fixtures.http/notfound-webhook.http +12 -0
  97. data/spec/fixtures.http/notfound-zone.http +12 -0
  98. data/spec/fixtures.http/oauthAccessToken/success.http +17 -0
  99. data/spec/fixtures.http/pages-1of3.http +16 -0
  100. data/spec/fixtures.http/pages-2of3.http +16 -0
  101. data/spec/fixtures.http/pages-3of3.http +16 -0
  102. data/spec/fixtures.http/registerDomain/success.http +17 -0
  103. data/spec/fixtures.http/renewDomain/error-tooearly.http +15 -0
  104. data/spec/fixtures.http/renewDomain/success.http +17 -0
  105. data/spec/fixtures.http/resetDomainToken/success.http +17 -0
  106. data/spec/fixtures.http/response.http +16 -0
  107. data/spec/fixtures.http/transferDomain/error-indnsimple.http +15 -0
  108. data/spec/fixtures.http/transferDomain/error-missing-authcode.http +15 -0
  109. data/spec/fixtures.http/transferDomain/success.http +17 -0
  110. data/spec/fixtures.http/transferDomainOut/success.http +13 -0
  111. data/spec/fixtures.http/updateContact/success.http +17 -0
  112. data/spec/fixtures.http/updateZoneRecord/success.http +17 -0
  113. data/spec/fixtures.http/whoami/success.http +16 -0
  114. data/spec/fixtures.http/whoami/success_account.http +16 -0
  115. data/spec/fixtures.http/whoami/success_user.http +16 -0
  116. data/spec/spec_helper.rb +0 -6
  117. data/spec/support/helpers.rb +4 -4
  118. metadata +161 -238
  119. data/lib/dnsimple/client/certificates.rb +0 -100
  120. data/lib/dnsimple/client/domains_autorenewal.rb +0 -35
  121. data/lib/dnsimple/client/domains_forwards.rb +0 -71
  122. data/lib/dnsimple/client/domains_privacy.rb +0 -35
  123. data/lib/dnsimple/client/domains_records.rb +0 -90
  124. data/lib/dnsimple/client/domains_sharing.rb +0 -54
  125. data/lib/dnsimple/client/domains_zones.rb +0 -22
  126. data/lib/dnsimple/client/name_servers.rb +0 -71
  127. data/lib/dnsimple/client/services.rb +0 -37
  128. data/lib/dnsimple/client/services_domains.rb +0 -68
  129. data/lib/dnsimple/client/templates.rb +0 -88
  130. data/lib/dnsimple/client/templates_domains.rb +0 -23
  131. data/lib/dnsimple/client/templates_records.rb +0 -88
  132. data/lib/dnsimple/client/users.rb +0 -39
  133. data/lib/dnsimple/client/vanity_name_servers.rb +0 -39
  134. data/lib/dnsimple/compatibility.rb +0 -46
  135. data/lib/dnsimple/struct/certificate.rb +0 -56
  136. data/lib/dnsimple/struct/membership.rb +0 -22
  137. data/lib/dnsimple/struct/price.rb +0 -16
  138. data/lib/dnsimple/struct/service.rb +0 -19
  139. data/lib/dnsimple/struct/template.rb +0 -19
  140. data/lib/dnsimple/struct/template_record.rb +0 -24
  141. data/lib/dnsimple/struct/transfer_order.rb +0 -10
  142. data/spec/dnsimple/client/certificates_spec.rb +0 -196
  143. data/spec/dnsimple/client/domains_autorenewals_spec.rb +0 -72
  144. data/spec/dnsimple/client/domains_forwards_spec.rb +0 -146
  145. data/spec/dnsimple/client/domains_privacy_spec.rb +0 -74
  146. data/spec/dnsimple/client/domains_records_spec.rb +0 -191
  147. data/spec/dnsimple/client/domains_sharing_spec.rb +0 -109
  148. data/spec/dnsimple/client/domains_zones_spec.rb +0 -40
  149. data/spec/dnsimple/client/name_servers_spec.rb +0 -131
  150. data/spec/dnsimple/client/services_domains_spec.rb +0 -101
  151. data/spec/dnsimple/client/services_spec.rb +0 -69
  152. data/spec/dnsimple/client/templates_domains_spec.rb +0 -38
  153. data/spec/dnsimple/client/templates_records_spec.rb +0 -180
  154. data/spec/dnsimple/client/templates_spec.rb +0 -166
  155. data/spec/dnsimple/client/users_spec.rb +0 -70
  156. data/spec/dnsimple/client/vanity_name_servers_spec.rb +0 -61
  157. data/spec/dnsimple/compatibility_spec.rb +0 -57
  158. data/spec/files/2fa/error-badtoken.http +0 -22
  159. data/spec/files/2fa/error-required.http +0 -23
  160. data/spec/files/2fa/exchange-token.http +0 -22
  161. data/spec/files/certificates/configure/success.http +0 -19
  162. data/spec/files/certificates/get/success.http +0 -19
  163. data/spec/files/certificates/list/success.http +0 -19
  164. data/spec/files/certificates/notfound.http +0 -19
  165. data/spec/files/certificates/purchase/success.http +0 -19
  166. data/spec/files/certificates/submit/success.http +0 -19
  167. data/spec/files/contacts/contact/success.http +0 -19
  168. data/spec/files/contacts/contacts/success.http +0 -23
  169. data/spec/files/contacts/create_contact/badrequest-missingcontact.http +0 -19
  170. data/spec/files/contacts/create_contact/badrequest-validationerror.http +0 -19
  171. data/spec/files/contacts/create_contact/created.http +0 -22
  172. data/spec/files/contacts/delete_contact/success-204.http +0 -18
  173. data/spec/files/contacts/delete_contact/success.http +0 -19
  174. data/spec/files/contacts/notfound-contact.http +0 -19
  175. data/spec/files/contacts/update_contact/success.http +0 -21
  176. data/spec/files/domains/create_domain/created.http +0 -21
  177. data/spec/files/domains/create_forward/created.http +0 -22
  178. data/spec/files/domains/create_membership/success.http +0 -21
  179. data/spec/files/domains/create_record/created.http +0 -21
  180. data/spec/files/domains/delete_domain/success-204.http +0 -18
  181. data/spec/files/domains/delete_domain/success.http +0 -19
  182. data/spec/files/domains/delete_forward/success.http +0 -17
  183. data/spec/files/domains/delete_membership/success.http +0 -17
  184. data/spec/files/domains/delete_record/success-204.http +0 -18
  185. data/spec/files/domains/delete_record/success.http +0 -19
  186. data/spec/files/domains/disable_auto_renewal/success.http +0 -21
  187. data/spec/files/domains/disable_whois_privacy/success.http +0 -21
  188. data/spec/files/domains/domain/success.http +0 -21
  189. data/spec/files/domains/domains/success.http +0 -21
  190. data/spec/files/domains/enable_auto_renewal/success.http +0 -21
  191. data/spec/files/domains/enable_whois_privacy/success.http +0 -22
  192. data/spec/files/domains/forward/success.http +0 -21
  193. data/spec/files/domains/forwards/success.http +0 -21
  194. data/spec/files/domains/memberships/success.http +0 -21
  195. data/spec/files/domains/notfound-domain.http +0 -19
  196. data/spec/files/domains/notfound-forward.http +0 -19
  197. data/spec/files/domains/notfound-membership.http +0 -19
  198. data/spec/files/domains/record/success.http +0 -19
  199. data/spec/files/domains/records/success.http +0 -19
  200. data/spec/files/domains/update_record/success.http +0 -21
  201. data/spec/files/domains/zone/success.http +0 -21
  202. data/spec/files/nameservers/change/success.http +0 -23
  203. data/spec/files/nameservers/deregister/success.http +0 -17
  204. data/spec/files/nameservers/name_servers/success.http +0 -23
  205. data/spec/files/nameservers/notfound-domain.http +0 -19
  206. data/spec/files/nameservers/register/badrequest-valueerror.http +0 -19
  207. data/spec/files/nameservers/register/success.http +0 -21
  208. data/spec/files/nameservers/vanity_name_servers/disabled.http +0 -23
  209. data/spec/files/nameservers/vanity_name_servers/enabled.http +0 -23
  210. data/spec/files/registrar/check/available.http +0 -19
  211. data/spec/files/registrar/check/registered.http +0 -21
  212. data/spec/files/registrar/extended_attributes/success.http +0 -21
  213. data/spec/files/registrar/prices/success.http +0 -21
  214. data/spec/files/registrar/register/badrequest-missingdomain.http +0 -19
  215. data/spec/files/registrar/register/badrequest-missingregistrant.http +0 -19
  216. data/spec/files/registrar/register/success.http +0 -21
  217. data/spec/files/registrar/renew/badrequest-missingrenewal.http +0 -19
  218. data/spec/files/registrar/renew/badrequest-unable.http +0 -19
  219. data/spec/files/registrar/renew/success.http +0 -21
  220. data/spec/files/registrar/transfer/success.http +0 -21
  221. data/spec/files/services/applied/success.http +0 -21
  222. data/spec/files/services/apply/success.http +0 -21
  223. data/spec/files/services/available/success.http +0 -21
  224. data/spec/files/services/notfound-service.http +0 -19
  225. data/spec/files/services/service/success.http +0 -21
  226. data/spec/files/services/services/success.http +0 -21
  227. data/spec/files/services/unapply/success.http +0 -21
  228. data/spec/files/subscriptions/subscription/success.http +0 -21
  229. data/spec/files/templates/apply_template/success.http +0 -21
  230. data/spec/files/templates/create_template/created.http +0 -22
  231. data/spec/files/templates/delete_template/success-204.http +0 -21
  232. data/spec/files/templates/delete_template/success.http +0 -21
  233. data/spec/files/templates/notfound-template.http +0 -19
  234. data/spec/files/templates/template/success.http +0 -21
  235. data/spec/files/templates/templates/success.http +0 -21
  236. data/spec/files/templates/update_template/success.http +0 -21
  237. data/spec/files/templates_records/create_record/created.http +0 -22
  238. data/spec/files/templates_records/delete_record/success-204.http +0 -19
  239. data/spec/files/templates_records/delete_record/success.http +0 -21
  240. data/spec/files/templates_records/notfound-template-record.http +0 -19
  241. data/spec/files/templates_records/record/success.http +0 -21
  242. data/spec/files/templates_records/records/success.http +0 -21
  243. data/spec/files/templates_records/update_record/success.http +0 -21
  244. data/spec/files/users/user/success.http +0 -21
@@ -1,70 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Dnsimple::Client, ".users" do
4
-
5
- subject { described_class.new(api_endpoint: "https://api.zone", username: "user", api_token: "token").users }
6
-
7
-
8
- describe "#user" do
9
- before do
10
- stub_request(:get, %r[/v1/user]).
11
- to_return(read_fixture("users/user/success.http"))
12
- end
13
-
14
- it "builds the correct request" do
15
- subject.user
16
-
17
- expect(WebMock).to have_requested(:get, "https://api.zone/v1/user").
18
- with(headers: { 'Accept' => 'application/json' })
19
- end
20
-
21
- it "returns the user" do
22
- result = subject.user
23
-
24
- expect(result).to be_a(Dnsimple::Struct::User)
25
- expect(result.id).to eq(1)
26
- expect(result.email).to eq("example@example.com")
27
- expect(result.api_token).to eq("api-token")
28
- expect(result.domain_count).to eq(32)
29
- expect(result.domain_limit).to eq(1000)
30
- expect(result.login_count).to eq(2)
31
- expect(result.failed_login_count).to eq(1)
32
- expect(result.created_at).to eq("2011-03-17T21:30:25.731Z")
33
- expect(result.updated_at).to eq("2014-12-13T13:52:08.343Z")
34
- end
35
- end
36
-
37
- describe "#exchange_token" do
38
- before do
39
- stub_request(:get, %r[/v1/user]).
40
- to_return(read_fixture("2fa/exchange-token.http"))
41
- end
42
-
43
- it "builds the correct request" do
44
- subject.exchange_token("123456")
45
-
46
- expect(WebMock).to have_requested(:get, "https://api.zone/v1/user").
47
- with(headers: { "X-Dnsimple-Otp" => "123456" })
48
- end
49
-
50
- it "returns the exchange_token" do
51
- result = subject.exchange_token("123456")
52
-
53
- expect(result).to eq("0c622716aaa64124219963075bc1c870")
54
- end
55
-
56
- context "when the OTP token is invalid" do
57
- before do
58
- stub_request(:get, %r[/v1/user]).
59
- to_return(read_fixture("2fa/error-badtoken.http"))
60
- end
61
-
62
- it "raises an AuthenticationFailed" do
63
- expect {
64
- subject.exchange_token("invalid-token")
65
- }.to raise_error(Dnsimple::AuthenticationFailed, "Bad OTP token")
66
- end
67
- end
68
- end
69
-
70
- end
@@ -1,61 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Dnsimple::Client, ".nameservers / vanity_name_servers" do
4
- subject { described_class.new(api_endpoint: "https://api.zone", username: "user", api_token: "token").name_servers }
5
-
6
- describe "#enable_vanity_name_servers" do
7
- before do
8
- stub_request(:post, %r[/v1/domains/.+/vanity_name_servers]).
9
- to_return(read_fixture("nameservers/vanity_name_servers/enabled.http"))
10
- end
11
-
12
- it "builds the correct request" do
13
- subject.enable_vanity_name_servers("example.com", { "ns1" => "ns1.example.com", "ns2" => "ns2.example.com" })
14
-
15
- expect(WebMock).to have_requested(:post, "https://api.zone/v1/domains/example.com/vanity_name_servers").
16
- with(body: { "vanity_nameserver_configuration" => { "server_source" => "external", "ns1" => "ns1.example.com", "ns2" => "ns2.example.com" } }).
17
- with(headers: { 'Accept' => 'application/json' })
18
- end
19
-
20
- it "allows submission of extra options" do
21
- subject.enable_vanity_name_servers("example.com", { "ns1" => "ns1.example.com", "ns2" => "ns2.example.com" }, {headers: { "X-FAKE-HEADER" => "Some value" }})
22
-
23
- expect(WebMock).to have_requested(:post, "https://api.zone/v1/domains/example.com/vanity_name_servers").
24
- with(body: { "vanity_nameserver_configuration" => { "server_source" => "external", "ns1" => "ns1.example.com", "ns2" => "ns2.example.com" } }).
25
- with(headers: { 'Accept' => 'application/json', "X-FAKE-HEADER" => "Some value" })
26
- end
27
-
28
- it "returns nothing" do
29
- result = subject.enable_vanity_name_servers("example.com", { ns1: "ns1.example.com", ns2: "ns2.example.com" })
30
-
31
- expect(result).to be_truthy
32
- end
33
- end
34
-
35
- describe "#disable_vanity_name_servers" do
36
- before do
37
- stub_request(:delete, %r[/v1/domains/.+/vanity_name_servers]).
38
- to_return(read_fixture("nameservers/vanity_name_servers/disabled.http"))
39
- end
40
-
41
- it "builds the correct request" do
42
- subject.disable_vanity_name_servers("example.com")
43
-
44
- expect(WebMock).to have_requested(:delete, "https://api.zone/v1/domains/example.com/vanity_name_servers").
45
- with(headers: { 'Accept' => 'application/json' })
46
- end
47
-
48
- it "allows submission of extra options" do
49
- subject.disable_vanity_name_servers("example.com", {headers: { "X-FAKE-HEADER" => "Some value" }})
50
-
51
- expect(WebMock).to have_requested(:delete, "https://api.zone/v1/domains/example.com/vanity_name_servers").
52
- with(headers: { 'Accept' => 'application/json', "X-FAKE-HEADER" => "Some value" })
53
- end
54
-
55
- it "returns nothing" do
56
- result = subject.disable_vanity_name_servers("example.com")
57
-
58
- expect(result).to be_truthy
59
- end
60
- end
61
- end
@@ -1,57 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Dnsimple::Client do
4
-
5
- describe "class-level configs" do
6
- before do
7
- @_1 = described_class.base_uri
8
- @_2 = described_class.username
9
- @_3 = described_class.password
10
- @_4 = described_class.api_token
11
- @_5 = described_class.domain_api_token
12
- @_6 = described_class.exchange_token
13
- end
14
-
15
- after do
16
- described_class.base_uri = @_1
17
- described_class.username = @_2
18
- described_class.password = @_3
19
- described_class.api_token = @_4
20
- described_class.domain_api_token = @_5
21
- described_class.exchange_token = @_6
22
- end
23
-
24
- it "passes configs to the client" do
25
- described_class.base_uri = "https://api.example.com/"
26
- described_class.username = "hello"
27
- described_class.password = "world"
28
- described_class.api_token = "api-token"
29
- described_class.domain_api_token = "domain-api-token"
30
- described_class.exchange_token = "exchange-token"
31
-
32
- expect(described_class).to receive(:new).with({
33
- api_endpoint: "https://api.example.com/",
34
- username: "hello",
35
- password: "world",
36
- api_token: "api-token",
37
- domain_api_token: "domain-api-token",
38
- exchange_token: "exchange-token",
39
- })
40
-
41
- described_class.client
42
- end
43
- end
44
-
45
- [:get, :post, :put, :delete].each do |method|
46
- describe ".#{method}" do
47
- it "delegates to .client" do
48
- client = double()
49
- expect(client).to receive(method).with('path', { foo: 'bar' })
50
-
51
- expect(described_class).to receive(:client).and_return(client)
52
- described_class.send(method, 'path', { :foo => 'bar' })
53
- end
54
- end
55
- end
56
-
57
- end
@@ -1,22 +0,0 @@
1
- HTTP/1.1 401 Unauthorized
2
- Server: nginx
3
- Date: Fri, 19 Sep 2014 10:20:23 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 401 Unauthorized
8
- Strict-Transport-Security: max-age=631138519
9
- X-Frame-Options: SAMEORIGIN
10
- X-XSS-Protection: 1
11
- X-Content-Type-Options: nosniff
12
- X-UA-Compatible: chrome=1
13
- Access-Control-Allow-Origin: *
14
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
15
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
16
- Cache-Control: no-cache
17
- Set-Cookie: user_credentials=f53d51039d1ac35e3398b604cb8eb8b8ecc085b69e76e6a8b41bf9b758380b97be2c65ba3124b1d5f8fc9dbeef9690386bdc5ccd775f0494a1a5a1edb5d98521; path=/; expires=Sat, 19 Sep 2015 10:20:23 -0000; secure
18
- Set-Cookie: _dnsimple_session=MEM4ak83V0lDeVV6YnA1L2JPbG90cDExelZ6REF6dTNMR0NLejN1VG85WkphdU9FUDBvRmxUSnhlTGxGdmhOOXhiamtBQW1SYU9NSU9KUlV5SG5lTzlDS2N0dCtuay9mem5vL2ZxUzdFL2VpVDNMS0dwOVQxdWc3QmtYcWpLQXQ1NDE3UmpUeEZiMmwwTVlxdmJZQVU3UDYrbmJ3RnhDODBnZE5MWVJKekY5MFdoN2h0UVFQUmZzY204N1pTS1VpV2FZNWdZVlNENDJ3cThyZUx3U2l2NFN2eWx1UEZSVkNtTXdTUitxZG04VDBmZzErTmtvN1BPMmlRVGdiTW5mTXdVR0Jlb2V1RWxaS0xlU3NpNFlrUzdERDRCNzRRTnFLZ2Q1bS95WXM4M3M9LS1FdGpHYWlKRUlyVmhHYXZic3JIM3lnPT0%3D--8081ac131a8acf29688505a8b2a8224d0fd76ce5; path=/; HttpOnly; secure
19
- X-Request-Id: 0567a347-9ea0-46cf-a73b-eb5b60bbe8bb
20
- X-Runtime: 0.214109
21
-
22
- {"message":"Bad OTP token"}
@@ -1,23 +0,0 @@
1
- HTTP/1.1 401 Unauthorized
2
- Server: nginx
3
- Date: Fri, 19 Sep 2014 10:33:42 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 401 Unauthorized
8
- Strict-Transport-Security: max-age=631138519
9
- X-Frame-Options: SAMEORIGIN
10
- X-XSS-Protection: 1
11
- X-Content-Type-Options: nosniff
12
- X-UA-Compatible: chrome=1
13
- Access-Control-Allow-Origin: *
14
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
15
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
16
- X-Dnsimple-OTP: required
17
- Cache-Control: no-cache
18
- Set-Cookie: user_credentials=4ef7ff0d7228ea953f77be4044941c0f7e9c5e308e3b2c778dd175b0dd0d95eb032cef4334c6c3a7023e0e4754e2aea3133f44aa663d760f78997d97bde9336f; path=/; expires=Sat, 19 Sep 2015 10:33:42 -0000; secure
19
- Set-Cookie: _dnsimple_session=TXFabkRHZlZyaWQvOEVMc09PU3RCckR4cVBDeXZrczRwOStMbkJiZnRjMWIzV3R1NzdubktHdU1pNlEyVVJ4SDNlODBNcUo0VzN5VmhsdWxTU1dwUUhXbXJhNk1tOUNpWUNUdlZ3NFVJd2cydVFWdFJGT0s4OExZd1NNS0lEeVdYSW0venA1WFpjVnhYN0NzNUlEdFJBS2NnSmY0ZHFJaG5UTitST2prTXBrVmpBYUlFNEkzZVUxeU1kVGN4aXlMMHhRMFI1MlRVNSs2SXpLd0Uyb3VleG5KODh1TEJvdG5rN2tXWGtjeEIxM3AzWmRrc052TmRsdEcvLzdwZ1hvK014OXpKM1N2YkNmaVppbDdMWWRNOXE4cERuU2l4c3lwWmNOYjgxVXlOOUE9LS15aXY1ekg4WTZlMDRtTGIyZ0JFanJRPT0%3D--8c7111719b56998a6343d0b8dc68d5607d6c05bf; path=/; HttpOnly; secure
20
- X-Request-Id: 58e56818-4804-4452-b255-0650552a24cc
21
- X-Runtime: 0.212325
22
-
23
- {"message":"2FA Authentication failed"}
@@ -1,22 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx
3
- Date: Mon, 15 Dec 2014 17:04:41 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: keep-alive
7
- Status: 200 OK
8
- Strict-Transport-Security: max-age=631138519
9
- X-Frame-Options: SAMEORIGIN
10
- X-XSS-Protection: 1
11
- X-Content-Type-Options: nosniff
12
- Access-Control-Allow-Origin: *
13
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
14
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
15
- ETag: "535b1edb37f32b4388c1be8682e8c15a"
16
- Cache-Control: max-age=0, private, must-revalidate
17
- X-Request-Id: ee1f0ee3-082a-4e59-8891-17d5068e857c
18
- X-Runtime: 0.073436
19
- Strict-Transport-Security: max-age=315360000
20
- X-Dnsimple-OTP-Token: 0c622716aaa64124219963075bc1c870
21
-
22
- {"user":{"id":1,"email":"example@example.com","referral_token":"referral-token","api_token":"api-token","domain_count":32,"domain_limit":1000,"login_count":2,"failed_login_count":1,"created_at":"2011-03-17T21:30:25.731Z","updated_at":"2014-12-13T13:52:08.343Z"}}
@@ -1,19 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx/1.5.8
3
- Date: Tue, 14 Jan 2014 18:40:28 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 200 OK
8
- X-Dnsimple-API-Version: 1.0.0
9
- Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
- X-UA-Compatible: IE=Edge,chrome=1
13
- ETag: "2b76f0ea88c7e95384506ac576d23d01"
14
- Cache-Control: max-age=0, private, must-revalidate
15
- X-Request-Id: aaf5915a32924165d4f45779689831fa
16
- X-Runtime: 0.042263
17
- Strict-Transport-Security: max-age=315360000
18
-
19
- {"certificate":{"id":4576,"domain_id":79569,"contact_id":11549,"name":"www","state":"configured","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\nRHr2akB4KMba6FMAsvlStnO/2ika16hNx+d3smPNsER+HA==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":null,"private_key":"-----BEGIN RSA PRIVATE KEY-----\nUeXbFi7o+nuPfRhpBFQEKwacKFc3Hnc1hH6UsnC0KY25cUif7yz38A==\n-----END RSA PRIVATE KEY-----\n","approver_email":null,"approver_emails":["admin@example.com", "admin@www.example.com"],"expires_on":"2014-09-17","created_at":"2013-09-17T21:54:42Z","updated_at":"2013-09-17T22:25:36Z","configured_at":"2013-09-17T22:25:01Z"}}
@@ -1,19 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx/1.5.8
3
- Date: Tue, 14 Jan 2014 18:40:28 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 200 OK
8
- X-Dnsimple-API-Version: 1.0.0
9
- Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
- X-UA-Compatible: IE=Edge,chrome=1
13
- ETag: "2b76f0ea88c7e95384506ac576d23d01"
14
- Cache-Control: max-age=0, private, must-revalidate
15
- X-Request-Id: aaf5915a32924165d4f45779689831fa
16
- X-Runtime: 0.042263
17
- Strict-Transport-Security: max-age=315360000
18
-
19
- {"certificate":{"id":4576,"domain_id":79569,"contact_id":11549,"name":"www","state":"cancelled","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\nRHr2akB4KMba6FMAsvlStnO/2ika16hNx+d3smPNsER+HA==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":"-----BEGIN CERTIFICATE-----\nXwTkw5UCPpaVyUYcwHlvaprOe9ZbwIyEHm2AT1rW+70=\n-----END CERTIFICATE-----\n","private_key":"-----BEGIN RSA PRIVATE KEY-----\nUeXbFi7o+nuPfRhpBFQEKwacKFc3Hnc1hH6UsnC0KY25cUif7yz38A==\n-----END RSA PRIVATE KEY-----\n","approver_email":"example@example.net","expires_on":"2014-09-17","created_at":"2013-09-17T21:54:42Z","updated_at":"2013-09-17T22:25:36Z","configured_at":"2013-09-17T22:25:01Z"}}
@@ -1,19 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx/1.5.8
3
- Date: Tue, 14 Jan 2014 18:37:59 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 200 OK
8
- X-Dnsimple-API-Version: 1.0.0
9
- Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
- X-UA-Compatible: IE=Edge,chrome=1
13
- ETag: "68c94c6eefc81fd3fc85b068a7c65029"
14
- Cache-Control: max-age=0, private, must-revalidate
15
- X-Request-Id: f06a7d3fc56223e9db4c14f548c43d7a
16
- X-Runtime: 0.046608
17
- Strict-Transport-Security: max-age=315360000
18
-
19
- [{"certificate":{"id":4576,"domain_id":79569,"contact_id":11549,"name":"www","state":"cancelled","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\nRHr2akB4KMba6FMAsvlStnO/2ika16hNx+d3smPNsER+HA==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":null,"private_key":"-----BEGIN RSA PRIVATE KEY-----\nUeXbFi7o+nuPfRhpBFQEKwacKFc3Hnc1hH6UsnC0KY25cUif7yz38A==\n-----END RSA PRIVATE KEY-----\n","approver_email":"example@example.com","expires_on":"2014-09-17","created_at":"2013-09-17T21:54:42Z","updated_at":"2013-09-17T22:25:36Z","configured_at":"2013-09-17T22:25:01Z"}},{"certificate":{"id":4578,"domain_id":79569,"contact_id":11549,"name":"www","state":"cancelled","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\n2iT9OvY4afImf2ZcXnYZGrfXCx4GOxeMDpNcQm0RT3gLGw==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":null,"private_key":"-----BEGIN RSA PRIVATE KEY-----\nwDj89yRezuhCL5K1MSVohQyhyESr9Vz93p4r31DZxAmgFbCRE+g=\n-----END RSA PRIVATE KEY-----\n","approver_email":"example@example.com","expires_on":"2014-09-17","created_at":"2013-09-17T22:30:03Z","updated_at":"2013-09-17T22:30:41Z","configured_at":"2013-09-17T22:30:08Z"}}]
@@ -1,19 +0,0 @@
1
- HTTP/1.1 404 Not Found
2
- Server: nginx
3
- Date: Tue, 16 Dec 2014 00:31:39 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 404 Not Found
8
- Strict-Transport-Security: max-age=631138519
9
- X-Frame-Options: SAMEORIGIN
10
- X-XSS-Protection: 1
11
- X-Content-Type-Options: nosniff
12
- Access-Control-Allow-Origin: *
13
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
14
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
15
- Cache-Control: no-cache
16
- X-Request-Id: 5c210ca0-0f2c-4cb4-8a06-6d6f352bc3b7
17
- X-Runtime: 0.043528
18
-
19
- {"message":"Certificate `0' not found"}
@@ -1,19 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx/1.5.8
3
- Date: Tue, 14 Jan 2014 18:40:28 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 200 OK
8
- X-Dnsimple-API-Version: 1.0.0
9
- Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
- X-UA-Compatible: IE=Edge,chrome=1
13
- ETag: "2b76f0ea88c7e95384506ac576d23d01"
14
- Cache-Control: max-age=0, private, must-revalidate
15
- X-Request-Id: aaf5915a32924165d4f45779689831fa
16
- X-Runtime: 0.042263
17
- Strict-Transport-Security: max-age=315360000
18
-
19
- {"certificate":{"id":4576,"domain_id":79569,"contact_id":11549,"name":"www","state":"purchased","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\nRHr2akB4KMba6FMAsvlStnO/2ika16hNx+d3smPNsER+HA==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":null,"private_key":"-----BEGIN RSA PRIVATE KEY-----\nUeXbFi7o+nuPfRhpBFQEKwacKFc3Hnc1hH6UsnC0KY25cUif7yz38A==\n-----END RSA PRIVATE KEY-----\n","approver_email":"example@example.net","expires_on":"2014-09-17","created_at":"2013-09-17T21:54:42Z","updated_at":"2013-09-17T22:25:36Z","configured_at":"2013-09-17T22:25:01Z"}}
@@ -1,19 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx/1.5.8
3
- Date: Tue, 14 Jan 2014 18:40:28 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 200 OK
8
- X-Dnsimple-API-Version: 1.0.0
9
- Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
- X-UA-Compatible: IE=Edge,chrome=1
13
- ETag: "2b76f0ea88c7e95384506ac576d23d01"
14
- Cache-Control: max-age=0, private, must-revalidate
15
- X-Request-Id: aaf5915a32924165d4f45779689831fa
16
- X-Runtime: 0.042263
17
- Strict-Transport-Security: max-age=315360000
18
-
19
- {"certificate":{"id":4576,"domain_id":79569,"contact_id":11549,"name":"www","state":"submitted","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\nRHr2akB4KMba6FMAsvlStnO/2ika16hNx+d3smPNsER+HA==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":null,"private_key":"-----BEGIN RSA PRIVATE KEY-----\nUeXbFi7o+nuPfRhpBFQEKwacKFc3Hnc1hH6UsnC0KY25cUif7yz38A==\n-----END RSA PRIVATE KEY-----\n","approver_email":"example@example.net","expires_on":"2014-09-17","created_at":"2013-09-17T21:54:42Z","updated_at":"2013-09-17T22:25:36Z","configured_at":"2013-09-17T22:25:01Z"}}
@@ -1,19 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx/1.4.4
3
- Date: Tue, 14 Jan 2014 18:03:26 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 200 OK
8
- X-Dnsimple-API-Version: 1.0.0
9
- Access-Control-Allow-Origin: *
10
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-Dnsimple-Token,X-Dnsimple-Domain-Token,X-CSRF-Token,x-requested-with
11
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
- X-UA-Compatible: IE=Edge,chrome=1
13
- ETag: "c8da059d309b1de77a7b400c6c8febb0"
14
- Cache-Control: max-age=0, private, must-revalidate
15
- X-Request-Id: 954fef00cf763b3de6211670a740ebc9
16
- X-Runtime: 0.040477
17
- Strict-Transport-Security: max-age=315360000
18
-
19
- {"contact":{"id":1,"user_id":21,"label":"Default","first_name":"Simone","last_name":"Carletti","job_title":"Underwater Programmer","organization_name":"DNSimple","email_address":"simone.carletti@dnsimple.com","phone":"+1 111 4567890","fax":"+1 222 4567890","address1":"Awesome Street","address2":"c/o Someone","city":"Rome","state_province":"RM","postal_code":"00171","country":"IT","created_at":"2014-01-15T22:08:07.390Z","updated_at":"2014-01-15T22:08:07.390Z"}}
@@ -1,23 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx/1.4.7
3
- Date: Tue, 01 Jul 2014 14:58:44 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: close
7
- Status: 200 OK
8
- Strict-Transport-Security: max-age=631138519
9
- X-Frame-Options: SAMEORIGIN
10
- X-XSS-Protection: 1
11
- X-Content-Type-Options: nosniff
12
- X-UA-Compatible: chrome=1
13
- Access-Control-Allow-Origin: *
14
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
15
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
16
- Content-Security-Policy: default-src 'self'; connect-src 'self'; font-src 'self' data: netdna.bootstrapcdn.com *.edgecastcdn.net; frame-src 'self'; img-src 'self' data: *.nr-data.net; media-src 'self'; object-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' *.getdrip.com *.visualwebsiteoptimizer.com *.doubleclick.net *.pathful.com *.newrelic.com; style-src 'self' data: 'unsafe-inline' 'unsafe-eval' netdna.bootstrapcdn.com cloud.webtype.com cloud.typography.com;
17
- ETag: "a037fcce7e739f5ba6d94efe2fb63f77"
18
- Cache-Control: max-age=0, private, must-revalidate
19
- X-Request-Id: 935327a1-d72e-4c11-b382-e817200496b6
20
- X-Runtime: 0.018471
21
- Strict-Transport-Security: max-age=315360000
22
-
23
- [{"contact":{"id":1,"user_id":21,"label":"Default","first_name":"Simone","last_name":"Carletti","job_title":"Underwater Programmer","organization_name":"DNSimple","email_address":"simone.carletti@dnsimple.com","phone":"+1 111 4567890","fax":"+1 222 4567890","address1":"Awesome Street","address2":"c/o Someone","city":"Rome","state_province":"RM","postal_code":"00171","country":"IT","created_at":"2014-01-15T22:08:07.390Z","updated_at":"2014-01-15T22:08:07.390Z"}},{"contact":{"id":2,"user_id":22,"label":"Simone","first_name":"Simone","last_name":"Carletti","job_title":"Underwater Programmer","organization_name":"DNSimple","email_address":"simone.carletti@dnsimple.com","phone":"+1 111 4567890","fax":"+1 222 4567890","address1":"Awesome Street","address2":"c/o Someone","city":"Rome","state_province":"RM","postal_code":"00171","country":"IT","created_at":"2014-01-15T22:08:07.390Z","updated_at":"2014-01-15T22:08:07.390Z"}}]
@@ -1,19 +0,0 @@
1
- HTTP/1.1 400 Bad Request
2
- Server: nginx
3
- Date: Sun, 14 Dec 2014 23:27:25 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Transfer-Encoding: chunked
6
- Connection: keep-alive
7
- Status: 400 Bad Request
8
- Strict-Transport-Security: max-age=631138519
9
- X-Frame-Options: SAMEORIGIN
10
- X-XSS-Protection: 1
11
- X-Content-Type-Options: nosniff
12
- Access-Control-Allow-Origin: *
13
- Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
14
- Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
15
- Cache-Control: no-cache
16
- X-Request-Id: 6f5ca4d6-1f39-4aad-ba3d-c19cd1450747
17
- X-Runtime: 0.043306
18
-
19
- {"message":"Required parameter missing: contact"}