Class: Barge::Resource::Domain
- Inherits:
-
Object
- Object
- Barge::Resource::Domain
- Includes:
- Base
- Defined in:
- lib/barge/resource/domain.rb
Constant Summary
Constants included from Base
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
- #all(options = {}) ⇒ Object
- #create(options) ⇒ Object
- #create_record(domain_name, options) ⇒ Object
- #destroy(domain_name) ⇒ Object
- #destroy_record(domain_name, record_id) ⇒ Object
- #records(domain_name, options = {}) ⇒ Object
- #show(domain_name) ⇒ Object
- #show_record(domain_name, record_id) ⇒ Object
- #update_record(domain_name, record_id, options) ⇒ Object
Methods included from Base
Instance Method Details
#all(options = {}) ⇒ Object
10 11 12 |
# File 'lib/barge/resource/domain.rb', line 10 def all( = {}) get('domains', ) end |
#create(options) ⇒ Object
6 7 8 |
# File 'lib/barge/resource/domain.rb', line 6 def create() post('domains', .to_json) end |
#create_record(domain_name, options) ⇒ Object
22 23 24 |
# File 'lib/barge/resource/domain.rb', line 22 def create_record(domain_name, ) post("domains/#{domain_name}/records", .to_json) end |
#destroy(domain_name) ⇒ Object
18 19 20 |
# File 'lib/barge/resource/domain.rb', line 18 def destroy(domain_name) delete("domains/#{domain_name}") end |
#destroy_record(domain_name, record_id) ⇒ Object
38 39 40 |
# File 'lib/barge/resource/domain.rb', line 38 def destroy_record(domain_name, record_id) delete("domains/#{domain_name}/records/#{record_id}") end |
#records(domain_name, options = {}) ⇒ Object
26 27 28 |
# File 'lib/barge/resource/domain.rb', line 26 def records(domain_name, = {}) get("domains/#{domain_name}/records", ) end |
#show(domain_name) ⇒ Object
14 15 16 |
# File 'lib/barge/resource/domain.rb', line 14 def show(domain_name) get("domains/#{domain_name}") end |
#show_record(domain_name, record_id) ⇒ Object
30 31 32 |
# File 'lib/barge/resource/domain.rb', line 30 def show_record(domain_name, record_id) get("domains/#{domain_name}/records/#{record_id}") end |
#update_record(domain_name, record_id, options) ⇒ Object
34 35 36 |
# File 'lib/barge/resource/domain.rb', line 34 def update_record(domain_name, record_id, ) put("domains/#{domain_name}/records/#{record_id}", .to_json) end |