Documentation
¶
Index ¶
- Constants
- func AddTransaction(token string, tx *TransactionParameters) (bool, error)
- func Login(username, password string) (string, error)
- func UploadStatement(token string, stmt *StatementParameters) (float64, error)
- type Account
- type AccountsResponse
- type AccountsResponseRoot
- type AddTransactionParameters
- type AddTransactionResponse
- type AddTransactionResponseRoot
- type Budget
- type BudgetsResponse
- type BudgetsResponseRoot
- type Contact
- type ContactsResponse
- type ContactsResponseRoot
- type Group
- type GroupMember
- type GroupsResponse
- type GroupsResponseRoot
- type Loan
- type LoansResponse
- type LoansResponseRoot
- type LoginResponse
- type LoginResponseRoot
- type Reminder
- type RemindersResponse
- type RemindersResponseRoot
- type StatementParameters
- type Tag
- type TagsResponse
- type TagsResponseRoot
- type Transaction
- type TransactionsParameters
- type TransactionsResponse
- type TransactionsResponseRoot
- type UploadStatementResponse
- type UploadStatementResponseRoot
Constants ¶
View Source
const ( API_LOGIN_URL = "https://www.buxfer.com/api/login?userid=%s&password=%s" API_ENDPOINT_URL = "https://www.buxfer.com/api/%s?token=%s" )
Variables ¶
This section is empty.
Functions ¶
func AddTransaction ¶
func UploadStatement ¶
func UploadStatement(token string, stmt *StatementParameters) (float64, error)
Types ¶
type Account ¶
type Account struct {
ID int `json:"id"`
Name string `json:"name"`
Bank string `json:"bank"`
Balance float64 `json:"balance"`
Currency string `json:"currency"`
LastSynced time.Time `json:"lastsynced"`
}
func GetAccounts ¶
type AccountsResponse ¶
type AccountsResponseRoot ¶
type AccountsResponseRoot struct {
Response AccountsResponse `json:"response"`
}
type AddTransactionParameters ¶
type AddTransactionParameters struct {
Description string
Amount float64
AccountID string
FromAccountID string
ToAccountID string
Date time.Time // YYYY-MM-DD
Tags string // comma-separated
Type string // income, expense, transfer, refund, sharedBill, paidForFriend, loan
Status string // cleared, pending
// type=sharedBill only
Payers []Payer
IsEvenSplit bool
// type=loan only
LoanedBy string
BorrowedBy string
// type=paidForFriend only
PaidBy string
PaidFor string
}
type AddTransactionResponse ¶
type AddTransactionResponseRoot ¶
type AddTransactionResponseRoot struct {
Response AddTransactionResponse `json:"response"`
}
type Budget ¶
type Budget struct {
ID string `json:"id"`
Name string `json:"name"`
Limit string `json:"limit"`
Remaining float64 `json:"remaining"`
Period string `json:"period"`
CurrentPeriod string `json:"currentPeriod"`
Tags string `json:"tags"`
Keywords []string `json:"keywords"`
}
func GetBudgets ¶
type BudgetsResponse ¶
type BudgetsResponseRoot ¶
type BudgetsResponseRoot struct {
Response BudgetsResponse `json:"response"`
}
type Contact ¶
type Contact struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Balance float64 `json:"balance"`
}
func GetContacts ¶
type ContactsResponse ¶
type ContactsResponseRoot ¶
type ContactsResponseRoot struct {
Response ContactsResponse `json:"response"`
}
type Group ¶
type Group struct {
ID string `json:"id"`
Name string `json:"name"`
Consolidated bool `json:"consolidated"`
Members []GroupMember `json:"members"`
}
type GroupMember ¶
type GroupsResponse ¶
type GroupsResponseRoot ¶
type GroupsResponseRoot struct {
Response GroupsResponse `json:"response"`
}
type Loan ¶
type LoansResponse ¶
type LoansResponseRoot ¶
type LoansResponseRoot struct {
Response LoansResponse `json:"response"`
}
type LoginResponse ¶
type LoginResponseRoot ¶
type LoginResponseRoot struct {
Response LoginResponse `json:"response"`
}
type Reminder ¶
type Reminder struct {
ID string `json:"id"`
Name string `json:"name"`
StartDate string `json:"startDate"`
Period string `json:"period"`
Amount float64 `json:"amount"`
AccountID string `json:"accountId"`
}
func GetReminders ¶
type RemindersResponse ¶
type RemindersResponseRoot ¶
type RemindersResponseRoot struct {
Response RemindersResponse `json:"response"`
}
type StatementParameters ¶
type Tag ¶
type TagsResponse ¶
type TagsResponseRoot ¶
type TagsResponseRoot struct {
Response TagsResponse `json:"response"`
}
type Transaction ¶
type TransactionsParameters ¶
type TransactionsParameters struct {
AccountID string `json:"accountId,omitempty"`
AccountName string `json:"accountName,omitempty"`
BudgetID string `json:"budgetId,omitempty"`
BudgetName string `json:"budgetName,omitempty"`
ContactID string `json:"contactId,omitempty"`
ContactName string `json:"contactName,omitempty"`
EndDate time.Time `json:"endDate,omitempty"`
GroupID string `json:"groupId,omitempty"`
GroupName string `json:"groupName,omitempty"`
Month time.Time `json:"month,omitempty"`
StartDate time.Time `json:"startDate,omitempty"`
TagID string `json:"tagId,omitempty"`
TagName string `json:"tagName,omitempty"`
}
type TransactionsResponse ¶
type TransactionsResponse struct {
Status string `json:"status"`
NumTransactions int `json:"numTransactions"`
Transactions []Transaction `json:"transactions"`
}
type TransactionsResponseRoot ¶
type TransactionsResponseRoot struct {
Response TransactionsResponse `json:"response"`
}
type UploadStatementResponse ¶
type UploadStatementResponseRoot ¶
type UploadStatementResponseRoot struct {
Response UploadStatementResponse `json:"response"`
}
Click to show internal directories.
Click to hide internal directories.