labstack

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2019 License: MIT Imports: 7 Imported by: 1

README

Go Client

Installation

go get github.com/labstack/labstack-go

Quick Start

Sign up to get an API key

Create a file app.go with the following content:

package main

import (
	"fmt"

	"github.com/labstack/labstack-go"
)

func main() {
  client := labstack.NewClient("<API_KEY>")
  geocode := client.Geocode()
  res, err := geocode.Address("eiffel tower")
  if err != nil {
    fmt.Println(err)
  } else {
    fmt.Printf("%+v", res)
  }
}

From terminal run your app:

go run app.go

Docs | Forum

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v1.0.1

func NewClient(key string) *Client

func (*Client) Currency added in v1.0.1

func (c *Client) Currency() *CurrencyService

func (*Client) Domain added in v1.0.1

func (c *Client) Domain() *DomainService

func (*Client) Email added in v1.0.1

func (c *Client) Email() *EmailService

func (*Client) IP added in v1.0.1

func (c *Client) IP() *IPService

func (*Client) Webpage added in v1.0.1

func (c *Client) Webpage() *WebpageService

type CurrencyService added in v1.0.1

type CurrencyService struct {
	// contains filtered or unexported fields
}

func (*CurrencyService) Convert added in v1.0.1

func (*CurrencyService) List added in v1.0.1

func (*CurrencyService) Rates added in v1.0.2

type DomainService added in v1.0.1

type DomainService struct {
	// contains filtered or unexported fields
}

func (*DomainService) DNS added in v1.0.1

func (*DomainService) Search added in v1.0.1

func (*DomainService) Status added in v1.0.1

func (*DomainService) Whois added in v1.0.1

type EmailService added in v1.0.1

type EmailService struct {
	// contains filtered or unexported fields
}

func (*EmailService) Verify added in v1.0.1

type Error

type Error struct {
	StatusCode int    `json:"status_code"`
	Code       int    `json:"code"`
	Message    string `json:"message"`
}

func (*Error) Error

func (e *Error) Error() string

type IPService added in v1.0.1

type IPService struct {
	// contains filtered or unexported fields
}

func (*IPService) Lookup added in v1.0.1

func (i *IPService) Lookup(req *ip.LookupRequest) (*ip.LookupResponse, error)

type WebpageService added in v1.0.1

type WebpageService struct {
	// contains filtered or unexported fields
}

func (*WebpageService) Image added in v1.0.1

func (*WebpageService) PDF added in v1.0.1

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL