Bump version

This commit is contained in:
Illya Marchenko 2024-05-11 15:15:59 +03:00
parent 250d72604e
commit 04e92891e3
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F
10 changed files with 2787 additions and 2756 deletions

File diff suppressed because it is too large Load Diff

@ -1,8 +1,7 @@
/* /*
* Firefly III API v2.0.14 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.14 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
@ -12,12 +11,13 @@ package swagger
import ( import (
"context" "context"
"fmt"
"github.com/antihax/optional"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"os"
"strings" "strings"
"fmt"
"github.com/antihax/optional"
) )
// Linger please // Linger please
@ -26,9 +26,10 @@ var (
) )
type AttachmentsApiService service type AttachmentsApiService service
/* /*
AttachmentsApiService Delete an attachment. AttachmentsApiService Delete an attachment.
With this endpoint you delete an attachment, including any stored file data. With this endpoint you delete an attachment, including any stored file data.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id The ID of the single attachment. * @param id The ID of the single attachment.
* @param optional nil or *AttachmentsApiDeleteAttachmentOpts - Optional Parameters: * @param optional nil or *AttachmentsApiDeleteAttachmentOpts - Optional Parameters:
@ -37,7 +38,7 @@ With this endpoint you delete an attachment, including any stored file data.
*/ */
type AttachmentsApiDeleteAttachmentOpts struct { type AttachmentsApiDeleteAttachmentOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiDeleteAttachmentOpts) (*http.Response, error) { func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiDeleteAttachmentOpts) (*http.Response, error) {
@ -46,7 +47,6 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
// create path and map variables // create path and map variables
@ -93,60 +93,60 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
return localVarHttpResponse, err return localVarHttpResponse, err
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
} }
return localVarHttpResponse, nil return localVarHttpResponse, nil
} }
/* /*
AttachmentsApiService Download a single attachment. AttachmentsApiService Download a single attachment.
This endpoint allows you to download the binary content of a transaction. It will be sent to you as a download, using the content type \"application/octet-stream\" and content disposition \"attachment; filename=example.pdf\". This endpoint allows you to download the binary content of a transaction. It will be sent to you as a download, using the content type \"application/octet-stream\" and content disposition \"attachment; filename=example.pdf\".
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id The ID of the attachment. * @param id The ID of the attachment.
* @param optional nil or *AttachmentsApiDownloadAttachmentOpts - Optional Parameters: * @param optional nil or *AttachmentsApiDownloadAttachmentOpts - Optional Parameters:
@ -155,15 +155,15 @@ This endpoint allows you to download the binary content of a transaction. It wil
*/ */
type AttachmentsApiDownloadAttachmentOpts struct { type AttachmentsApiDownloadAttachmentOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiDownloadAttachmentOpts) (*os.File, *http.Response, error) { func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiDownloadAttachmentOpts) (*os.File, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue *os.File localVarReturnValue *os.File
) )
@ -213,75 +213,76 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v *os.File var v *os.File
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
AttachmentsApiService Get a single attachment. AttachmentsApiService Get a single attachment.
Get a single attachment. This endpoint only returns the available metadata for the attachment. Actual file data is handled in two other endpoints (see below). Get a single attachment. This endpoint only returns the available metadata for the attachment. Actual file data is handled in two other endpoints (see below).
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id The ID of the attachment. * @param id The ID of the attachment.
* @param optional nil or *AttachmentsApiGetAttachmentOpts - Optional Parameters: * @param optional nil or *AttachmentsApiGetAttachmentOpts - Optional Parameters:
@ -290,15 +291,15 @@ Get a single attachment. This endpoint only returns the available metadata for t
*/ */
type AttachmentsApiGetAttachmentOpts struct { type AttachmentsApiGetAttachmentOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiGetAttachmentOpts) (AttachmentSingle, *http.Response, error) { func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiGetAttachmentOpts) (AttachmentSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue AttachmentSingle localVarReturnValue AttachmentSingle
) )
@ -348,75 +349,76 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v AttachmentSingle var v AttachmentSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
AttachmentsApiService List all attachments. AttachmentsApiService List all attachments.
This endpoint lists all attachments. This endpoint lists all attachments.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AttachmentsApiListAttachmentOpts - Optional Parameters: * @param optional nil or *AttachmentsApiListAttachmentOpts - Optional Parameters:
* @param "XTraceId" (optional.Interface of string) - Unique identifier associated with this request. * @param "XTraceId" (optional.Interface of string) - Unique identifier associated with this request.
@ -426,17 +428,17 @@ This endpoint lists all attachments.
*/ */
type AttachmentsApiListAttachmentOpts struct { type AttachmentsApiListAttachmentOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOptionals *AttachmentsApiListAttachmentOpts) (AttachmentArray, *http.Response, error) { func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOptionals *AttachmentsApiListAttachmentOpts) (AttachmentArray, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue AttachmentArray localVarReturnValue AttachmentArray
) )
@ -491,75 +493,76 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v AttachmentArray var v AttachmentArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
AttachmentsApiService Store a new attachment. AttachmentsApiService Store a new attachment.
Creates a new attachment. The data required can be submitted as a JSON body or as a list of parameters. You cannot use this endpoint to upload the actual file data (see below). This endpoint only creates the attachment object. Creates a new attachment. The data required can be submitted as a JSON body or as a list of parameters. You cannot use this endpoint to upload the actual file data (see below). This endpoint only creates the attachment object.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body JSON array or key&#x3D;value pairs with the necessary attachment information. See the model for the exact specifications. * @param body JSON array or key&#x3D;value pairs with the necessary attachment information. See the model for the exact specifications.
* @param optional nil or *AttachmentsApiStoreAttachmentOpts - Optional Parameters: * @param optional nil or *AttachmentsApiStoreAttachmentOpts - Optional Parameters:
@ -568,15 +571,15 @@ Creates a new attachment. The data required can be submitted as a JSON body or a
*/ */
type AttachmentsApiStoreAttachmentOpts struct { type AttachmentsApiStoreAttachmentOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body AttachmentStore, localVarOptionals *AttachmentsApiStoreAttachmentOpts) (AttachmentSingle, *http.Response, error) { func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body AttachmentStore, localVarOptionals *AttachmentsApiStoreAttachmentOpts) (AttachmentSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Post") localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue AttachmentSingle localVarReturnValue AttachmentSingle
) )
@ -627,85 +630,86 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v AttachmentSingle var v AttachmentSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
AttachmentsApiService Update existing attachment. AttachmentsApiService Update existing attachment.
Update the meta data for an existing attachment. This endpoint does not allow you to upload or download data. For that, see below. Update the meta data for an existing attachment. This endpoint does not allow you to upload or download data. For that, see below.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body JSON array with updated attachment information. See the model for the exact specifications. * @param body JSON array with updated attachment information. See the model for the exact specifications.
* @param id The ID of the attachment. * @param id The ID of the attachment.
@ -715,15 +719,15 @@ Update the meta data for an existing attachment. This endpoint does not allow yo
*/ */
type AttachmentsApiUpdateAttachmentOpts struct { type AttachmentsApiUpdateAttachmentOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body AttachmentUpdate, id string, localVarOptionals *AttachmentsApiUpdateAttachmentOpts) (AttachmentSingle, *http.Response, error) { func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body AttachmentUpdate, id string, localVarOptionals *AttachmentsApiUpdateAttachmentOpts) (AttachmentSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Put") localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue AttachmentSingle localVarReturnValue AttachmentSingle
) )
@ -775,96 +779,97 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v AttachmentSingle var v AttachmentSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
AttachmentsApiService Upload an attachment. AttachmentsApiService Upload an attachment.
Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data. Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id The ID of the attachment. * @param id The ID of the attachment.
* @param optional nil or *AttachmentsApiUploadAttachmentOpts - Optional Parameters: * @param optional nil or *AttachmentsApiUploadAttachmentOpts - Optional Parameters:
* @param "Body" (optional.Interface of Object) - * @param "Body" (optional.Interface of Object) -
* @param "XTraceId" (optional.Interface of string) - Unique identifier associated with this request. * @param "XTraceId" (optional.Interface of string) - Unique identifier associated with this request.
*/ */
type AttachmentsApiUploadAttachmentOpts struct { type AttachmentsApiUploadAttachmentOpts struct {
Body optional.Interface Body optional.Interface
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiUploadAttachmentOpts) (*http.Response, error) { func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiUploadAttachmentOpts) (*http.Response, error) {
@ -873,7 +878,6 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
// create path and map variables // create path and map variables
@ -906,8 +910,8 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
} }
// body params // body params
if localVarOptionals != nil && localVarOptionals.Body.IsSet() { if localVarOptionals != nil && localVarOptionals.Body.IsSet() {
localVarOptionalBody:= localVarOptionals.Body.Value() localVarOptionalBody := localVarOptionals.Body.Value()
localVarPostBody = &localVarOptionalBody localVarPostBody = &localVarOptionalBody
} }
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@ -926,61 +930,60 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
return localVarHttpResponse, err return localVarHttpResponse, err
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,8 +1,7 @@
/* /*
* Firefly III API v2.0.14 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.14 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
@ -12,13 +11,12 @@ package swagger
import ( import (
"context" "context"
"fmt"
"github.com/antihax/optional"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"fmt"
"github.com/antihax/optional"
"time"
) )
// Linger please // Linger please
@ -27,6 +25,7 @@ var (
) )
type CategoriesApiService service type CategoriesApiService service
/* /*
CategoriesApiService Delete a category. CategoriesApiService Delete a category.
Delete a category. Transactions will not be removed. Delete a category. Transactions will not be removed.
@ -38,7 +37,7 @@ Delete a category. Transactions will not be removed.
*/ */
type CategoriesApiDeleteCategoryOpts struct { type CategoriesApiDeleteCategoryOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiDeleteCategoryOpts) (*http.Response, error) { func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiDeleteCategoryOpts) (*http.Response, error) {
@ -47,7 +46,6 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
// create path and map variables // create path and map variables
@ -94,57 +92,57 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
return localVarHttpResponse, err return localVarHttpResponse, err
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
} }
return localVarHttpResponse, nil return localVarHttpResponse, nil
} }
/* /*
CategoriesApiService Get a single category. CategoriesApiService Get a single category.
Get a single category. Get a single category.
@ -152,23 +150,23 @@ Get a single category.
* @param id The ID of the category. * @param id The ID of the category.
* @param optional nil or *CategoriesApiGetCategoryOpts - Optional Parameters: * @param optional nil or *CategoriesApiGetCategoryOpts - Optional Parameters:
* @param "XTraceId" (optional.Interface of string) - Unique identifier associated with this request. * @param "XTraceId" (optional.Interface of string) - Unique identifier associated with this request.
* @param "Start" (optional.String) - A date formatted YYYY-MM-DD, to show spent and earned info. * @param "Start" (optional.String) - A date formatted YYYY-MM-DD, to show spent and earned info.
* @param "End" (optional.String) - A date formatted YYYY-MM-DD, to show spent and earned info. * @param "End" (optional.String) - A date formatted YYYY-MM-DD, to show spent and earned info.
@return CategorySingle @return CategorySingle
*/ */
type CategoriesApiGetCategoryOpts struct { type CategoriesApiGetCategoryOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Start optional.String Start optional.String
End optional.String End optional.String
} }
func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiGetCategoryOpts) (CategorySingle, *http.Response, error) { func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiGetCategoryOpts) (CategorySingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue CategorySingle localVarReturnValue CategorySingle
) )
@ -224,72 +222,73 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v CategorySingle var v CategorySingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
CategoriesApiService Lists all attachments. CategoriesApiService Lists all attachments.
Lists all attachments. Lists all attachments.
@ -303,17 +302,17 @@ Lists all attachments.
*/ */
type CategoriesApiListAttachmentByCategoryOpts struct { type CategoriesApiListAttachmentByCategoryOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiListAttachmentByCategoryOpts) (AttachmentArray, *http.Response, error) { func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiListAttachmentByCategoryOpts) (AttachmentArray, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue AttachmentArray localVarReturnValue AttachmentArray
) )
@ -369,72 +368,73 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v AttachmentArray var v AttachmentArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
CategoriesApiService List all categories. CategoriesApiService List all categories.
List all categories. List all categories.
@ -447,17 +447,17 @@ List all categories.
*/ */
type CategoriesApiListCategoryOpts struct { type CategoriesApiListCategoryOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptionals *CategoriesApiListCategoryOpts) (CategoryArray, *http.Response, error) { func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptionals *CategoriesApiListCategoryOpts) (CategoryArray, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue CategoryArray localVarReturnValue CategoryArray
) )
@ -512,72 +512,73 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v CategoryArray var v CategoryArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
CategoriesApiService List all transactions in a category. CategoriesApiService List all transactions in a category.
List all transactions in a category, optionally limited to the date ranges specified. List all transactions in a category, optionally limited to the date ranges specified.
@ -587,27 +588,27 @@ List all transactions in a category, optionally limited to the date ranges speci
* @param "XTraceId" (optional.Interface of string) - Unique identifier associated with this request. * @param "XTraceId" (optional.Interface of string) - Unique identifier associated with this request.
* @param "Limit" (optional.Int32) - Number of items per page. The default pagination is per 50 items. * @param "Limit" (optional.Int32) - Number of items per page. The default pagination is per 50 items.
* @param "Page" (optional.Int32) - Page number. The default pagination is per 50 items. * @param "Page" (optional.Int32) - Page number. The default pagination is per 50 items.
* @param "Start" (optional.String) - A date formatted YYYY-MM-DD, to limit the result list. * @param "Start" (optional.String) - A date formatted YYYY-MM-DD, to limit the result list.
* @param "End" (optional.String) - A date formatted YYYY-MM-DD, to limit the result list. * @param "End" (optional.String) - A date formatted YYYY-MM-DD, to limit the result list.
* @param "Type_" (optional.Interface of TransactionTypeFilter) - Optional filter on the transaction type(s) returned * @param "Type_" (optional.Interface of TransactionTypeFilter) - Optional filter on the transaction type(s) returned
@return TransactionArray @return TransactionArray
*/ */
type CategoriesApiListTransactionByCategoryOpts struct { type CategoriesApiListTransactionByCategoryOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
Start optional.String Start optional.String
End optional.String End optional.String
Type_ optional.Interface Type_ optional.Interface
} }
func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiListTransactionByCategoryOpts) (TransactionArray, *http.Response, error) { func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiListTransactionByCategoryOpts) (TransactionArray, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue TransactionArray localVarReturnValue TransactionArray
) )
@ -672,72 +673,73 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v TransactionArray var v TransactionArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
CategoriesApiService Store a new category CategoriesApiService Store a new category
Creates a new category. The data required can be submitted as a JSON body or as a list of parameters. Creates a new category. The data required can be submitted as a JSON body or as a list of parameters.
@ -749,15 +751,15 @@ Creates a new category. The data required can be submitted as a JSON body or as
*/ */
type CategoriesApiStoreCategoryOpts struct { type CategoriesApiStoreCategoryOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category, localVarOptionals *CategoriesApiStoreCategoryOpts) (CategorySingle, *http.Response, error) { func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category, localVarOptionals *CategoriesApiStoreCategoryOpts) (CategorySingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Post") localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue CategorySingle localVarReturnValue CategorySingle
) )
@ -808,82 +810,83 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v CategorySingle var v CategorySingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
CategoriesApiService Update existing category. CategoriesApiService Update existing category.
Update existing category. Update existing category.
@ -896,15 +899,15 @@ Update existing category.
*/ */
type CategoriesApiUpdateCategoryOpts struct { type CategoriesApiUpdateCategoryOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body CategoryUpdate, id string, localVarOptionals *CategoriesApiUpdateCategoryOpts) (CategorySingle, *http.Response, error) { func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body CategoryUpdate, id string, localVarOptionals *CategoriesApiUpdateCategoryOpts) (CategorySingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Put") localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue CategorySingle localVarReturnValue CategorySingle
) )
@ -956,76 +959,76 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v CategorySingle var v CategorySingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }

@ -1,8 +1,7 @@
/* /*
* Firefly III API v2.0.14 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.14 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
@ -12,12 +11,12 @@ package swagger
import ( import (
"context" "context"
"fmt"
"github.com/antihax/optional"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"fmt"
"github.com/antihax/optional"
) )
// Linger please // Linger please
@ -26,6 +25,7 @@ var (
) )
type ConfigurationApiService service type ConfigurationApiService service
/* /*
ConfigurationApiService Get Firefly III system configuration values. ConfigurationApiService Get Firefly III system configuration values.
Returns all editable and not-editable configuration values for this Firefly III installation Returns all editable and not-editable configuration values for this Firefly III installation
@ -36,15 +36,15 @@ Returns all editable and not-editable configuration values for this Firefly III
*/ */
type ConfigurationApiGetConfigurationOpts struct { type ConfigurationApiGetConfigurationOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVarOptionals *ConfigurationApiGetConfigurationOpts) ([]Configuration, *http.Response, error) { func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVarOptionals *ConfigurationApiGetConfigurationOpts) ([]Configuration, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue []Configuration localVarReturnValue []Configuration
) )
@ -93,72 +93,73 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v []Configuration var v []Configuration
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
ConfigurationApiService Get a single Firefly III system configuration value ConfigurationApiService Get a single Firefly III system configuration value
Returns one configuration variable for this Firefly III installation Returns one configuration variable for this Firefly III installation
@ -170,15 +171,15 @@ Returns one configuration variable for this Firefly III installation
*/ */
type ConfigurationApiGetSingleConfigurationOpts struct { type ConfigurationApiGetSingleConfigurationOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, name ConfigValueFilter, localVarOptionals *ConfigurationApiGetSingleConfigurationOpts) (ConfigurationSingle, *http.Response, error) { func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, name ConfigValueFilter, localVarOptionals *ConfigurationApiGetSingleConfigurationOpts) (ConfigurationSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue ConfigurationSingle localVarReturnValue ConfigurationSingle
) )
@ -228,72 +229,73 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v ConfigurationSingle var v ConfigurationSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
ConfigurationApiService Update configuration value ConfigurationApiService Update configuration value
Set a single configuration value. Not all configuration values can be updated so the list of accepted configuration variables is small. Set a single configuration value. Not all configuration values can be updated so the list of accepted configuration variables is small.
@ -306,15 +308,15 @@ Set a single configuration value. Not all configuration values can be updated so
*/ */
type ConfigurationApiSetConfigurationOpts struct { type ConfigurationApiSetConfigurationOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value PolymorphicProperty, name ConfigValueUpdateFilter, localVarOptionals *ConfigurationApiSetConfigurationOpts) (ConfigurationSingle, *http.Response, error) { func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value PolymorphicProperty, name ConfigValueUpdateFilter, localVarOptionals *ConfigurationApiSetConfigurationOpts) (ConfigurationSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Put") localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue ConfigurationSingle localVarReturnValue ConfigurationSingle
) )
@ -347,7 +349,6 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
localVarHeaderParams["X-Trace-Id"] = parameterToString(localVarOptionals.XTraceId.Value(), "") localVarHeaderParams["X-Trace-Id"] = parameterToString(localVarOptionals.XTraceId.Value(), "")
} }
// body params // body params
localVarPostBody = &body
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil { if err != nil {
return localVarReturnValue, nil, err return localVarReturnValue, nil, err
@ -366,76 +367,76 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v ConfigurationSingle var v ConfigurationSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }

File diff suppressed because it is too large Load Diff

@ -1,8 +1,7 @@
/* /*
* Firefly III API v2.0.14 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.14 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
@ -12,13 +11,12 @@ package swagger
import ( import (
"context" "context"
"fmt"
"github.com/antihax/optional"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"fmt"
"github.com/antihax/optional"
"time"
) )
// Linger please // Linger please
@ -27,6 +25,7 @@ var (
) )
type PreferencesApiService service type PreferencesApiService service
/* /*
PreferencesApiService Return a single preference. PreferencesApiService Return a single preference.
Return a single preference and the value. Return a single preference and the value.
@ -38,15 +37,15 @@ Return a single preference and the value.
*/ */
type PreferencesApiGetPreferenceOpts struct { type PreferencesApiGetPreferenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *PreferencesApiService) GetPreference(ctx context.Context, name string, localVarOptionals *PreferencesApiGetPreferenceOpts) (PreferenceSingle, *http.Response, error) { func (a *PreferencesApiService) GetPreference(ctx context.Context, name string, localVarOptionals *PreferencesApiGetPreferenceOpts) (PreferenceSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue PreferenceSingle localVarReturnValue PreferenceSingle
) )
@ -96,72 +95,73 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v PreferenceSingle var v PreferenceSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
PreferencesApiService List all users preferences. PreferencesApiService List all users preferences.
List all of the preferences of the user. List all of the preferences of the user.
@ -174,17 +174,17 @@ List all of the preferences of the user.
*/ */
type PreferencesApiListPreferenceOpts struct { type PreferencesApiListPreferenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOptionals *PreferencesApiListPreferenceOpts) (PreferenceArray, *http.Response, error) { func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOptionals *PreferencesApiListPreferenceOpts) (PreferenceArray, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue PreferenceArray localVarReturnValue PreferenceArray
) )
@ -239,72 +239,73 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v PreferenceArray var v PreferenceArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
PreferencesApiService Store a new preference for this user. PreferencesApiService Store a new preference for this user.
This endpoint creates a new preference. The name and data are free-format, and entirely up to you. If the preference is not used in Firefly III itself it may not be configurable through the user interface, but you can use this endpoint to persist custom data for your own app. This endpoint creates a new preference. The name and data are free-format, and entirely up to you. If the preference is not used in Firefly III itself it may not be configurable through the user interface, but you can use this endpoint to persist custom data for your own app.
@ -316,15 +317,15 @@ This endpoint creates a new preference. The name and data are free-format, and e
*/ */
type PreferencesApiStorePreferenceOpts struct { type PreferencesApiStorePreferenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *PreferencesApiService) StorePreference(ctx context.Context, body Preference, localVarOptionals *PreferencesApiStorePreferenceOpts) (PreferenceSingle, *http.Response, error) { func (a *PreferencesApiService) StorePreference(ctx context.Context, body Preference, localVarOptionals *PreferencesApiStorePreferenceOpts) (PreferenceSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Post") localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue PreferenceSingle localVarReturnValue PreferenceSingle
) )
@ -375,82 +376,83 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v PreferenceSingle var v PreferenceSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
PreferencesApiService Update preference PreferencesApiService Update preference
Update a user&#x27;s preference. Update a user&#x27;s preference.
@ -463,15 +465,15 @@ Update a user&#x27;s preference.
*/ */
type PreferencesApiUpdatePreferenceOpts struct { type PreferencesApiUpdatePreferenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body PreferenceUpdate, name string, localVarOptionals *PreferencesApiUpdatePreferenceOpts) (PreferenceSingle, *http.Response, error) { func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body PreferenceUpdate, name string, localVarOptionals *PreferencesApiUpdatePreferenceOpts) (PreferenceSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Put") localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue PreferenceSingle localVarReturnValue PreferenceSingle
) )
@ -523,76 +525,76 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v PreferenceSingle var v PreferenceSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }

@ -1,8 +1,7 @@
/* /*
* Firefly III API v2.0.14 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.14 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
@ -12,13 +11,12 @@ package swagger
import ( import (
"context" "context"
"fmt"
"github.com/antihax/optional"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"fmt"
"github.com/antihax/optional"
"time"
) )
// Linger please // Linger please
@ -27,6 +25,7 @@ var (
) )
type UsersApiService service type UsersApiService service
/* /*
UsersApiService Delete a user. UsersApiService Delete a user.
Delete a user. You cannot delete the user you&#x27;re authenticated with. This cannot be undone. Be careful! Delete a user. You cannot delete the user you&#x27;re authenticated with. This cannot be undone. Be careful!
@ -38,7 +37,7 @@ Delete a user. You cannot delete the user you&#x27;re authenticated with. This c
*/ */
type UsersApiDeleteUserOpts struct { type UsersApiDeleteUserOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOptionals *UsersApiDeleteUserOpts) (*http.Response, error) { func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOptionals *UsersApiDeleteUserOpts) (*http.Response, error) {
@ -47,7 +46,6 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
// create path and map variables // create path and map variables
@ -94,57 +92,57 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
return localVarHttpResponse, err return localVarHttpResponse, err
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
} }
return localVarHttpResponse, newErr return localVarHttpResponse, newErr
} }
return localVarHttpResponse, nil return localVarHttpResponse, nil
} }
/* /*
UsersApiService Get a single user. UsersApiService Get a single user.
Gets all info of a single user. Gets all info of a single user.
@ -156,15 +154,15 @@ Gets all info of a single user.
*/ */
type UsersApiGetUserOpts struct { type UsersApiGetUserOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOptionals *UsersApiGetUserOpts) (UserSingle, *http.Response, error) { func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOptionals *UsersApiGetUserOpts) (UserSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue UserSingle localVarReturnValue UserSingle
) )
@ -214,72 +212,73 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v UserSingle var v UserSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
UsersApiService List all users. UsersApiService List all users.
List all the users in this instance of Firefly III. List all the users in this instance of Firefly III.
@ -292,17 +291,17 @@ List all the users in this instance of Firefly III.
*/ */
type UsersApiListUserOpts struct { type UsersApiListUserOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *UsersApiListUserOpts) (UserArray, *http.Response, error) { func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *UsersApiListUserOpts) (UserArray, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Get") localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue UserArray localVarReturnValue UserArray
) )
@ -357,75 +356,76 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v UserArray var v UserArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
UsersApiService Store a new user UsersApiService Store a new user
Creates a new user. The data required can be submitted as a JSON body or as a list of parameters. The user will be given a random password, which they can reset using the \&quot;forgot password\&quot; function. Creates a new user. The data required can be submitted as a JSON body or as a list of parameters. The user will be given a random password, which they can reset using the \&quot;forgot password\&quot; function.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body JSON array or key&#x3D;value pairs with the necessary user information. See the model for the exact specifications. * @param body JSON array or key&#x3D;value pairs with the necessary user information. See the model for the exact specifications.
* @param optional nil or *UsersApiStoreUserOpts - Optional Parameters: * @param optional nil or *UsersApiStoreUserOpts - Optional Parameters:
@ -434,15 +434,15 @@ Creates a new user. The data required can be submitted as a JSON body or as a li
*/ */
type UsersApiStoreUserOpts struct { type UsersApiStoreUserOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOptionals *UsersApiStoreUserOpts) (UserSingle, *http.Response, error) { func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOptionals *UsersApiStoreUserOpts) (UserSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Post") localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue UserSingle localVarReturnValue UserSingle
) )
@ -493,82 +493,83 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v UserSingle var v UserSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, nil return localVarReturnValue, localVarHttpResponse, nil
} }
/* /*
UsersApiService Update an existing user&#x27;s information. UsersApiService Update an existing user&#x27;s information.
Update existing user. Update existing user.
@ -581,15 +582,15 @@ Update existing user.
*/ */
type UsersApiUpdateUserOpts struct { type UsersApiUpdateUserOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string, localVarOptionals *UsersApiUpdateUserOpts) (UserSingle, *http.Response, error) { func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string, localVarOptionals *UsersApiUpdateUserOpts) (UserSingle, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Put") localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
localVarReturnValue UserSingle localVarReturnValue UserSingle
) )
@ -641,76 +642,76 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
if localVarHttpResponse.StatusCode < 300 { if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error. // If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil { if err == nil {
return localVarReturnValue, localVarHttpResponse, err return localVarReturnValue, localVarHttpResponse, err
} }
} }
if localVarHttpResponse.StatusCode >= 300 { if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{ newErr := GenericSwaggerError{
body: localVarBody, body: localVarBody,
error: localVarHttpResponse.Status, error: localVarHttpResponse.Status,
} }
if localVarHttpResponse.StatusCode == 200 { if localVarHttpResponse.StatusCode == 200 {
var v UserSingle var v UserSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 422 { if localVarHttpResponse.StatusCode == 422 {
var v ValidationErrorResponse var v ValidationErrorResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 401 { if localVarHttpResponse.StatusCode == 401 {
var v UnauthenticatedResponse var v UnauthenticatedResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 404 { if localVarHttpResponse.StatusCode == 404 {
var v NotFoundResponse var v NotFoundResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 400 { if localVarHttpResponse.StatusCode == 400 {
var v BadRequestResponse var v BadRequestResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
if localVarHttpResponse.StatusCode == 500 { if localVarHttpResponse.StatusCode == 500 {
var v InternalExceptionResponse var v InternalExceptionResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil { if err != nil {
newErr.error = err.Error() newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }

@ -1,7 +1,7 @@
/* /*
* Firefly III API v2.0.14 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.14 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
@ -9,9 +9,9 @@
*/ */
package swagger package swagger
type Configuration struct { //type Configuration struct {
Title *ConfigValueFilter `json:"title"` // Title *ConfigValueFilter `json:"title"`
Value *PolymorphicProperty `json:"value"` // Value *PolymorphicProperty `json:"value"`
// If this config variable can be edited by the user // // If this config variable can be edited by the user
Editable bool `json:"editable"` // Editable bool `json:"editable"`
} //}