Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultPage = 1 DefaultLimit = 100 )
View Source
var BaseURL = "https://api.givebriq.com/v0"
View Source
var ( Client = http.Client{ Timeout: 10 * time.Second, } )
Functions ¶
This section is empty.
Types ¶
type Briq ¶
func (Briq) DoTransaction ¶
func (b Briq) DoTransaction(t TransactionInput) TransactionResponse
func (Briq) Transactions ¶
func (b Briq) Transactions(p Pagination) TransactionsResponse
func (Briq) Users ¶
func (b Briq) Users(p Pagination) UsersResponse
type Link ¶
type Link struct {
First *Pagination
Last *Pagination
Previous *Pagination
Next *Pagination
}
func (Link) HasPrevious ¶
type Organization ¶
type Pagination ¶
func Page ¶
func Page(i ...int) Pagination
type Transaction ¶
type Transaction struct {
ID string `json:"id"`
From string `json:"from"`
To string `json:"to"`
Amount int `json:"amount"`
App string `json:"app"`
Comment string `json:"comment"`
Reaction string `json:"reaction"`
ReactedAt string `json:"reactedAt"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ExpiredAt string `json:"expiredAt"`
OrganizationID string `json:"organization_id"`
UserFromID string `json:"user_from_id"`
UserToID string `json:"user_to_id"`
}
type TransactionInput ¶
type TransactionResponse ¶
type TransactionResponse struct {
Response
Transaction *Transaction
}
type TransactionsResponse ¶
type TransactionsResponse struct {
Response
Transactions []Transaction
}
type User ¶
type User struct {
ID string `json:"id"`
Email string `json:"email"`
Image string `json:"image"`
OrganizationID string `json:"organization_id"`
DisplayName string `json:"displayName"`
Role string `json:"role"`
CreatedAt string `json:"created_at"`
Username string `json:"username"`
ExternalRef string `json:"externalRef"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
ActiveBalance int `json:"activeBalance"`
InactiveBalance int `json:"inactiveBalance"`
}
type UsersResponse ¶
Click to show internal directories.
Click to hide internal directories.