This commit is contained in:
kolaente 2019-10-19 23:30:03 +02:00
parent 29d8f6060b
commit 31632711fd
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
22 changed files with 979 additions and 1121 deletions

View File

@ -14,22 +14,22 @@ import (
"bytes"
"encoding/json"
"encoding/xml"
"fmt"
"errors"
"fmt"
"golang.org/x/net/context"
"golang.org/x/oauth2"
"io"
"mime/multipart"
"golang.org/x/oauth2"
"golang.org/x/net/context"
"net/http"
"net/url"
"time"
"os"
"path/filepath"
"reflect"
"regexp"
"strings"
"unicode/utf8"
"strconv"
"strings"
"time"
"unicode/utf8"
)
var (
@ -88,7 +88,6 @@ func atoi(in string) (int, error) {
return strconv.Atoi(in)
}
// selectHeaderContentType select a content type from the available list.
func selectHeaderContentType(contentTypes []string) string {
if len(contentTypes) == 0 {
@ -165,12 +164,12 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
}
// Change base path to allow switching to mocks
func (c *APIClient) ChangeBasePath (path string) {
func (c *APIClient) ChangeBasePath(path string) {
c.cfg.BasePath = path
}
// prepareRequest build the request
func (c *APIClient) prepareRequest (
func (c *APIClient) prepareRequest(
ctx context.Context,
path string, method string,
postBody interface{},
@ -280,7 +279,6 @@ func (c *APIClient) prepareRequest (
// Add the user agent to the request.
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
if ctx != nil {
// add context to the request
localVarRequest = localVarRequest.WithContext(ctx)
@ -305,7 +303,7 @@ func (c *APIClient) prepareRequest (
// AccessToken Authentication
if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
localVarRequest.Header.Add("Authorization", "Bearer " + auth)
localVarRequest.Header.Add("Authorization", "Bearer "+auth)
}
}
@ -316,7 +314,6 @@ func (c *APIClient) prepareRequest (
return localVarRequest, nil
}
// Add a file to the multipart request
func addFile(w *multipart.Writer, fieldName, path string) error {
file, err := os.Open(path)
@ -335,7 +332,7 @@ func addFile(w *multipart.Writer, fieldName, path string) error {
}
// Prevent trying to import "fmt"
func reportError(format string, a ...interface{}) (error) {
func reportError(format string, a ...interface{}) error {
return fmt.Errorf(format, a...)
}
@ -389,7 +386,6 @@ func detectContentType(body interface{}) string {
return contentType
}
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
type cacheControl map[string]string
@ -412,7 +408,7 @@ func parseCacheControl(headers http.Header) cacheControl {
}
// CacheExpires helper function to determine remaining time before repeating a request.
func CacheExpires(r *http.Response) (time.Time) {
func CacheExpires(r *http.Response) time.Time {
// Figure out when the cache expires.
var expires time.Time
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
@ -439,7 +435,6 @@ func CacheExpires(r *http.Response) (time.Time) {
return expires
}
func strlen(s string) (int) {
func strlen(s string) int {
return utf8.RuneCountInString(s)
}

View File

@ -11,13 +11,13 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -27,13 +27,12 @@ var (
type AssigneesApiService service
/* AssigneesApiService Add multiple new assignees to a task
Adds multiple new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param assignee The array of assignees
@param taskID Task ID
@return ModelsTaskAssginee*/
Adds multiple new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param assignee The array of assignees
@param taskID Task ID
@return ModelsTaskAssginee*/
func (a *AssigneesApiService) TasksTaskIDAssigneesBulkPost(ctx context.Context, assignee ModelsBulkAssignees, taskID int32) (ModelsTaskAssginee, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -51,9 +50,8 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesBulkPost(ctx context.Context,
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -104,18 +102,17 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesBulkPost(ctx context.Context,
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* AssigneesApiService Get all assignees for a task
Returns an array with all assignees for this task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param taskID Task ID
@param optional (nil or map[string]interface{}) with one or more of:
Returns an array with all assignees for this task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param taskID Task ID
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search assignees by their username.
@return []ModelsUser*/
@return []ModelsUser*/
func (a *AssigneesApiService) TasksTaskIDAssigneesGet(ctx context.Context, taskID int32, localVarOptionals map[string]interface{}) ([]ModelsUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -147,7 +144,7 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesGet(ctx context.Context, taskI
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -196,16 +193,15 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesGet(ctx context.Context, taskI
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* AssigneesApiService Add a new assignee to a task
Adds a new assignee to a task. The assignee needs to have access to the list, the doer must be able to edit this task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param assignee The assingee object
@param taskID Task ID
@return ModelsTaskAssginee*/
Adds a new assignee to a task. The assignee needs to have access to the list, the doer must be able to edit this task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param assignee The assingee object
@param taskID Task ID
@return ModelsTaskAssginee*/
func (a *AssigneesApiService) TasksTaskIDAssigneesPut(ctx context.Context, assignee ModelsTaskAssginee, taskID int32) (ModelsTaskAssginee, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -223,9 +219,8 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesPut(ctx context.Context, assig
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -276,16 +271,15 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesPut(ctx context.Context, assig
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* AssigneesApiService Delete an assignee
Un-assign a user from a task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param taskID Task ID
@param userID Assignee user ID
@return ModelsMessage*/
Un-assign a user from a task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param taskID Task ID
@param userID Assignee user ID
@return ModelsMessage*/
func (a *AssigneesApiService) TasksTaskIDAssigneesUserIDDelete(ctx context.Context, taskID int32, userID int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -304,9 +298,8 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesUserIDDelete(ctx context.Conte
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -355,7 +348,5 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesUserIDDelete(ctx context.Conte
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,7 +11,6 @@
package swagger
type CodeVikunjaIoWebHttpError struct {
Code int32 `json:"code,omitempty"`
Message string `json:"message,omitempty"`

View File

@ -11,7 +11,6 @@
package swagger
type FilesFile struct {
Created string `json:"created,omitempty"`
Id int32 `json:"id,omitempty"`

5
go.mod
View File

@ -1,3 +1,8 @@
module code.vikunja.io/go-sdk
go 1.12
require (
golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
)

13
go.sum Normal file
View File

@ -0,0 +1,13 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582 h1:p9xBe/w/OzkeYVKm234g55gMdD1nSIooTir5kV11kfA=
golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

View File

@ -11,13 +11,13 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -27,14 +27,13 @@ var (
type LabelsApiService service
/* LabelsApiService Get all labels a user has access to
Returns all labels which are either created by the user or associated with a task the user has at least read-access to.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
Returns all labels which are either created by the user or associated with a task the user has at least read-access to.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search labels by label text.
@return []ModelsLabel*/
@return []ModelsLabel*/
func (a *LabelsApiService) LabelsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsLabel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -65,7 +64,7 @@ func (a *LabelsApiService) LabelsGet(ctx context.Context, localVarOptionals map[
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -114,15 +113,14 @@ func (a *LabelsApiService) LabelsGet(ctx context.Context, localVarOptionals map[
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* LabelsApiService Delete a label
Delete an existing label. The user needs to be the creator of the label to be able to do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Label ID
@return ModelsLabel*/
Delete an existing label. The user needs to be the creator of the label to be able to do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Label ID
@return ModelsLabel*/
func (a *LabelsApiService) LabelsIdDelete(ctx context.Context, id int32) (ModelsLabel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -140,9 +138,8 @@ func (a *LabelsApiService) LabelsIdDelete(ctx context.Context, id int32) (Models
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -191,15 +188,14 @@ func (a *LabelsApiService) LabelsIdDelete(ctx context.Context, id int32) (Models
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* LabelsApiService Gets one label
Returns one label by its ID.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Label ID
@return ModelsLabel*/
Returns one label by its ID.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Label ID
@return ModelsLabel*/
func (a *LabelsApiService) LabelsIdGet(ctx context.Context, id int32) (ModelsLabel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -217,9 +213,8 @@ func (a *LabelsApiService) LabelsIdGet(ctx context.Context, id int32) (ModelsLab
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -268,16 +263,15 @@ func (a *LabelsApiService) LabelsIdGet(ctx context.Context, id int32) (ModelsLab
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* LabelsApiService Update a label
Update an existing label. The user needs to be the creator of the label to be able to do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Label ID
@param label The label object
@return ModelsLabel*/
Update an existing label. The user needs to be the creator of the label to be able to do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Label ID
@param label The label object
@return ModelsLabel*/
func (a *LabelsApiService) LabelsIdPut(ctx context.Context, id int32, label ModelsLabel) (ModelsLabel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -295,9 +289,8 @@ func (a *LabelsApiService) LabelsIdPut(ctx context.Context, id int32, label Mode
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -348,15 +341,14 @@ func (a *LabelsApiService) LabelsIdPut(ctx context.Context, id int32, label Mode
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* LabelsApiService Create a label
Creates a new label.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param label The label object
@return ModelsLabel*/
Creates a new label.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param label The label object
@return ModelsLabel*/
func (a *LabelsApiService) LabelsPut(ctx context.Context, label ModelsLabel) (ModelsLabel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -373,9 +365,8 @@ func (a *LabelsApiService) LabelsPut(ctx context.Context, label ModelsLabel) (Mo
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -426,16 +417,15 @@ func (a *LabelsApiService) LabelsPut(ctx context.Context, label ModelsLabel) (Mo
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* LabelsApiService Update all labels on a task.
Updates all labels on a task. Every label which is not passed but exists on the task will be deleted. Every label which does not exist on the task will be added. All labels which are passed and already exist on the task won't be touched.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param label The array of labels
@param taskID Task ID
@return ModelsLabelTaskBulk*/
Updates all labels on a task. Every label which is not passed but exists on the task will be deleted. Every label which does not exist on the task will be added. All labels which are passed and already exist on the task won't be touched.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param label The array of labels
@param taskID Task ID
@return ModelsLabelTaskBulk*/
func (a *LabelsApiService) TasksTaskIDLabelsBulkPost(ctx context.Context, label ModelsLabelTaskBulk, taskID int32) (ModelsLabelTaskBulk, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -453,9 +443,8 @@ func (a *LabelsApiService) TasksTaskIDLabelsBulkPost(ctx context.Context, label
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -506,18 +495,17 @@ func (a *LabelsApiService) TasksTaskIDLabelsBulkPost(ctx context.Context, label
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* LabelsApiService Get all labels on a task
Returns all labels which are assicociated with a given task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param task Task ID
@param optional (nil or map[string]interface{}) with one or more of:
Returns all labels which are assicociated with a given task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param task Task ID
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search labels by label text.
@return []ModelsLabel*/
@return []ModelsLabel*/
func (a *LabelsApiService) TasksTaskLabelsGet(ctx context.Context, task int32, localVarOptionals map[string]interface{}) ([]ModelsLabel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -549,7 +537,7 @@ func (a *LabelsApiService) TasksTaskLabelsGet(ctx context.Context, task int32, l
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -598,16 +586,15 @@ func (a *LabelsApiService) TasksTaskLabelsGet(ctx context.Context, task int32, l
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* LabelsApiService Remove a label from a task
Remove a label from a task. The user needs to have write-access to the list to be able do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param task Task ID
@param label Label ID
@return ModelsMessage*/
Remove a label from a task. The user needs to have write-access to the list to be able do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param task Task ID
@param label Label ID
@return ModelsMessage*/
func (a *LabelsApiService) TasksTaskLabelsLabelDelete(ctx context.Context, task int32, label int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -626,9 +613,8 @@ func (a *LabelsApiService) TasksTaskLabelsLabelDelete(ctx context.Context, task
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -677,16 +663,15 @@ func (a *LabelsApiService) TasksTaskLabelsLabelDelete(ctx context.Context, task
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* LabelsApiService Add a label to a task
Add a label to a task. The user needs to have write-access to the list to be able do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param task Task ID
@param label The label object
@return ModelsLabelTask*/
Add a label to a task. The user needs to have write-access to the list to be able do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param task Task ID
@param label The label object
@return ModelsLabelTask*/
func (a *LabelsApiService) TasksTaskLabelsPut(ctx context.Context, task int32, label ModelsLabelTask) (ModelsLabelTask, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -704,9 +689,8 @@ func (a *LabelsApiService) TasksTaskLabelsPut(ctx context.Context, task int32, l
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -757,7 +741,5 @@ func (a *LabelsApiService) TasksTaskLabelsPut(ctx context.Context, task int32, l
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,13 +11,13 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -27,14 +27,13 @@ var (
type ListApiService service
/* ListApiService Get all lists a user has access to
Returns all lists a user has access to.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
Returns all lists a user has access to.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search lists by title.
@return []ModelsList*/
@return []ModelsList*/
func (a *ListApiService) ListsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsList, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -65,7 +64,7 @@ func (a *ListApiService) ListsGet(ctx context.Context, localVarOptionals map[str
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -114,15 +113,14 @@ func (a *ListApiService) ListsGet(ctx context.Context, localVarOptionals map[str
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* ListApiService Deletes a list
Delets a list
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@return ModelsMessage*/
Delets a list
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@return ModelsMessage*/
func (a *ListApiService) ListsIdDelete(ctx context.Context, id int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -140,9 +138,8 @@ func (a *ListApiService) ListsIdDelete(ctx context.Context, id int32) (ModelsMes
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -191,15 +188,14 @@ func (a *ListApiService) ListsIdDelete(ctx context.Context, id int32) (ModelsMes
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* ListApiService Gets one list
Returns a list by its ID.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@return ModelsList*/
Returns a list by its ID.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@return ModelsList*/
func (a *ListApiService) ListsIdGet(ctx context.Context, id int32) (ModelsList, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -217,9 +213,8 @@ func (a *ListApiService) ListsIdGet(ctx context.Context, id int32) (ModelsList,
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -268,17 +263,16 @@ func (a *ListApiService) ListsIdGet(ctx context.Context, id int32) (ModelsList,
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* ListApiService Get users
Lists all users (without emailadresses). Also possible to search for a specific user.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param optional (nil or map[string]interface{}) with one or more of:
Lists all users (without emailadresses). Also possible to search for a specific user.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param optional (nil or map[string]interface{}) with one or more of:
@param "s" (string) Search for a user by its name.
@return []ModelsUser*/
@return []ModelsUser*/
func (a *ListApiService) ListsIdListusersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -304,7 +298,7 @@ func (a *ListApiService) ListsIdListusersGet(ctx context.Context, id int32, loca
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -353,16 +347,15 @@ func (a *ListApiService) ListsIdListusersGet(ctx context.Context, id int32, loca
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* ListApiService Updates a list
Updates a list. This does not include adding a task (see below).
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param list The list with updated values you want to update.
@return ModelsList*/
Updates a list. This does not include adding a task (see below).
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param list The list with updated values you want to update.
@return ModelsList*/
func (a *ListApiService) ListsIdPost(ctx context.Context, id int32, list ModelsList) (ModelsList, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -380,9 +373,8 @@ func (a *ListApiService) ListsIdPost(ctx context.Context, id int32, list ModelsL
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -433,16 +425,15 @@ func (a *ListApiService) ListsIdPost(ctx context.Context, id int32, list ModelsL
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* ListApiService Creates a new list
Creates a new list in a given namespace. The user needs write-access to the namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param list The list you want to create.
@return ModelsList*/
Creates a new list in a given namespace. The user needs write-access to the namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param list The list you want to create.
@return ModelsList*/
func (a *ListApiService) NamespacesNamespaceIDListsPut(ctx context.Context, namespaceID int32, list ModelsList) (ModelsList, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -460,9 +451,8 @@ func (a *ListApiService) NamespacesNamespaceIDListsPut(ctx context.Context, name
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -513,7 +503,5 @@ func (a *ListApiService) NamespacesNamespaceIDListsPut(ctx context.Context, name
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,6 +11,5 @@
package swagger
type ModelsPasswordTokenRequest struct {
Email string `json:"email,omitempty"`
}

View File

@ -11,7 +11,6 @@
package swagger
type ModelsTaskAssginee struct {
Created int32 `json:"created,omitempty"`
UserId int32 `json:"user_id,omitempty"`

View File

@ -11,7 +11,6 @@
package swagger
type ModelsTaskAttachment struct {
Created int32 `json:"created,omitempty"`
CreatedBy *ModelsUser `json:"created_by,omitempty"`

View File

@ -11,13 +11,13 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -27,13 +27,12 @@ var (
type NamespaceApiService service
/* NamespaceApiService Updates a namespace
Updates a namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param namespace The namespace with updated values you want to update.
@return ModelsNamespace*/
Updates a namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param namespace The namespace with updated values you want to update.
@return ModelsNamespace*/
func (a *NamespaceApiService) NamespaceIdPost(ctx context.Context, id int32, namespace ModelsNamespace) (ModelsNamespace, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -51,9 +50,8 @@ func (a *NamespaceApiService) NamespaceIdPost(ctx context.Context, id int32, nam
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -104,17 +102,16 @@ func (a *NamespaceApiService) NamespaceIdPost(ctx context.Context, id int32, nam
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* NamespaceApiService Get all namespaces a user has access to
Returns all namespaces a user has access to.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
Returns all namespaces a user has access to.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search namespaces by name.
@return []ModelsNamespaceWithLists*/
@return []ModelsNamespaceWithLists*/
func (a *NamespaceApiService) NamespacesGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsNamespaceWithLists, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -145,7 +142,7 @@ func (a *NamespaceApiService) NamespacesGet(ctx context.Context, localVarOptiona
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -194,15 +191,14 @@ func (a *NamespaceApiService) NamespacesGet(ctx context.Context, localVarOptiona
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* NamespaceApiService Deletes a namespace
Delets a namespace
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@return ModelsMessage*/
Delets a namespace
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@return ModelsMessage*/
func (a *NamespaceApiService) NamespacesIdDelete(ctx context.Context, id int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -220,9 +216,8 @@ func (a *NamespaceApiService) NamespacesIdDelete(ctx context.Context, id int32)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -271,15 +266,14 @@ func (a *NamespaceApiService) NamespacesIdDelete(ctx context.Context, id int32)
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* NamespaceApiService Gets one namespace
Returns a namespace by its ID.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@return ModelsNamespace*/
Returns a namespace by its ID.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@return ModelsNamespace*/
func (a *NamespaceApiService) NamespacesIdGet(ctx context.Context, id int32) (ModelsNamespace, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -297,9 +291,8 @@ func (a *NamespaceApiService) NamespacesIdGet(ctx context.Context, id int32) (Mo
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -348,15 +341,14 @@ func (a *NamespaceApiService) NamespacesIdGet(ctx context.Context, id int32) (Mo
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* NamespaceApiService Get all lists in a namespace
Returns all lists inside of a namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@return []ModelsList*/
Returns all lists inside of a namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@return []ModelsList*/
func (a *NamespaceApiService) NamespacesIdListsGet(ctx context.Context, id int32) ([]ModelsList, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -374,9 +366,8 @@ func (a *NamespaceApiService) NamespacesIdListsGet(ctx context.Context, id int32
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -425,15 +416,14 @@ func (a *NamespaceApiService) NamespacesIdListsGet(ctx context.Context, id int32
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* NamespaceApiService Creates a new namespace
Creates a new namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespace The namespace you want to create.
@return ModelsNamespace*/
Creates a new namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespace The namespace you want to create.
@return ModelsNamespace*/
func (a *NamespaceApiService) NamespacesPut(ctx context.Context, namespace ModelsNamespace) (ModelsNamespace, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -450,9 +440,8 @@ func (a *NamespaceApiService) NamespacesPut(ctx context.Context, namespace Model
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -503,7 +492,5 @@ func (a *NamespaceApiService) NamespacesPut(ctx context.Context, namespace Model
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,12 +11,12 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -26,11 +26,10 @@ var (
type ServiceApiService service
/* ServiceApiService Info
Returns the version, frontendurl, motd and various settings of Vikunja
* @param ctx context.Context for authentication, logging, tracing, etc.
@return V1VikunjaInfos*/
Returns the version, frontendurl, motd and various settings of Vikunja
* @param ctx context.Context for authentication, logging, tracing, etc.
@return V1VikunjaInfos*/
func (a *ServiceApiService) InfoGet(ctx context.Context) (V1VikunjaInfos, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -47,9 +46,8 @@ func (a *ServiceApiService) InfoGet(ctx context.Context) (V1VikunjaInfos, *http
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -86,7 +84,5 @@ func (a *ServiceApiService) InfoGet(ctx context.Context) (V1VikunjaInfos, *http
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,13 +11,13 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -27,15 +27,14 @@ var (
type SharingApiService service
/* SharingApiService Get teams on a list
Returns a list with all teams which have access on a given list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param optional (nil or map[string]interface{}) with one or more of:
Returns a list with all teams which have access on a given list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search teams by its name.
@return []ModelsTeamWithRight*/
@return []ModelsTeamWithRight*/
func (a *SharingApiService) ListsIdTeamsGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsTeamWithRight, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -67,7 +66,7 @@ func (a *SharingApiService) ListsIdTeamsGet(ctx context.Context, id int32, local
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -116,16 +115,15 @@ func (a *SharingApiService) ListsIdTeamsGet(ctx context.Context, id int32, local
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Add a team to a list
Gives a team access to a list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param list The team you want to add to the list.
@return ModelsTeamList*/
Gives a team access to a list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param list The team you want to add to the list.
@return ModelsTeamList*/
func (a *SharingApiService) ListsIdTeamsPut(ctx context.Context, id int32, list ModelsTeamList) (ModelsTeamList, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -143,9 +141,8 @@ func (a *SharingApiService) ListsIdTeamsPut(ctx context.Context, id int32, list
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -196,18 +193,17 @@ func (a *SharingApiService) ListsIdTeamsPut(ctx context.Context, id int32, list
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Get users on a list
Returns a list with all users which have access on a given list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param optional (nil or map[string]interface{}) with one or more of:
Returns a list with all users which have access on a given list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search users by its name.
@return []ModelsUserWithRight*/
@return []ModelsUserWithRight*/
func (a *SharingApiService) ListsIdUsersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUserWithRight, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -239,7 +235,7 @@ func (a *SharingApiService) ListsIdUsersGet(ctx context.Context, id int32, local
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -288,16 +284,15 @@ func (a *SharingApiService) ListsIdUsersGet(ctx context.Context, id int32, local
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Add a user to a list
Gives a user access to a list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param list The user you want to add to the list.
@return ModelsListUser*/
Gives a user access to a list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param list The user you want to add to the list.
@return ModelsListUser*/
func (a *SharingApiService) ListsIdUsersPut(ctx context.Context, id int32, list ModelsListUser) (ModelsListUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -315,9 +310,8 @@ func (a *SharingApiService) ListsIdUsersPut(ctx context.Context, id int32, list
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -368,16 +362,15 @@ func (a *SharingApiService) ListsIdUsersPut(ctx context.Context, id int32, list
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Delete a team from a list
Delets a team from a list. The team won't have access to the list anymore.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param listID List ID
@param teamID Team ID
@return ModelsMessage*/
Delets a team from a list. The team won't have access to the list anymore.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param listID List ID
@param teamID Team ID
@return ModelsMessage*/
func (a *SharingApiService) ListsListIDTeamsTeamIDDelete(ctx context.Context, listID int32, teamID int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -396,9 +389,8 @@ func (a *SharingApiService) ListsListIDTeamsTeamIDDelete(ctx context.Context, li
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -447,17 +439,16 @@ func (a *SharingApiService) ListsListIDTeamsTeamIDDelete(ctx context.Context, li
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Update a team <-> list relation
Update a team <-> list relation. Mostly used to update the right that team has.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param listID List ID
@param teamID Team ID
@param list The team you want to update.
@return ModelsTeamList*/
Update a team <-> list relation. Mostly used to update the right that team has.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param listID List ID
@param teamID Team ID
@param list The team you want to update.
@return ModelsTeamList*/
func (a *SharingApiService) ListsListIDTeamsTeamIDPost(ctx context.Context, listID int32, teamID int32, list ModelsTeamList) (ModelsTeamList, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -476,9 +467,8 @@ func (a *SharingApiService) ListsListIDTeamsTeamIDPost(ctx context.Context, list
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -529,16 +519,15 @@ func (a *SharingApiService) ListsListIDTeamsTeamIDPost(ctx context.Context, list
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Delete a user from a list
Delets a user from a list. The user won't have access to the list anymore.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param listID List ID
@param userID User ID
@return ModelsMessage*/
Delets a user from a list. The user won't have access to the list anymore.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param listID List ID
@param userID User ID
@return ModelsMessage*/
func (a *SharingApiService) ListsListIDUsersUserIDDelete(ctx context.Context, listID int32, userID int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -557,9 +546,8 @@ func (a *SharingApiService) ListsListIDUsersUserIDDelete(ctx context.Context, li
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -608,17 +596,16 @@ func (a *SharingApiService) ListsListIDUsersUserIDDelete(ctx context.Context, li
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Update a user <-> list relation
Update a user <-> list relation. Mostly used to update the right that user has.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param listID List ID
@param userID User ID
@param list The user you want to update.
@return ModelsListUser*/
Update a user <-> list relation. Mostly used to update the right that user has.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param listID List ID
@param userID User ID
@param list The user you want to update.
@return ModelsListUser*/
func (a *SharingApiService) ListsListIDUsersUserIDPost(ctx context.Context, listID int32, userID int32, list ModelsListUser) (ModelsListUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -637,9 +624,8 @@ func (a *SharingApiService) ListsListIDUsersUserIDPost(ctx context.Context, list
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -690,18 +676,17 @@ func (a *SharingApiService) ListsListIDUsersUserIDPost(ctx context.Context, list
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Get all link shares for a list
Returns all link shares which exist for a given list
* @param ctx context.Context for authentication, logging, tracing, etc.
@param list List ID
@param optional (nil or map[string]interface{}) with one or more of:
Returns all link shares which exist for a given list
* @param ctx context.Context for authentication, logging, tracing, etc.
@param list List ID
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search shares by hash.
@return []ModelsLinkSharing*/
@return []ModelsLinkSharing*/
func (a *SharingApiService) ListsListSharesGet(ctx context.Context, list int32, localVarOptionals map[string]interface{}) ([]ModelsLinkSharing, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -733,7 +718,7 @@ func (a *SharingApiService) ListsListSharesGet(ctx context.Context, list int32,
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -782,16 +767,15 @@ func (a *SharingApiService) ListsListSharesGet(ctx context.Context, list int32,
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Share a list via link
Share a list via link. The user needs to have write-access to the list to be able do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param list List ID
@param label The new link share object
@return ModelsLinkSharing*/
Share a list via link. The user needs to have write-access to the list to be able do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param list List ID
@param label The new link share object
@return ModelsLinkSharing*/
func (a *SharingApiService) ListsListSharesPut(ctx context.Context, list int32, label ModelsLinkSharing) (ModelsLinkSharing, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -809,9 +793,8 @@ func (a *SharingApiService) ListsListSharesPut(ctx context.Context, list int32,
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -862,16 +845,15 @@ func (a *SharingApiService) ListsListSharesPut(ctx context.Context, list int32,
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Remove a link share
Remove a link share. The user needs to have write-access to the list to be able do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param list List ID
@param share Share Link ID
@return ModelsMessage*/
Remove a link share. The user needs to have write-access to the list to be able do this.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param list List ID
@param share Share Link ID
@return ModelsMessage*/
func (a *SharingApiService) ListsListSharesShareDelete(ctx context.Context, list int32, share int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -890,9 +872,8 @@ func (a *SharingApiService) ListsListSharesShareDelete(ctx context.Context, list
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -941,16 +922,15 @@ func (a *SharingApiService) ListsListSharesShareDelete(ctx context.Context, list
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Get one link shares for a list
Returns one link share by its ID.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param list List ID
@param share Share ID
@return ModelsLinkSharing*/
Returns one link share by its ID.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param list List ID
@param share Share ID
@return ModelsLinkSharing*/
func (a *SharingApiService) ListsListSharesShareGet(ctx context.Context, list int32, share int32) (ModelsLinkSharing, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -969,9 +949,8 @@ func (a *SharingApiService) ListsListSharesShareGet(ctx context.Context, list in
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1020,18 +999,17 @@ func (a *SharingApiService) ListsListSharesShareGet(ctx context.Context, list in
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Get teams on a namespace
Returns a namespace with all teams which have access on a given namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param optional (nil or map[string]interface{}) with one or more of:
Returns a namespace with all teams which have access on a given namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search teams by its name.
@return []ModelsTeamWithRight*/
@return []ModelsTeamWithRight*/
func (a *SharingApiService) NamespacesIdTeamsGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsTeamWithRight, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -1063,7 +1041,7 @@ func (a *SharingApiService) NamespacesIdTeamsGet(ctx context.Context, id int32,
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1112,16 +1090,15 @@ func (a *SharingApiService) NamespacesIdTeamsGet(ctx context.Context, id int32,
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Add a team to a namespace
Gives a team access to a namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param namespace The team you want to add to the namespace.
@return ModelsTeamNamespace*/
Gives a team access to a namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param namespace The team you want to add to the namespace.
@return ModelsTeamNamespace*/
func (a *SharingApiService) NamespacesIdTeamsPut(ctx context.Context, id int32, namespace ModelsTeamNamespace) (ModelsTeamNamespace, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -1139,9 +1116,8 @@ func (a *SharingApiService) NamespacesIdTeamsPut(ctx context.Context, id int32,
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1192,18 +1168,17 @@ func (a *SharingApiService) NamespacesIdTeamsPut(ctx context.Context, id int32,
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Get users on a namespace
Returns a namespace with all users which have access on a given namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param optional (nil or map[string]interface{}) with one or more of:
Returns a namespace with all users which have access on a given namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search users by its name.
@return []ModelsUserWithRight*/
@return []ModelsUserWithRight*/
func (a *SharingApiService) NamespacesIdUsersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUserWithRight, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -1235,7 +1210,7 @@ func (a *SharingApiService) NamespacesIdUsersGet(ctx context.Context, id int32,
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1284,16 +1259,15 @@ func (a *SharingApiService) NamespacesIdUsersGet(ctx context.Context, id int32,
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Add a user to a namespace
Gives a user access to a namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param namespace The user you want to add to the namespace.
@return ModelsNamespaceUser*/
Gives a user access to a namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Namespace ID
@param namespace The user you want to add to the namespace.
@return ModelsNamespaceUser*/
func (a *SharingApiService) NamespacesIdUsersPut(ctx context.Context, id int32, namespace ModelsNamespaceUser) (ModelsNamespaceUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -1311,9 +1285,8 @@ func (a *SharingApiService) NamespacesIdUsersPut(ctx context.Context, id int32,
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1364,16 +1337,15 @@ func (a *SharingApiService) NamespacesIdUsersPut(ctx context.Context, id int32,
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Delete a team from a namespace
Delets a team from a namespace. The team won't have access to the namespace anymore.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param teamID team ID
@return ModelsMessage*/
Delets a team from a namespace. The team won't have access to the namespace anymore.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param teamID team ID
@return ModelsMessage*/
func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDDelete(ctx context.Context, namespaceID int32, teamID int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -1392,9 +1364,8 @@ func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDDelete(ctx context.C
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1443,17 +1414,16 @@ func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDDelete(ctx context.C
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Update a team <-> namespace relation
Update a team <-> namespace relation. Mostly used to update the right that team has.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param teamID Team ID
@param namespace The team you want to update.
@return ModelsTeamNamespace*/
Update a team <-> namespace relation. Mostly used to update the right that team has.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param teamID Team ID
@param namespace The team you want to update.
@return ModelsTeamNamespace*/
func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDPost(ctx context.Context, namespaceID int32, teamID int32, namespace ModelsTeamNamespace) (ModelsTeamNamespace, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -1472,9 +1442,8 @@ func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDPost(ctx context.Con
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1525,16 +1494,15 @@ func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDPost(ctx context.Con
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Delete a user from a namespace
Delets a user from a namespace. The user won't have access to the namespace anymore.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param userID user ID
@return ModelsMessage*/
Delets a user from a namespace. The user won't have access to the namespace anymore.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param userID user ID
@return ModelsMessage*/
func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDDelete(ctx context.Context, namespaceID int32, userID int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -1553,9 +1521,8 @@ func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDDelete(ctx context.C
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1604,17 +1571,16 @@ func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDDelete(ctx context.C
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Update a user <-> namespace relation
Update a user <-> namespace relation. Mostly used to update the right that user has.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param userID User ID
@param namespace The user you want to update.
@return ModelsNamespaceUser*/
Update a user <-> namespace relation. Mostly used to update the right that user has.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param namespaceID Namespace ID
@param userID User ID
@param namespace The user you want to update.
@return ModelsNamespaceUser*/
func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDPost(ctx context.Context, namespaceID int32, userID int32, namespace ModelsNamespaceUser) (ModelsNamespaceUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -1633,9 +1599,8 @@ func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDPost(ctx context.Con
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1686,15 +1651,14 @@ func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDPost(ctx context.Con
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* SharingApiService Get an auth token for a share
Get a jwt auth token for a shared list from a share hash.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param share The share hash
@return V1Token*/
Get a jwt auth token for a shared list from a share hash.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param share The share hash
@return V1Token*/
func (a *SharingApiService) SharesShareAuthPost(ctx context.Context, share string) (V1Token, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -1712,9 +1676,8 @@ func (a *SharingApiService) SharesShareAuthPost(ctx context.Context, share strin
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -1751,7 +1714,5 @@ func (a *SharingApiService) SharesShareAuthPost(ctx context.Context, share strin
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,13 +11,13 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -27,13 +27,12 @@ var (
type TaskApiService service
/* TaskApiService Create a task
Inserts a task into a list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param task The task object
@return ModelsTask*/
Inserts a task into a list.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id List ID
@param task The task object
@return ModelsTask*/
func (a *TaskApiService) ListsIdPut(ctx context.Context, id int32, task ModelsTask) (ModelsTask, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -51,9 +50,8 @@ func (a *TaskApiService) ListsIdPut(ctx context.Context, id int32, task ModelsTa
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -104,20 +102,19 @@ func (a *TaskApiService) ListsIdPut(ctx context.Context, id int32, task ModelsTa
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Get tasks
Returns all tasks on any list the user has access to.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
Returns all tasks on any list the user has access to.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search tasks by task text.
@param "sort" (string) The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, duedate, duedatedesc, duedateasc.
@param "startdate" (int32) The start date parameter to filter by. Expects a unix timestamp. If no end date, but a start date is specified, the end date is set to the current time.
@param "enddate" (int32) The end date parameter to filter by. Expects a unix timestamp. If no start date, but an end date is specified, the start date is set to the current time.
@return []ModelsTask*/
@return []ModelsTask*/
func (a *TaskApiService) TasksAllGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsTask, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -166,7 +163,7 @@ func (a *TaskApiService) TasksAllGet(ctx context.Context, localVarOptionals map[
localVarQueryParams.Add("enddate", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -215,15 +212,14 @@ func (a *TaskApiService) TasksAllGet(ctx context.Context, localVarOptionals map[
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Update a bunch of tasks at once
Updates a bunch of tasks at once. This includes marking them as done. Note: although you could supply another ID, it will be ignored. Use task_ids instead.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param task The task object. Looks like a normal task, the only difference is it uses an array of list_ids to update.
@return ModelsTask*/
Updates a bunch of tasks at once. This includes marking them as done. Note: although you could supply another ID, it will be ignored. Use task_ids instead.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param task The task object. Looks like a normal task, the only difference is it uses an array of list_ids to update.
@return ModelsTask*/
func (a *TaskApiService) TasksBulkPost(ctx context.Context, task ModelsBulkTask) (ModelsTask, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -240,9 +236,8 @@ func (a *TaskApiService) TasksBulkPost(ctx context.Context, task ModelsBulkTask)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -293,16 +288,15 @@ func (a *TaskApiService) TasksBulkPost(ctx context.Context, task ModelsBulkTask)
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Delete an attachment
Delete an attachment.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@param attachmentID Attachment ID
@return ModelsMessage*/
Delete an attachment.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@param attachmentID Attachment ID
@return ModelsMessage*/
func (a *TaskApiService) TasksIdAttachmentsAttachmentIDDelete(ctx context.Context, id int32, attachmentID int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -321,9 +315,8 @@ func (a *TaskApiService) TasksIdAttachmentsAttachmentIDDelete(ctx context.Contex
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -372,17 +365,16 @@ func (a *TaskApiService) TasksIdAttachmentsAttachmentIDDelete(ctx context.Contex
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Get one attachment.
Get one attachment for download. **Returns json on error.**
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@param attachmentID Attachment ID
@return */
func (a *TaskApiService) TasksIdAttachmentsAttachmentIDGet(ctx context.Context, id int32, attachmentID int32) ( *http.Response, error) {
Get one attachment for download. **Returns json on error.**
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@param attachmentID Attachment ID
@return */
func (a *TaskApiService) TasksIdAttachmentsAttachmentIDGet(ctx context.Context, id int32, attachmentID int32) (*http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
@ -399,9 +391,8 @@ func (a *TaskApiService) TasksIdAttachmentsAttachmentIDGet(ctx context.Context,
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -450,10 +441,10 @@ func (a *TaskApiService) TasksIdAttachmentsAttachmentIDGet(ctx context.Context,
}
/* TaskApiService Get all attachments for one task.
Get all task attachments for one task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@return []ModelsTaskAttachment*/
Get all task attachments for one task.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@return []ModelsTaskAttachment*/
func (a *TaskApiService) TasksIdAttachmentsGet(ctx context.Context, id int32) ([]ModelsTaskAttachment, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -471,9 +462,8 @@ func (a *TaskApiService) TasksIdAttachmentsGet(ctx context.Context, id int32) ([
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -522,16 +512,15 @@ func (a *TaskApiService) TasksIdAttachmentsGet(ctx context.Context, id int32) ([
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Upload a task attachment
Upload a task attachment. You can pass multiple files with the files form param.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@param files The file, as multipart form file. You can pass multiple.
@return ModelsMessage*/
Upload a task attachment. You can pass multiple files with the files form param.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@param files The file, as multipart form file. You can pass multiple.
@return ModelsMessage*/
func (a *TaskApiService) TasksIdAttachmentsPut(ctx context.Context, id int32, files string) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -549,9 +538,8 @@ func (a *TaskApiService) TasksIdAttachmentsPut(ctx context.Context, id int32, fi
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "multipart/form-data", }
localVarHttpContentTypes := []string{"multipart/form-data"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -601,15 +589,14 @@ func (a *TaskApiService) TasksIdAttachmentsPut(ctx context.Context, id int32, fi
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Delete a task
Deletes a task from a list. This does not mean \"mark it done\".
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@return ModelsMessage*/
Deletes a task from a list. This does not mean \"mark it done\".
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@return ModelsMessage*/
func (a *TaskApiService) TasksIdDelete(ctx context.Context, id int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -627,9 +614,8 @@ func (a *TaskApiService) TasksIdDelete(ctx context.Context, id int32) (ModelsMes
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -678,16 +664,15 @@ func (a *TaskApiService) TasksIdDelete(ctx context.Context, id int32) (ModelsMes
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Update a task
Updates a task. This includes marking it as done. Assignees you pass will be updated, see their individual endpoints for more details on how this is done. To update labels, see the description of the endpoint.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@param task The task object
@return ModelsTask*/
Updates a task. This includes marking it as done. Assignees you pass will be updated, see their individual endpoints for more details on how this is done. To update labels, see the description of the endpoint.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Task ID
@param task The task object
@return ModelsTask*/
func (a *TaskApiService) TasksIdPost(ctx context.Context, id int32, task ModelsTask) (ModelsTask, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -705,9 +690,8 @@ func (a *TaskApiService) TasksIdPost(ctx context.Context, id int32, task ModelsT
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -758,15 +742,14 @@ func (a *TaskApiService) TasksIdPost(ctx context.Context, id int32, task ModelsT
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Remove a task relation
* @param ctx context.Context for authentication, logging, tracing, etc.
@param relation The relation object
@param taskID Task ID
@return ModelsMessage*/
* @param ctx context.Context for authentication, logging, tracing, etc.
@param relation The relation object
@param taskID Task ID
@return ModelsMessage*/
func (a *TaskApiService) TasksTaskIDRelationsDelete(ctx context.Context, relation ModelsTaskRelation, taskID int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -784,9 +767,8 @@ func (a *TaskApiService) TasksTaskIDRelationsDelete(ctx context.Context, relatio
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -837,16 +819,15 @@ func (a *TaskApiService) TasksTaskIDRelationsDelete(ctx context.Context, relatio
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TaskApiService Create a new relation between two tasks
Creates a new relation between two tasks. The user needs to have update rights on the base task and at least read rights on the other task. Both tasks do not need to be on the same list. Take a look at the docs for available task relation kinds.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param relation The relation object
@param taskID Task ID
@return ModelsTaskRelation*/
Creates a new relation between two tasks. The user needs to have update rights on the base task and at least read rights on the other task. Both tasks do not need to be on the same list. Take a look at the docs for available task relation kinds.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param relation The relation object
@param taskID Task ID
@return ModelsTaskRelation*/
func (a *TaskApiService) TasksTaskIDRelationsPut(ctx context.Context, relation ModelsTaskRelation, taskID int32) (ModelsTaskRelation, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -864,9 +845,8 @@ func (a *TaskApiService) TasksTaskIDRelationsPut(ctx context.Context, relation M
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -917,7 +897,5 @@ func (a *TaskApiService) TasksTaskIDRelationsPut(ctx context.Context, relation M
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,13 +11,13 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -27,14 +27,13 @@ var (
type TeamApiService service
/* TeamApiService Get teams
Returns all teams the current user is part of.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
Returns all teams the current user is part of.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
@param "p" (int32) The page number. Used for pagination. If not provided, the first page of results is returned.
@param "s" (string) Search teams by its name.
@return []ModelsTeam*/
@return []ModelsTeam*/
func (a *TeamApiService) TeamsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsTeam, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -65,7 +64,7 @@ func (a *TeamApiService) TeamsGet(ctx context.Context, localVarOptionals map[str
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -114,15 +113,14 @@ func (a *TeamApiService) TeamsGet(ctx context.Context, localVarOptionals map[str
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TeamApiService Deletes a team
Delets a team. This will also remove the access for all users in that team.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Team ID
@return ModelsMessage*/
Delets a team. This will also remove the access for all users in that team.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Team ID
@return ModelsMessage*/
func (a *TeamApiService) TeamsIdDelete(ctx context.Context, id int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -140,9 +138,8 @@ func (a *TeamApiService) TeamsIdDelete(ctx context.Context, id int32) (ModelsMes
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -191,16 +188,15 @@ func (a *TeamApiService) TeamsIdDelete(ctx context.Context, id int32) (ModelsMes
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TeamApiService Add a user to a team
Add a user to a team.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Team ID
@param team The user to be added to a team.
@return ModelsTeamMember*/
Add a user to a team.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Team ID
@param team The user to be added to a team.
@return ModelsTeamMember*/
func (a *TeamApiService) TeamsIdMembersPut(ctx context.Context, id int32, team ModelsTeamMember) (ModelsTeamMember, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -218,9 +214,8 @@ func (a *TeamApiService) TeamsIdMembersPut(ctx context.Context, id int32, team M
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -271,16 +266,15 @@ func (a *TeamApiService) TeamsIdMembersPut(ctx context.Context, id int32, team M
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TeamApiService Remove a user from a team
Remove a user from a team. This will also revoke any access this user might have via that team.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Team ID
@param userID User ID
@return ModelsMessage*/
Remove a user from a team. This will also revoke any access this user might have via that team.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Team ID
@param userID User ID
@return ModelsMessage*/
func (a *TeamApiService) TeamsIdMembersUserIDDelete(ctx context.Context, id int32, userID int32) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
@ -299,9 +293,8 @@ func (a *TeamApiService) TeamsIdMembersUserIDDelete(ctx context.Context, id int3
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ }
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -350,16 +343,15 @@ func (a *TeamApiService) TeamsIdMembersUserIDDelete(ctx context.Context, id int3
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TeamApiService Updates a team
Updates a team.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Team ID
@param team The team with updated values you want to update.
@return ModelsTeam*/
Updates a team.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param id Team ID
@param team The team with updated values you want to update.
@return ModelsTeam*/
func (a *TeamApiService) TeamsIdPost(ctx context.Context, id int32, team ModelsTeam) (ModelsTeam, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -377,9 +369,8 @@ func (a *TeamApiService) TeamsIdPost(ctx context.Context, id int32, team ModelsT
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -430,15 +421,14 @@ func (a *TeamApiService) TeamsIdPost(ctx context.Context, id int32, team ModelsT
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* TeamApiService Creates a new team
Creates a new team in a given namespace. The user needs write-access to the namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param team The team you want to create.
@return ModelsTeam*/
Creates a new team in a given namespace. The user needs write-access to the namespace.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param team The team you want to create.
@return ModelsTeam*/
func (a *TeamApiService) TeamsPut(ctx context.Context, team ModelsTeam) (ModelsTeam, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
@ -455,9 +445,8 @@ func (a *TeamApiService) TeamsPut(ctx context.Context, team ModelsTeam) (ModelsT
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -508,7 +497,5 @@ func (a *TeamApiService) TeamsPut(ctx context.Context, team ModelsTeam) (ModelsT
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,12 +11,12 @@
package swagger
import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
"golang.org/x/net/context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
@ -26,12 +26,11 @@ var (
type UserApiService service
/* UserApiService Login
Logs a user in. Returns a JWT-Token to authenticate further requests.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The login credentials
@return V1Token*/
Logs a user in. Returns a JWT-Token to authenticate further requests.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The login credentials
@return V1Token*/
func (a *UserApiService) LoginPost(ctx context.Context, credentials ModelsUserLogin) (V1Token, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -48,9 +47,8 @@ func (a *UserApiService) LoginPost(ctx context.Context, credentials ModelsUserLo
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -89,15 +87,14 @@ func (a *UserApiService) LoginPost(ctx context.Context, credentials ModelsUserLo
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* UserApiService Register
Creates a new user account.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The user credentials
@return ModelsUser*/
Creates a new user account.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The user credentials
@return ModelsUser*/
func (a *UserApiService) RegisterPost(ctx context.Context, credentials ModelsApiUserPassword) (ModelsUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -114,9 +111,8 @@ func (a *UserApiService) RegisterPost(ctx context.Context, credentials ModelsApi
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -155,15 +151,14 @@ func (a *UserApiService) RegisterPost(ctx context.Context, credentials ModelsApi
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* UserApiService Confirm the email of a new user
Confirms the email of a newly registered user.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The token.
@return ModelsMessage*/
Confirms the email of a newly registered user.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The token.
@return ModelsMessage*/
func (a *UserApiService) UserConfirmPost(ctx context.Context, credentials ModelsEmailConfirm) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -180,9 +175,8 @@ func (a *UserApiService) UserConfirmPost(ctx context.Context, credentials Models
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -221,14 +215,13 @@ func (a *UserApiService) UserConfirmPost(ctx context.Context, credentials Models
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* UserApiService Get user information
Returns the current user object.
* @param ctx context.Context for authentication, logging, tracing, etc.
@return ModelsUser*/
Returns the current user object.
* @param ctx context.Context for authentication, logging, tracing, etc.
@return ModelsUser*/
func (a *UserApiService) UserGet(ctx context.Context) (ModelsUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -245,9 +238,8 @@ func (a *UserApiService) UserGet(ctx context.Context) (ModelsUser, *http.Respon
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -296,15 +288,14 @@ func (a *UserApiService) UserGet(ctx context.Context) (ModelsUser, *http.Respon
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* UserApiService Change password
Lets the current user change its password.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param userPassword The current and new password.
@return ModelsMessage*/
Lets the current user change its password.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param userPassword The current and new password.
@return ModelsMessage*/
func (a *UserApiService) UserPasswordPost(ctx context.Context, userPassword V1UserPassword) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -321,9 +312,8 @@ func (a *UserApiService) UserPasswordPost(ctx context.Context, userPassword V1Us
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -374,15 +364,14 @@ func (a *UserApiService) UserPasswordPost(ctx context.Context, userPassword V1Us
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* UserApiService Resets a password
Resets a user email with a previously reset token.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The token with the new password.
@return ModelsMessage*/
Resets a user email with a previously reset token.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The token with the new password.
@return ModelsMessage*/
func (a *UserApiService) UserPasswordResetPost(ctx context.Context, credentials ModelsPasswordReset) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -399,9 +388,8 @@ func (a *UserApiService) UserPasswordResetPost(ctx context.Context, credentials
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -440,15 +428,14 @@ func (a *UserApiService) UserPasswordResetPost(ctx context.Context, credentials
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* UserApiService Request password reset token
Requests a token to reset a users password. The token is sent via email.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The username of the user to request a token for.
@return ModelsMessage*/
Requests a token to reset a users password. The token is sent via email.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param credentials The username of the user to request a token for.
@return ModelsMessage*/
func (a *UserApiService) UserPasswordTokenPost(ctx context.Context, credentials ModelsPasswordTokenRequest) (ModelsMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
@ -465,9 +452,8 @@ func (a *UserApiService) UserPasswordTokenPost(ctx context.Context, credentials
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -506,16 +492,15 @@ func (a *UserApiService) UserPasswordTokenPost(ctx context.Context, credentials
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}
/* UserApiService Get users
Lists all users (without emailadresses). Also possible to search for a specific user.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
Lists all users (without emailadresses). Also possible to search for a specific user.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param optional (nil or map[string]interface{}) with one or more of:
@param "s" (string) Search for a user by its name.
@return []ModelsUser*/
@return []ModelsUser*/
func (a *UserApiService) UsersGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
@ -540,7 +525,7 @@ func (a *UserApiService) UsersGet(ctx context.Context, localVarOptionals map[str
localVarQueryParams.Add("s", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", }
localVarHttpContentTypes := []string{"application/json"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@ -589,7 +574,5 @@ func (a *UserApiService) UsersGet(ctx context.Context, localVarOptionals map[str
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

View File

@ -11,6 +11,5 @@
package swagger
type V1Token struct {
Token string `json:"token,omitempty"`
}

View File

@ -11,7 +11,6 @@
package swagger
type V1UserPassword struct {
NewPassword string `json:"new_password,omitempty"`
OldPassword string `json:"old_password,omitempty"`

View File

@ -11,7 +11,6 @@
package swagger
type V1VikunjaInfos struct {
FrontendUrl string `json:"frontend_url,omitempty"`
LinkSharingEnabled bool `json:"link_sharing_enabled,omitempty"`