Documentation
¶
Overview ¶
Package wave is a client library for accessing the Wave API (https://developer.waveapps.com).
This library attempts to follow the structure of the Wave API -- you should read the documentation such that you're familiar with how things are laid out: http://docs.waveapps.com/
Installation ¶
wave requires Go version 1.2 or greater. To download, build and install wave, run:
go get github.com/NickPresta/gowave/wave
Getting Started ¶
Import wave into your source:
import ( "github.com/NickPresta/gowave/wave" )
You will need to create a new Wave client, which will allow you to make requests on behalf of a user. The wave package does not handle authentication and requires you to provide an http.Client that can handle appropriate authentication.
t := &oauth.Transport{
Token: &oauth.Token{AccessToken: "... your access token ..."},
}
client := wave.NewClient(t.Client())
Creating and Updating Resources ¶
All structs in this library use pointer values so that there is differentiation between an unset value and a zero value. This also allows the same structs to be encoded and decoded without having to learn two different data types. Helper methods are provided to create pointer values for string, int, float64, and bool:
product := &wave.Product{
Name: wave.String("Widgets"),
Price: wave.Float64(42.34),
IsSold: wave.Bool(true),
}
client.Products.Create(bID, product)
Optional Parameters ¶
Some endpoints take optional parameters -- usually LIST and GET methods. For example, with Products, you can choose to embed the accounts directly in the Product resource. Optional parameters are passed as a pointer to a struct. If you do not wish to pass any options and want to take the API defaults, set the options struct to nil in the function argument. If you do not wish to pass a specific option, you may omit it entirely from the struct. For example:
client.Products.List(bID, &wave.ProductListOptions{EmbedAccounts: true})
Pagination ¶
Pagination options are passed in the optional parameters:
options = &wave.ProductListOptions{PageOptions: wave.PageOptions{Page: 5, PageSize: 10}}
client.Products.List(bID, options)
Again, omitting the PageOptions struct will not send any pagination parameters.
Examples ¶
Fetch all Accounts for a given Business:
accounts, resp, err := client.Accounts.List(businessID)
if err != nil {
panic(err)
}
// Do something with accounts
for account := range accounts {
fmt.Println(*account.Name)
}
// The resp.Body still exists to be read, if you wanted to do further
// processing or something
io.Copy(os.Stdout, resp.Response.Body)
Create a Business:
b := &Business{
CompanyName: "My New Business",
PrimaryCurrencyCode: "CAD",
BusinessTypeInfo: &BusinessTypeInfo{
BusinessType: String("consultants_professionals"),
BusinessSubtype: String("consultants_professionals__communications"),
OrganizationType: String("partnership"),
},
Address: &Address{
Country: &Country{
CountryCode: "CA",
},
},
}
business, _, err = client.Businesses.Create(b)
// Do something with business
Delete a Customer
resp, err := client.Customers.Delete(businessID, customerID)
if err == nil {
// Customer deleted. Success!
}
Index ¶
- func Bool(v bool) *bool
- func CheckResponse(resp *http.Response) error
- func Float64(v float64) *float64
- func Int(v int) *int
- func String(v string) *string
- type Account
- type AccountsService
- func (service *AccountsService) Create(businessID string, account *Account) (*Account, *Response, error)
- func (service *AccountsService) Delete(businessID string, accountID uint64) (*Response, error)
- func (service *AccountsService) Get(businessID string, accountID uint64) (*Account, *Response, error)
- func (service *AccountsService) List(businessID string) ([]Account, *Response, error)
- func (service *AccountsService) Replace(businessID string, accountID uint64, account *Account) (*Account, *Response, error)
- func (service *AccountsService) Update(businessID string, accountID uint64, account *Account) (*Account, *Response, error)
- type Address
- type Business
- type BusinessListOptions
- type BusinessTypeInfo
- type BusinessesService
- func (service *BusinessesService) Create(business *Business) (*Business, *Response, error)
- func (service *BusinessesService) Get(id string) (*Business, *Response, error)
- func (service *BusinessesService) List(opts *BusinessListOptions) ([]Business, *Response, error)
- func (service *BusinessesService) Replace(id string, business *Business) (*Business, *Response, error)
- func (service *BusinessesService) Update(id string, business *Business) (*Business, *Response, error)
- type Client
- type CountriesService
- type Country
- type CurrenciesService
- type Currency
- type Customer
- type CustomerListOptions
- type CustomersService
- func (service *CustomersService) Create(businessID string, customer *Customer) (*Customer, *Response, error)
- func (service *CustomersService) Delete(businessID string, customerID uint64) (*Response, error)
- func (service *CustomersService) Get(businessID string, customerID uint64) (*Customer, *Response, error)
- func (service *CustomersService) List(businessID string, opts *CustomerListOptions) ([]Customer, *Response, error)
- func (service *CustomersService) Replace(businessID string, customerID uint64, customer *Customer) (*Customer, *Response, error)
- func (service *CustomersService) Update(businessID string, customerID uint64, customer *Customer) (*Customer, *Response, error)
- type Date
- type DateTime
- type ErrorResponse
- type PageOptions
- type Product
- type ProductGetOptions
- type ProductListOptions
- type ProductsService
- func (service *ProductsService) Create(businessID string, product *Product) (*Product, *Response, error)
- func (service *ProductsService) Delete(businessID string, productID uint64) (*Response, error)
- func (service *ProductsService) Get(businessID string, productID uint64, opts *ProductGetOptions) (*Product, *Response, error)
- func (service *ProductsService) List(businessID string, opts *ProductListOptions) ([]Product, *Response, error)
- func (service *ProductsService) Replace(businessID string, productID uint64, product *Product) (*Product, *Response, error)
- func (service *ProductsService) Update(businessID string, productID uint64, product *Product) (*Product, *Response, error)
- type Province
- type Response
- type ShippingDetails
- type User
- type UsersService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored.
func Float64 ¶
Float64 is a helper method that allocates a new float64 value and returns a pointer to it.
Types ¶
type Account ¶
type Account struct {
ID *int `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
Name *string `json:"name,omitempty"`
Active *bool `json:"active,omitempty"`
AccountClass *string `json:"account_class,omitempty"`
AccountType *string `json:"account_type,omitempty"`
StandardAccountNumber *int `json:"standard_account_number,omitempty"`
AccountTemplateID *int `json:"account_template_id,omitempty"`
AccountNumber *int `json:"account_number,omitempty"`
IsPayment *bool `json:"is_payment,omitempty"`
CanDelete *bool `json:"can_delete,omitempty"`
Currency *Currency `json:"currency,omitempty"`
IsCurrencyEditable *bool `json:"is_currency_editable,omitempty"`
IsNameEditable *bool `json:"is_name_editable,omitempty"`
IsPaymentEditable *bool `json:"is_payment_editable,omitempty"`
DateCreated *DateTime `json:"date_created,omitempty"`
DateModified *DateTime `json:"date_modified,omitempty"`
}
Account represents a Wave business.
type AccountsService ¶
type AccountsService struct {
// contains filtered or unexported fields
}
AccountsService handles communication with the acccounts related methods of the Wave API.
Wave API docs: http://docs.waveapps.com/endpoints/accounts.html
func (*AccountsService) Create ¶
func (service *AccountsService) Create(businessID string, account *Account) (*Account, *Response, error)
Create a new account according to a standard account template.
Wave API docs: http://docs.waveapps.com/endpoints/businesses.html#post--businesses-
func (*AccountsService) Delete ¶
func (service *AccountsService) Delete(businessID string, accountID uint64) (*Response, error)
Delete an existing account. The `can_delete` attribute of an account determines if it can be deleted.
Wave API docs: http://docs.waveapps.com/endpoints/accounts.html#delete--businesses-{business_id}-accounts-{account_id}-
func (*AccountsService) Get ¶
func (service *AccountsService) Get(businessID string, accountID uint64) (*Account, *Response, error)
Get an existing account for a given business.
Wave API docs: http://docs.waveapps.com/endpoints/accounts.html#get--businesses-{business_id}-accounts-{account_id}-
func (*AccountsService) List ¶
func (service *AccountsService) List(businessID string) ([]Account, *Response, error)
List all accounts for a given business.
Wave API docs: http://docs.waveapps.com/endpoints/accounts.html#get--businesses-{business_id}-accounts-
func (*AccountsService) Replace ¶
func (service *AccountsService) Replace(businessID string, accountID uint64, account *Account) (*Account, *Response, error)
Replace an existing account. You cannot create an account using this method.
Wave API docs: http://docs.waveapps.com/endpoints/accounts.html#put--businesses-{business_id}-accounts-{account_id}-
func (*AccountsService) Update ¶
func (service *AccountsService) Update(businessID string, accountID uint64, account *Account) (*Account, *Response, error)
Update an existing account. You cannot create an account using this method.
Wave API docs: http://docs.waveapps.com/endpoints/accounts.html#patch--businesses-{business_id}-accounts-{account_id}-
type Address ¶
type Address struct {
Address1 *string `json:"address1,omitempty"`
Address2 *string `json:"address2,omitempty"`
City *string `json:"city,omitempty"`
Province *Province `json:"province,omitempty"`
Country *Country `json:"country,omitempty"`
PostalCode *string `json:"postal_code,omitempty"`
}
Address represents an address associated with a Wave Customer or Business.
type Business ¶
type Business struct {
ID *string `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
CompanyName *string `json:"company_name,omitempty"`
PrimaryCurrencyCode *string `json:"primary_currency_code,omitempty"`
BusinessType *string `json:"business_type,omitempty"`
BusinessSubtype *string `json:"business_subtype,omitempty"`
OrganizationType *string `json:"organization_type,omitempty"`
Address1 *string `json:"address1,omitempty"`
Address2 *string `json:"address2,omitempty"`
City *string `json:"city,omitempty"`
Province *Province `json:"province,omitempty"`
Country *Country `json:"country,omitempty"`
PostalCode *string `json:"postal_code,omitempty"`
PhoneNumber *string `json:"phone_number,omitempty"`
MobilePhoneNumber *string `json:"mobile_phone_number,omitempty"`
TollFreePhoneNumber *string `json:"toll_free_phone_number,omitempty"`
FaxNumber *string `json:"fax_number,omitempty"`
Website *string `json:"website,omitempty"`
DateCreated *DateTime `json:"date_created,omitempty"`
DateModified *DateTime `json:"date_modified,omitempty"`
}
Business represents a Wave business.
type BusinessListOptions ¶
type BusinessListOptions struct {
PageOptions
}
BusinessListOptions specifies the optional parameters to the LIST endpoint
type BusinessTypeInfo ¶
type BusinessTypeInfo struct {
}
BusinessTypeInfo represents the type of Wave business.
type BusinessesService ¶
type BusinessesService struct {
// contains filtered or unexported fields
}
BusinessesService handles communication with the business related methods of the Wave API.
Wave API docs: http://docs.waveapps.com/endpoints/businesses.html
func (*BusinessesService) Create ¶
func (service *BusinessesService) Create(business *Business) (*Business, *Response, error)
Create a new business
Wave API docs: http://docs.waveapps.com/endpoints/businesses.html#post--businesses-
func (*BusinessesService) Get ¶
func (service *BusinessesService) Get(id string) (*Business, *Response, error)
Get an existing business.
Wave API docs: http://docs.waveapps.com/endpoints/businesses.html#get--businesses-(identity_business_id)-
func (*BusinessesService) List ¶
func (service *BusinessesService) List(opts *BusinessListOptions) ([]Business, *Response, error)
List all businesses owned by the authenticated user.
Wave API docs: http://docs.waveapps.com/endpoints/businesses.html#get--businesses-
func (*BusinessesService) Replace ¶
func (service *BusinessesService) Replace(id string, business *Business) (*Business, *Response, error)
Replace an existing business. You cannot create a business using this method.
Wave API docs: http://docs.waveapps.com/endpoints/businesses.html#put--businesses-(identity_business_id)-
func (*BusinessesService) Update ¶
func (service *BusinessesService) Update(id string, business *Business) (*Business, *Response, error)
Update an existing business. You cannot create a business using this method.
Wave API docs: http://docs.waveapps.com/endpoints/businesses.html#patch--businesses-(identity_business_id)-
type Client ¶
type Client struct {
// Base URL for API requests. Defaults to the Wave API.
// BaseURL should always be specified with a trailing slash.
BaseURL *url.URL
// User agent used when communicating with the Wave API.
UserAgent string
// Services used to communicate with different parts of the Wave API
Accounts *AccountsService
Businesses *BusinessesService
Countries *CountriesService
Currencies *CurrenciesService
Customers *CustomersService
Products *ProductsService
Users *UsersService
// contains filtered or unexported fields
}
Client used to interact with the Wave API.
func NewClient ¶
NewClient returns a new Wave API client. If a nil httpClient is provided, http.DefaultClient will be used. To use API methods which require authentication, provide an http.Client that will perform the authentication for you (such as that provided by the goauth2 library).
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is decoded and stored in the value pointed to by v, or returned as an error if an API error has occured.
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type CountriesService ¶
type CountriesService struct {
// contains filtered or unexported fields
}
CountriesService handles communication with the country related methods of the Wave API.
Wave API docs: http://docs.waveapps.com/endpoints/geography.html
func (*CountriesService) Get ¶
func (service *CountriesService) Get(code string) (*Country, *Response, error)
Get a specific currency.
Wave API docs: http://docs.waveapps.com/endpoints/geography.html#get--countries-(country_code)-
func (*CountriesService) List ¶
func (service *CountriesService) List() ([]Country, *Response, error)
List all countries available in Wave.
Wave API docs: http://docs.waveapps.com/endpoints/geography.html#get--countries-
type Country ¶
type Country struct {
Name *string `json:"name,omitempty"`
CountryCode *string `json:"country_code,omitempty"`
CurrencyCode *string `json:"currency_code,omitempty"`
Provinces []Province `json:"provinces,omitempty"`
URL *string `json:"url,omitempty"`
}
Country represents a country in ISO 3166-1 alpha-2 format (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
type CurrenciesService ¶
type CurrenciesService struct {
// contains filtered or unexported fields
}
CurrenciesService handles communication with the currency related methods of the Wave API.
Wave API docs: http://docs.waveapps.com/endpoints/currencies.html
func (*CurrenciesService) Get ¶
func (service *CurrenciesService) Get(code string) (*Currency, *Response, error)
Get a specific currency.
Wave API docs: http://docs.waveapps.com/endpoints/currencies.html#get--currencies-(code)-
func (*CurrenciesService) List ¶
func (service *CurrenciesService) List() ([]Currency, *Response, error)
List all currencies available in Wave.
Wave API docs: http://docs.waveapps.com/endpoints/currencies.html#get--currencies-
type Currency ¶
type Currency struct {
URL *string `json:"url,omitempty"`
Code *string `json:"code,omitempty"`
Symbol *string `json:"symbol,omitempty"`
Name *string `json:"name,omitempty"`
}
Currency represents a currency in ISO 4217 format (http://en.wikipedia.org/wiki/ISO_4217).
type Customer ¶
type Customer struct {
ID uint64 `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
AccountNumber *string `json:"account_number,omitempty"`
Name *string `json:"name,omitempty"`
FirstName *string `json:"first_name,omitempty"`
LastName *string `json:"last_name,omitempty"`
Email *string `json:"email,omitempty"`
FaxNumber *string `json:"fax_number,omitempty"`
MobileNumber *string `json:"mobile_number,omitempty"`
PhoneNumber *string `json:"phone_number,omitempty"`
TollFreeNumber *string `json:"toll_free_number,omitempty"`
Website *string `json:"website,omitempty"`
Currency *Currency `json:"currency,omitempty"`
ShippingDetails *ShippingDetails `json:"shipping_details,omitempty"`
DateCreated *DateTime `json:"date_created,omitempty"`
DateModified *DateTime `json:"date_modified,omitempty"`
*Address
}
Customer represents an entity associated with an invoice or transaction.
type CustomerListOptions ¶
type CustomerListOptions struct {
PageOptions
}
CustomerListOptions specifies the optional parameters to LIST endpoint.
type CustomersService ¶
type CustomersService struct {
// contains filtered or unexported fields
}
CustomersService handles communication with the customer related methods of the Wave API.
Wave API docs: http://docs.waveapps.com/endpoints/customers.html
func (*CustomersService) Create ¶
func (service *CustomersService) Create(businessID string, customer *Customer) (*Customer, *Response, error)
Create a new customer for a given business.
Wave API docs: http://docs.waveapps.com/endpoints/customers.html#post--businesses-{business_id}-customers-
func (*CustomersService) Delete ¶
func (service *CustomersService) Delete(businessID string, customerID uint64) (*Response, error)
Delete an existing Customer.
Wave API docs: http://docs.waveapps.com/endpoints/accounts.html#delete--businesses-{business_id}-accounts-{account_id}-
func (*CustomersService) Get ¶
func (service *CustomersService) Get(businessID string, customerID uint64) (*Customer, *Response, error)
Get an existing customer for a given business.
Wave API docs: http://docs.waveapps.com/endpoints/customers.html#get--businesses-{business_id}-customers-{customer_id}-
func (*CustomersService) List ¶
func (service *CustomersService) List(businessID string, opts *CustomerListOptions) ([]Customer, *Response, error)
List all customers for a given business.
Wave API docs: http://docs.waveapps.com/endpoints/customers.html#get--businesses-{business_id}-customers-
func (*CustomersService) Replace ¶
func (service *CustomersService) Replace(businessID string, customerID uint64, customer *Customer) (*Customer, *Response, error)
Replace an existing customer. You cannot create a customer using this method.
Wave API docs: http://docs.waveapps.com/endpoints/customers.html#put--businesses-{business_id}-customers-{customer_id}-
func (*CustomersService) Update ¶
func (service *CustomersService) Update(businessID string, customerID uint64, customer *Customer) (*Customer, *Response, error)
Update an existing customer. You cannot create a customer using this method.
Wave API docs: http://docs.waveapps.com/endpoints/customers.html#patch--businesses-{business_id}-customers-{customer_id}-
type Date ¶
Date represents a time that can be unmarshalled from a JSON string, formatted as ISO-8601 (2006-01-02)
func (Date) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface. Date will be formatted as ISO-8601.
func (*Date) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface. Date is expected to be in ISO-8601 format.
type DateTime ¶
DateTime represents a time that can be unmarshalled from a JSON string, formatted as ISO-8601 (2006-01-02T15:04:05+00:00)
func (DateTime) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface. DateTime will be formatted as ISO-8601.
func (*DateTime) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface. DateTime is expected to be in ISO-8601 format.
type ErrorResponse ¶
type ErrorResponse struct {
Response *http.Response
Err struct {
Message string `json:"message"`
} `json:"error"`
}
ErrorResponse represents a single error returned from the API.
func (*ErrorResponse) Error ¶
func (resp *ErrorResponse) Error() string
type PageOptions ¶
type PageOptions struct {
Page int `url:"page,omitempty"`
PageSize int `url:"page_size,omitempty"`
}
PageOptions specifies the pagination options for methods that support pagination (mostly LIST and GET options)
type Product ¶
type Product struct {
ID *uint64 `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
Name *string `json:"name,omitempty"`
Price *float64 `json:"price,omitempty"`
Description *string `json:"description,omitempty"`
IsSold *bool `json:"is_sold,omitempty"`
IsBought *bool `json:"is_bought,omitempty"`
IncomeAccount *Account `json:"income_account,omitempty"`
ExpenseAccount *Account `json:"expense_account,omitempty"`
DateCreated *DateTime `json:"date_created,omitempty"`
DateModified *DateTime `json:"date_modified,omitempty"`
}
Product represents an entity associated with an invoice or transaction.
type ProductGetOptions ¶
type ProductGetOptions struct {
// EmbedAccounts defaults to false
EmbedAccounts bool `url:"embed_accounts,omitempty"`
}
ProductGetOptions specifies the optional parameters to GET endpoint.
type ProductListOptions ¶
type ProductListOptions struct {
// ActiveOnly defaults to true
ActiveOnly bool `url:"active_only,omitempty"`
// EmbedAccounts defaults to false
EmbedAccounts bool `url:"embed_accounts,omitempty"`
PageOptions
}
ProductListOptions specifies the optional parameters to LIST endpoint.
type ProductsService ¶
type ProductsService struct {
// contains filtered or unexported fields
}
ProductsService handles communication with the product related methods of the Wave API.
Wave API docs: http://docs.waveapps.com/endpoints/products.html
func (*ProductsService) Create ¶
func (service *ProductsService) Create(businessID string, product *Product) (*Product, *Response, error)
Create a new product for a given business.
Wave API docs: http://docs.waveapps.com/endpoints/products.html#post--businesses-{business_id}-products-
func (*ProductsService) Delete ¶
func (service *ProductsService) Delete(businessID string, productID uint64) (*Response, error)
Delete an existing Product.
Wave API docs: http://docs.waveapps.com/endpoints/accounts.html#delete--businesses-{business_id}-accounts-{account_id}-
func (*ProductsService) Get ¶
func (service *ProductsService) Get(businessID string, productID uint64, opts *ProductGetOptions) (*Product, *Response, error)
Get an existing product for a given business.
Wave API docs: http://docs.waveapps.com/endpoints/products.html#get--businesses-{business_id}-products-{product_id}-
func (*ProductsService) List ¶
func (service *ProductsService) List(businessID string, opts *ProductListOptions) ([]Product, *Response, error)
List all products for a given business.
Wave API docs: http://docs.waveapps.com/endpoints/products.html#get--businesses-{business_id}-products-
func (*ProductsService) Replace ¶
func (service *ProductsService) Replace(businessID string, productID uint64, product *Product) (*Product, *Response, error)
Replace an existing product. You cannot create a product using this method.
Wave API docs: http://docs.waveapps.com/endpoints/products.html#put--businesses-{business_id}-products-{product_id}-
func (*ProductsService) Update ¶
func (service *ProductsService) Update(businessID string, productID uint64, product *Product) (*Product, *Response, error)
Update an existing product. You cannot create a product using this method.
Wave API docs: http://docs.waveapps.com/endpoints/products.html#patch--businesses-{business_id}-products-{product_id}-
type Response ¶
type Response struct {
NextPage int
PreviousPage int
FirstPage int
LastPage int
TotalCount int
*http.Response
}
Response is a Wave API response. This embeds the standard http.Response and provides pagination information.
type ShippingDetails ¶
type ShippingDetails struct {
ShipToContact *string `json:"ship_to_contact,omitempty"`
DeliveryInstructions *string `json:"delivery_instructions,omitempty"`
PhoneNumber *string `json:"phone_number,omitempty"`
Address *Address `json:"address,omitempty"`
}
ShippingDetails represents details for shipping for a given Customer.
type User ¶
type User struct {
ID *string `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
FirstName *string `json:"first_name,omitempty"`
LastName *string `json:"first_name,omitempty"`
DateCreated *DateTime `json:"date_created,omitempty"`
DateModified *DateTime `json:"date_modified,omitempty"`
LastLogin *DateTime `json:"last_login,omitempty"`
Emails []struct {
Email *string `json:"email,omitempty"`
IsVerified *bool `json:"is_verified,omitempty"`
IsDefault *bool `json:"is_default,omitempty"`
} `json:"emails,omitempty"`
Profile struct {
DateOfBirth *Date `json:"date_of_birth,omitempty"`
} `json:"profile,omitempty"`
Businesses []struct {
ID *string `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
} `json:"businesses,omitempty"`
}
User represents a Wave user.
type UsersService ¶
type UsersService struct {
// contains filtered or unexported fields
}
UsersService handles communication with the user related methods of the Wave API.
Wave API docs: http://docs.waveapps.com/endpoints/users.html
func (*UsersService) Get ¶
func (service *UsersService) Get() (*User, *Response, error)
Get a specific user. Accepts "current" to refer to the current user.
Wave API docs: http://docs.waveapps.com/endpoints/users.html#get--user-
func (*UsersService) Replace ¶
func (service *UsersService) Replace(user *User) (*User, *Response, error)
Replace an existing user. You cannot create a user using this method.
Wave API docs: http://docs.waveapps.com/endpoints/users.html#put--user-
func (*UsersService) Update ¶
func (service *UsersService) Update(user *User) (*User, *Response, error)
Update an existing user. You cannot create a user using this method.
Wave API docs: http://docs.waveapps.com/endpoints/users.html#patch--user-