richardpiazza/dynurest
A Dynu.com IP Update API wrapper.
Usage
The DynuIPUpdater shared instance allows for sending IP information to the Dynu.com API.
let address = IPAddress.ipV4("X.X.X.X")
let response = try await DynuIPUpdater.shared.updateAddress(address, using: .basic("username", "password"))IP address information can be obtained through any means, but DynuREST has two built-in providers:
IPifyClient.sharedIFConfigClient.shared
These both implement the IPSource protocol:
public protocol IPSource {
func ipAddress() async throws -> IPAddress
}DynuIPUpdater also contains a helper method which will automatically retrieve IP information from the built-in sources.
func requestIP(_ sources: [IPSource]) async -> [IPAddress]Package Metadata
Repository: richardpiazza/dynurest
Default branch: main
README: README.md