Module: NS1::API::Records
- Included in:
- Client
- Defined in:
- lib/NS1/api/records.rb
Instance Method Summary collapse
- #create_record(zone, domain, type, params = {}) ⇒ Object
- #delete_record(zone, domain, type) ⇒ Object
- #record(zone, domain, type) ⇒ Object
- #update_record(zone, domain, type, params = {}) ⇒ Object
Instance Method Details
#create_record(zone, domain, type, params = {}) ⇒ Object
8 9 10 11 |
# File 'lib/NS1/api/records.rb', line 8 def create_record(zone, domain, type, params = {}) params = params.merge(zone: zone, domain: domain, type: type) request(:put, "zones/#{zone}/#{domain}/#{type}", params.to_json) end |
#delete_record(zone, domain, type) ⇒ Object
17 18 19 |
# File 'lib/NS1/api/records.rb', line 17 def delete_record(zone, domain, type) request(:delete, "zones/#{zone}/#{domain}/#{type}") end |
#record(zone, domain, type) ⇒ Object
4 5 6 |
# File 'lib/NS1/api/records.rb', line 4 def record(zone, domain, type) request(:get, "zones/#{zone}/#{domain}/#{type}") end |
#update_record(zone, domain, type, params = {}) ⇒ Object
13 14 15 |
# File 'lib/NS1/api/records.rb', line 13 def update_record(zone, domain, type, params = {}) request(:post, "zones/#{zone}/#{domain}/#{type}", params.to_json) end |