Module: Dnsimple::Client::Services
- Included in:
- ServicesService
- Defined in:
- lib/dnsimple/client/services.rb
Instance Method Summary collapse
-
#service(service, options = {}) ⇒ Struct::Service
Gets a service.
-
#services(options = {}) ⇒ Array<Struct::Service>
(also: #list, #list_services)
Lists the supported services.
Instance Method Details
#service(service, options = {}) ⇒ Struct::Service
Gets a service.
29 30 31 32 33 |
# File 'lib/dnsimple/client/services.rb', line 29 def service(service, = {}) response = client.get(Client.versioned("services/#{service}"), ) Struct::Service.new(response["service"]) end |
#services(options = {}) ⇒ Array<Struct::Service> Also known as: list, list_services
Lists the supported services.
12 13 14 15 16 |
# File 'lib/dnsimple/client/services.rb', line 12 def services( = {}) response = client.get(Client.versioned("services"), ) response.map { |r| Struct::Service.new(r["service"]) } end |