Class: MotionOcean::Resource::Domain

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/motion_ocean/resource/domain.rb

Constant Summary

Constants included from Base

Base::PER_PAGE

Instance Attribute Summary

Attributes included from Base

#api_client

Instance Method Summary collapse

Methods included from Base

#initialize

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(options, &block)
  post('domains', options, &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, options, &block)
  post("domains/#{domain_name}/records", options, &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, options, &block)
  put("domains/#{domain_name}/records", options, &block)
end