labstack

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 1 Imported by: 2

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

func IsError

func IsError(status int) bool

Types

type Client

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

func New

func New(key string) *Client

type Error

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

func (*Error) Error

func (e *Error) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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