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