dnsmadeeasy-rest-api 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9ddc73dd5d5d013d421ee073808567c2442dae3
4
- data.tar.gz: 1483b6715e07ad01e3d7f50c49cd52a665919c47
3
+ metadata.gz: 643106cfce93f7bfc70b3bd68cccfeae5a24c8ce
4
+ data.tar.gz: 99745db91cc64bbe6e6b2555a7fed5bd2754615c
5
5
  SHA512:
6
- metadata.gz: bfa52525de4f9326a6a8ed564f768c39bb6198fc50129e6b83dad1c34a2840144ae0b2687a4f1dc96a44164559b50d0de5405c83efc7cc9dc235cbc2e52ce4bc
7
- data.tar.gz: 8613bb2c37928fa9a88e4546c6344991d17951a6cadb85d8368fa35cbe9e6bfeaf6eb282949118ba487519253ab6f0a5a017abd4a33182c9e7a26ad3126c9fff
6
+ metadata.gz: 00f097b0f1aa8fe9c8c027e74bea1355a3159ed71cff9959884471ba4be76b255c33fe677152e41973ec910f5010984dc7f8e5aa8c5eaae219e22f3fbc7985a2
7
+ data.tar.gz: 7b7cedad7c07b817307319890a0ae759c668f9de5bad7f186911c28321414bcc669aa08c6fb1b57250fda0b430e5fac8a3a2bebf38621dc4899d2425b2c77cb3
@@ -0,0 +1,13 @@
1
+ Copyright [2014] [Arnoud Vermeer, James Hart, Paul Henry]
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.md CHANGED
@@ -1,7 +1,134 @@
1
- Dns Made Easy Api, but better.
1
+ Dns Made Easy Rest Api
2
2
  ==============
3
3
 
4
+ ## Installation
4
5
 
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'dnsmadeeasy-rest-api'
10
+ ```
11
+
12
+ And then execute:
13
+
14
+ ```
15
+ $ bundle
16
+ ```
17
+
18
+ Or install it yourself:
19
+
20
+ ```
21
+ $ gem install dnsmadeeasy-rest-api
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ Start by creating a new instance of the `DnsMadeEasy` class, and passing your api key and secret.
27
+
28
+ ```ruby
29
+ api = DnsMadeEasy.new('awesome-api-key', 'super-secret-and-awesome-api-secret')
30
+ ```
31
+
32
+ All return values are the direct JSON responses from DNS Made Easy converted into a Hash.
33
+
34
+ See: [http://www.dnsmadeeasy.com/wp-content/themes/appdev/pdf/API-Documentationv2.pdf](http://www.dnsmadeeasy.com/wp-content/themes/appdev/pdf/API-Documentationv2.pdf)
35
+
36
+ ### Managing Domains
37
+
38
+ To retrieve all domains:
39
+
40
+ ```ruby
41
+ api.domains
42
+ ```
43
+
44
+ To retreive the id of a domain by the domain name:
45
+
46
+ ```ruby
47
+ api.get_id_by_domain('hello.example.com')
48
+ ```
49
+
50
+ To retrieve the full domain record by domain name:
51
+
52
+ ```ruby
53
+ api.domain('hello.example.com')
54
+ ```
55
+
56
+ To create a domain:
57
+
58
+ ```ruby
59
+ api.create_domain('hello.example.com')
60
+
61
+ # Multiple domains can be created by:
62
+
63
+ api.create_domains(['hello.example.com', 'sup.example.com'])
64
+ ```
65
+
66
+ To delete a domain:
67
+
68
+ ```ruby
69
+ api.delete_domain('hello.example.com')
70
+ ```
71
+
72
+ ### Managing Records
73
+
74
+ To retrieve all records for a given domain name:
75
+
76
+ ```ruby
77
+ api.records_for('hello.example.com')
78
+ ```
79
+
80
+ To find the record id for a given domain, name, and type:
81
+
82
+ This finds the id of the A record 'woah.hello.example.com'.
83
+
84
+ ```ruby
85
+ api.find_record_id('hello.example.com', 'woah', 'A')
86
+ ```
87
+
88
+ To delete a record by domain name and record id (the record id can be retrieved from `find_record_id`:
89
+
90
+ ```ruby
91
+ api.delete_record('hello.example.com', 123)
92
+
93
+ # To delete multiple records:
94
+
95
+ api.delete_records('hello.example.com', [123, 143])
96
+ ```
97
+
98
+ To create a record:
99
+
100
+ ```ruby
101
+ api.create_record('hello.example.com', 'woah', 'A', '127.0.0.1', { 'ttl' => '60' })
102
+
103
+ api.create_a_record('hello.example.com', 'woah', '127.0.0.1', {})
104
+
105
+ api.create_aaaa_record('hello.example.com', 'woah', '127.0.0.1', {})
106
+
107
+ api.create_ptr_record('hello.example.com', 'woah', '127.0.0.1', {})
108
+
109
+ api.create_txt_record('hello.example.com', 'woah', '127.0.0.1', {})
110
+
111
+ api.create_cname_record('hello.example.com', 'woah', '127.0.0.1', {})
112
+
113
+ api.create_ns_record('hello.example.com', 'woah', '127.0.0.1', {})
114
+
115
+ api.create_spf_record('hello.example.com', 'woah', '127.0.0.1', {})
116
+
117
+ # Arguments are: domain_name, name, priority, value, options = {}
118
+ api.create_mx_record('hello.example.com', 'woah', 5, '127.0.0.1', {})
119
+
120
+ # Arguments are: domain_name, name, priority, weight, port, value, options = {}
121
+ api.create_srv_record('hello.example.com', 'woah', 1, 5, 80, '127.0.0.1', {})
122
+
123
+ # Arguments are: domain_name, name, value, redirectType, description, keywords, title, options = {}
124
+ api.create_httpred_record('hello.example.com', 'woah', '127.0.0.1', 'STANDARD - 302', 'a description', 'keywords', 'a title', {})
125
+ ```
126
+
127
+ To update a record:
128
+
129
+ ```ruby
130
+ api.update_record('hello.example.com', 123, 'woah', 'A', '127.0.1.1', { 'ttl' => '60' })
131
+ ```
5
132
 
6
133
  ## Contributing
7
134
 
@@ -1,12 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'dnsmadeeasy-rest-api'
3
- s.version = '1.0.1'
4
- s.authors = ['Paul Henry', 'James Hart']
5
- s.email = 'ops@wanelo.com'
3
+ s.version = '1.0.2'
4
+ s.authors = ['Arnoud Vermeer', 'Paul Henry', 'James Hart']
5
+ s.email = ['a.vermeer@freshway.biz', 'ops@wanelo.com']
6
6
  s.license = 'Apache'
7
7
  s.summary = 'DNS Made Easy V2.0 REST API client for Ruby'
8
- s.description = 'DNS Made Easy V2.0 REST API client for Ruby, but better. With tests and no dependencies.'
9
- s.homepage = 'https://github.com/wanelo/dnsmadeeasy-rest-api'
8
+ s.description = 'DNS Made Easy V2.0 REST API client for Ruby. With tests and no dependencies.'
9
+ s.homepage = 'https://github.com/funzoneq/dnsmadeeasy-rest-api'
10
10
 
11
11
  s.files = `git ls-files`.split("\n")
12
12
 
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsmadeeasy-rest-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
+ - Arnoud Vermeer
7
8
  - Paul Henry
8
9
  - James Hart
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-05-22 00:00:00.000000000 Z
13
+ date: 2014-07-07 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rspec
@@ -39,9 +40,10 @@ dependencies:
39
40
  - - ">="
40
41
  - !ruby/object:Gem::Version
41
42
  version: '0'
42
- description: DNS Made Easy V2.0 REST API client for Ruby, but better. With tests and
43
- no dependencies.
44
- email: ops@wanelo.com
43
+ description: DNS Made Easy V2.0 REST API client for Ruby. With tests and no dependencies.
44
+ email:
45
+ - a.vermeer@freshway.biz
46
+ - ops@wanelo.com
45
47
  executables: []
46
48
  extensions: []
47
49
  extra_rdoc_files: []
@@ -49,13 +51,14 @@ files:
49
51
  - ".gitignore"
50
52
  - Gemfile
51
53
  - Gemfile.lock
54
+ - LICENSE.txt
52
55
  - README.md
53
56
  - Rakefile
54
57
  - dnsmadeeasy-rest-api.gemspec
55
58
  - lib/dnsmadeeasy-rest-api.rb
56
59
  - spec/lib/dnsmadeeasyapi-rest-api_spec.rb
57
60
  - spec/spec_helper.rb
58
- homepage: https://github.com/wanelo/dnsmadeeasy-rest-api
61
+ homepage: https://github.com/funzoneq/dnsmadeeasy-rest-api
59
62
  licenses:
60
63
  - Apache
61
64
  metadata: {}