Skip to content
MEWS API client library
Go Makefile
Branch: master
Clone or download
Pull request Compare This branch is 17 commits ahead, 4 commits behind tim-online:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
accountingcategories
accountingitems
bills
businesssegments
commands
companies
configuration
creditcards
customers
departments
events
json
orders
outletitems
reservations
services
spaceblocks
spaces
tasks
Makefile
README.md
client.go
client_test.go
go.mod
go.sum

README.md

Go Mews API client

go-mews is an API client library for accessing the Mews API v1.

API documentation can be found here: https://mews-systems.gitbook.io/connector-api/

Usage

import "github.com/mobmax/go-mews"

Request companies

// get token
token := os.Getenv("MEWS_TOKEN")

// build client
client := mews.NewClient(nil, token)
client.SetDebug(true)

// request all accounting categories
requestBody := &accountingcategories.AllRequest{}
resp, err := client.AccountingCategories.All(requestBody)
if err != nil {
	panic(err)
}

categories := resp.AccountingCategories

Request all employees for a company

import "github.com/mobmax/go-nmbrs/employees"

// get id of company
companyID := companies[0].ID

// request all employees for this company ID
resp2, err := client.Employees.ListByCompany(companyID, employees.All)
if err != nil {
	panic(err)
}
You can’t perform that action at this time.