# README
Go API client for goclient
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 0.0.1
- Package version: 1.0.0
- Generator version: 7.10.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import goclient "github.com/GIT_USER_ID/GIT_REPO_ID"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Configuration of Server URL
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
Select Server Configuration
For using other server than the one defined on index 0 set context value goclient.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), goclient.ContextServerIndex, 1)
Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value goclient.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), goclient.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using goclient.ContextOperationServerIndices
and goclient.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), goclient.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), goclient.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
AccountsAPI | CreateAccount | Post /v1/accounts | create new account |
AccountsAPI | DeleteAccount | Delete /v1/accounts/{id} | delete account |
AccountsAPI | GetAccount | Get /v1/accounts/{id} | get account |
AccountsAPI | GetAccountHistory | Get /v1/accounts/{accountId}/history | return list of dates when this account was used in some transaction |
AccountsAPI | GetAccounts | Get /v1/accounts | get all accounts |
AccountsAPI | UpdateAccount | Put /v1/accounts/{id} | update account |
AggregationsAPI | GetBalances | Get /v1/balances | get balance for filtered transactions |
AggregationsAPI | GetExpenses | Get /v1/expenses | get expenses for filtered transactions |
AggregationsAPI | GetIncomes | Get /v1/incomes | get incomes for filtered transactions |
AuthAPI | Authorize | Post /v1/authorize | validate user/password and return token |
BankImportersAPI | CreateBankImporter | Post /v1/bankImporters | create new bank importer |
BankImportersAPI | DeleteBankImporter | Delete /v1/bankImporters/{id} | delete bank importer |
BankImportersAPI | FetchBankImporter | Post /v1/bankImporters/{id}/fetch | fetch new transactions from bank |
BankImportersAPI | GetBankImporters | Get /v1/bankImporters | get all bank importers |
BankImportersAPI | UpdateBankImporter | Put /v1/bankImporters/{id} | update bank importer |
BankImportersAPI | UploadBankImporter | Post /v1/bankImporters/{id}/upload | Upload new transactions from bank |
CurrenciesAPI | CreateCurrency | Post /v1/currencies | create new currency |
CurrenciesAPI | DeleteCurrency | Delete /v1/currencies/{id} | delete currency |
CurrenciesAPI | GetCurrencies | Get /v1/currencies | get all currencies |
CurrenciesAPI | UpdateCurrency | Put /v1/currencies/{id} | update currency |
ExportAPI | Export | Post /v1/export | Download full user's data |
ImportAPI | CallImport | Post /v1/import | Upload and import full user's data |
MatchersAPI | CheckMatcher | Post /v1/matchers/check | check if passed matcher matches given transaction |
MatchersAPI | CreateMatcher | Post /v1/matchers | create new matcher |
MatchersAPI | DeleteMatcher | Delete /v1/matchers/{id} | delete matcher |
MatchersAPI | GetMatchers | Get /v1/matchers | get all matchers |
MatchersAPI | UpdateMatcher | Put /v1/matchers/{id} | update matcher |
NotificationsAPI | DeleteNotification | Delete /v1/notifications/{id} | delete notification |
NotificationsAPI | GetNotifications | Get /v1/notifications | return all notifications |
TransactionsAPI | CreateTransaction | Post /v1/transactions | create new transaction |
TransactionsAPI | DeleteTransaction | Delete /v1/transactions/{id} | delete transaction |
TransactionsAPI | GetTransaction | Get /v1/transactions/{id} | get transaction |
TransactionsAPI | GetTransactions | Get /v1/transactions | get all transactions which matches given filters |
TransactionsAPI | UpdateTransaction | Put /v1/transactions/{id} | update transaction |
UnprocessedTransactionsAPI | ConvertUnprocessedTransaction | Post /v1/unprocessedTransactions/{id}/convert | convert unprocessed transactions into normal transaction |
UnprocessedTransactionsAPI | DeleteUnprocessedTransaction | Delete /v1/unprocessedTransactions/{id} | delete unprocessed transaction |
UnprocessedTransactionsAPI | GetUnprocessedTransactions | Get /v1/unprocessedTransactions | get all unprocessed transactions |
UserAPI | GetUser | Get /v1/user | return user object |
Documentation For Models
- Account
- AccountAggregation
- AccountNoID
- Aggregation
- AuthData
- Authorize200Response
- BankAccountInfo
- BankAccountInfoBalancesInner
- BankImporter
- BankImporterNoID
- BankImporterNoIDMappingsInner
- CheckMatcher200Response
- CheckMatcherRequest
- Currency
- CurrencyAggregation
- CurrencyNoID
- Entity
- ImportResult
- Matcher
- MatcherAndTransaction
- MatcherNoID
- Movement
- Notification
- Transaction
- TransactionNoID
- UnprocessedTransaction
- User
- WholeUserData
Documentation For Authorization
Authentication schemes defined for the API:
BearerAuth
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), goclient.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime