API client library for omg.lol written in Go
Warning The omg.lol API is still in development, and endpoints are subject to change. This may cause the client to break unexpectedly.
To install this module:
go get github.com/ejstreet/omglol-client-go@latest
To import:
import (
"github.com/ejstreet/omglol-client-go/omglol"
)
Create a new client:
c, err := omglol.NewClient(email, api_key)
Use a method:
a, err := c.GetAccountInfo()
See test files for further examples.
To run tests, first export the following variables:
export OMGLOL_API_KEY=<your_api_key>
export OMGLOL_USER_EMAIL=<your_email>
export OMGLOL_USERNAME=<your_name>
export OMGLOL_TEST_OWNED_DOMAIN=<your_domain>
Then run from the root of the git repo:
go test ./... -v
This project is a work-in-progress, see the following table for supported features:
Resource | Sub-Resource | Method | Supported |
---|---|---|---|
Account | Info | GET | ✔️ |
Addresses | GET | ✔️ | |
Name | GET | ✔️ | |
POST | ✔️ | ||
Sessions | GET | ✔️ | |
DELETE | ✔️ | ||
Settings | GET | ✔️ | |
POST | ✔️ | ||
Address | Availability | GET | ✔️ |
Expiration | GET | ✔️ | |
Info | GET | ✔️ | |
Directory | List | GET | ✔️ |
DNS | ListRecords | GET | ✔️ |
FilterRecord* | GET | ✔️ | |
Create | POST | ✔️ | |
Update | PATCH | ✔️ | |
Delete | DELETE | ✔️ | |
Retrieve | GET | ✔️ | |
Set | POST | ✔️ | |
Now | Retrieve | GET | ✔️ |
Garden | GET | ✔️ | |
Update | POST | ✔️ | |
PURL | List | GET | ✔️ |
Retrieve | GET | ✔️ | |
Create | POST | ✔️ | |
Delete | DELETE | ✔️ | |
Paste | List | GET | ✔️ |
Retrieve | GET | ✔️ | |
Create | POST | ✔️ | |
Delete | DELETE | ✔️ | |
Web | Retrieve | GET | ✔️ |
Update | POST | ✔️ | |
Service | Info | GET | ✔️ |
Note Features marked with a * are additional to what the API provides