client

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an HTTP client for the MoneyForward Accounting API.

func New

func New(baseURL string, ts TokenSource) *Client

New creates a new Client.

func (*Client) Get

func (c *Client) Get(ctx context.Context, path string, query url.Values) ([]byte, error)

Get performs a GET request to the given path with optional query parameters.

func (*Client) GetAllPages

func (c *Client) GetAllPages(ctx context.Context, path string, query url.Values, key string) ([]byte, error)

GetAllPages fetches all pages for a paginated endpoint and returns the combined items as a JSON array. key is the JSON field containing the items array (e.g. "accounts", "journals").

type TokenSource

type TokenSource interface {
	Token() (string, error)
	Refresh() (string, error)
}

TokenSource provides access tokens for API authentication.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL