Skip to content

Commit

Permalink
Remove extra aliases
Browse files Browse the repository at this point in the history
Closes GH-114. This change makes the library
more consistent with other implementations.
  • Loading branch information
weppos committed May 21, 2018
1 parent 3775073 commit 7093679
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 17 deletions.
1 change: 0 additions & 1 deletion lib/dnsimple/client/accounts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def accounts(options = {})

Dnsimple::Response.new(response, response["data"].map { |r| Struct::Account.new(r) })
end
alias list accounts
alias list_accounts accounts

end
Expand Down
1 change: 1 addition & 0 deletions lib/dnsimple/client/certificates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def certificates(account_id, domain_name, options = {})

Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Certificate.new(r) })
end
alias list_certificates certificates

# List ALL the certificates for the domain in the account.
#
Expand Down
5 changes: 0 additions & 5 deletions lib/dnsimple/client/contacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def contacts(account_id, options = {})

Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Contact.new(r) })
end
alias list contacts
alias list_contacts contacts

# Lists ALL the contacts in the account.
Expand All @@ -54,7 +53,6 @@ def contacts(account_id, options = {})
def all_contacts(account_id, options = {})
paginate(:contacts, account_id, options)
end
alias all all_contacts

# Creates a contact in the account.
#
Expand All @@ -72,7 +70,6 @@ def create_contact(account_id, attributes, options = {})

Dnsimple::Response.new(response, Struct::Contact.new(response["data"]))
end
alias create create_contact

# Gets a contact from the account.
#
Expand Down Expand Up @@ -107,7 +104,6 @@ def update_contact(account_id, contact_id, attributes, options = {})

Dnsimple::Response.new(response, Struct::Contact.new(response["data"]))
end
alias update update_contact

# Deletes a contact from the account.
#
Expand All @@ -127,7 +123,6 @@ def delete_contact(account_id, contact_id, options = {})

Dnsimple::Response.new(response, nil)
end
alias delete delete_contact

end
end
Expand Down
4 changes: 0 additions & 4 deletions lib/dnsimple/client/domains.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def domains(account_id, options = {})

Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Domain.new(r) })
end
alias list domains
alias list_domains domains

# Lists ALL the domains in the account.
Expand All @@ -59,7 +58,6 @@ def domains(account_id, options = {})
def all_domains(account_id, options = {})
paginate(:domains, account_id, options)
end
alias all all_domains

# Creates a domain in the account.
#
Expand All @@ -78,7 +76,6 @@ def create_domain(account_id, attributes, options = {})

Dnsimple::Response.new(response, Struct::Domain.new(response["data"]))
end
alias create create_domain

# Gets a domain from the account.
#
Expand Down Expand Up @@ -115,7 +112,6 @@ def delete_domain(account_id, domain_id, options = {})

Dnsimple::Response.new(response, nil)
end
alias delete delete_domain

# Resets the domain token.
#
Expand Down
2 changes: 0 additions & 2 deletions lib/dnsimple/client/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def services(options = {})

Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Service.new(r) })
end
alias list services
alias list_services services

# Lists ALL the available one-click services.
Expand All @@ -55,7 +54,6 @@ def services(options = {})
def all_services(options = {})
paginate(:services, options)
end
alias all all_services

# Gets the service with specified ID.
#
Expand Down
3 changes: 0 additions & 3 deletions lib/dnsimple/client/webhooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def webhooks(account_id, options = {})

Dnsimple::CollectionResponse.new(response, response["data"].map { |r| Struct::Webhook.new(r) })
end
alias list webhooks
alias list_webhooks webhooks

# Creates a webhook in the account.
Expand All @@ -47,7 +46,6 @@ def create_webhook(account_id, attributes, options = {})

Dnsimple::Response.new(response, Struct::Webhook.new(response["data"]))
end
alias create create_webhook

# Gets a webhook from the account.
#
Expand Down Expand Up @@ -84,7 +82,6 @@ def delete_webhook(account_id, webhook_id, options = {})

Dnsimple::Response.new(response, nil)
end
alias delete delete_webhook

end
end
Expand Down
1 change: 0 additions & 1 deletion lib/dnsimple/client/zones.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def zones(account_id, options = {})

Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Zone.new(r) })
end
alias list zones
alias list_zones zones

# Lists ALL the zones in the account.
Expand Down
3 changes: 2 additions & 1 deletion lib/dnsimple/client/zones_records.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ module ZonesRecords
#
# @raise [Dnsimple::NotFoundError]
# @raise [Dnsimple::RequestError]
def list_zone_records(account_id, zone_id, options = {})
def zone_records(account_id, zone_id, options = {})
response = client.get(Client.versioned("/%s/zones/%s/records" % [account_id, zone_id]), Options::ListOptions.new(options))

Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::ZoneRecord.new(r) })
end
alias list_zone_records zone_records

# Lists ALL the zone records in the account.
#
Expand Down

0 comments on commit 7093679

Please sign in to comment.