class ScalewayDDNS::Request

Defined in:

scaleway_ddns/request.cr

Constant Summary

ADDRESS_RECORD_TYPES = ["A", "AAAA"] of ::String

Address record types handled by the updater.

DEFAULT_TTL = 60

Time to live used when the API does not report one.

RECORD_PAGE_SIZE = 100

Number of records asked per page, the maximum allowed by the Scaleway API.

SCW_API_HOST = "api.scaleway.com"

Constructors

Instance Method Summary

Constructor Detail

def self.new(scw_secret_key : String) #

[View source]

Instance Method Detail

def address_record_list(domain : String, types : Array(String) = ADDRESS_RECORD_TYPES) : Array(AddressRecord) #

Get a list of A and AAAA records from the Scaleway API for a given domain.


[View source]
def update_address_record(domain : String, ip : String, record : AddressRecord, record_type : String) : JSON::Any #

Update an address record (A or AAAA) in the Scaleway API for a given domain.


[View source]