{"modulePath":"github.com/tripsyapp/cli","version":"v1.8.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Constants\n\n```go\nconst DefaultBaseURL = \"https://api.tripsy.app\"\n```\n\n## Types\n\n```go\ntype Client struct {\n\tBaseURL    string\n\tToken      string\n\tAuthScheme string\n\tHTTPClient *http.Client\n}\n```\n\n```go\nfunc NewClient(baseURL, token string) *Client\n```\n\n```go\nfunc (c *Client) Request(ctx context.Context, method, path string, query url.Values, body any) (*Response, error)\n```\n\n```go\nfunc (c *Client) RequestAllPages(ctx context.Context, method, path string, query url.Values, body any) (*Response, error)\n```\n\n```go\nfunc (c *Client) UploadFile(ctx context.Context, uploadURL string, headers map[string]string, filePath string) error\n```\n\n```go\ntype Error struct {\n\tStatusCode int\n\tData       any\n\tRaw        []byte\n}\n```\n\n```go\nfunc (e *Error) Error() string\n```\n\n```go\ntype Response struct {\n\tStatusCode int\n\tHeader     http.Header\n\tData       any\n\tRaw        []byte\n}\n```\n\n","path":"github.com/tripsyapp/cli/internal/api","name":"api","synopsis":"","isRedistributable":true}
