Skip to content

ejstreet/omglol-client-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests GoDoc GitHub release (latest SemVer) GitHub go.mod Go version

omglol-client-go

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.

Usage

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.

Tests

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

Supported Features

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 ✔️
Email 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