Documentation
¶
Overview ¶
Package api implements shared structures and behaviours of the API services
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DateFormat ¶
DateFormat creates a new string from a given api.Date formatted as dateLayout
Types ¶
type ClientReader ¶
ClientReader contract for a read only client
type ClientReaderWriter ¶
type ClientReaderWriter interface { ClientReader ClientWriter }
ClientReaderWriter contract for a read-write client
type ClientWriter ¶
type ClientWriter interface { POST(url string, responseModel interface{}, requestBody []byte) error PUT(url string, responseModel interface{}, requestBody []byte) error }
ClientWriter contract for a write only client
type Date ¶
Date represents a budget date
func DateFromString ¶
DateFromString creates a new Date from a given string date formatted as dateLayout
Example ¶
package main import ( "fmt" "go.bmvs.io/ynab/api" ) func main() { date, _ := api.DateFromString("2020-01-20") fmt.Println(date) }
Output: 2020-01-20 00:00:00 +0000 UTC
func (*Date) MarshalJSON ¶
MarshalJSON parses the expected format for a Date
func (*Date) UnmarshalJSON ¶
UnmarshalJSON parses the expected format for a Date
type RateLimit ¶
type RateLimit struct {
// contains filtered or unexported fields
}
RateLimit represents an API rate limit
func ParseRateLimit ¶
ParseRateLimit returns a *RateLimit for a given rate limit string
Example ¶
package main import ( "fmt" "go.bmvs.io/ynab/api" ) func main() { r, _ := api.ParseRateLimit("1/200") fmt.Println(r.Used()) }
Output: 1
Directories
¶
Path | Synopsis |
---|---|
Package account implements account entities and services
|
Package account implements account entities and services |
Package budget implements budget entities and services
|
Package budget implements budget entities and services |
Package category implements category entities and services
|
Package category implements category entities and services |
Package month implements month entities and services
|
Package month implements month entities and services |
Package payee implements payee entities and services
|
Package payee implements payee entities and services |
Package transaction implements transaction entities and services
|
Package transaction implements transaction entities and services |
Package user implements transaction user and services
|
Package user implements transaction user and services |