kolaente 1 year ago
parent
commit
31632711fd
Signed by: konrad GPG Key ID: F40E70337AB24C9B
22 changed files with 968 additions and 1110 deletions
  1. 69
      api_client.go
  2. 8
      api_response.go
  3. 117
      assignees_api.go
  4. 1
      code_vikunja_io_web_http_error.go
  5. 32
      configuration.go
  6. 1
      files_file.go
  7. 5
      go.mod
  8. 13
      go.sum
  9. 242
      labels_api.go
  10. 164
      list_api.go
  11. 1
      models_password_token_request.go
  12. 1
      models_task_assginee.go
  13. 1
      models_task_attachment.go
  14. 159
      namespace_api.go
  15. 30
      service_api.go
  16. 577
      sharing_api.go
  17. 292
      task_api.go
  18. 163
      team_api.go
  19. 199
      user_api.go
  20. 1
      v1_token.go
  21. 1
      v1_user_password.go
  22. 1
      v1_vikunja_infos.go

69
api_client.go

@ -14,45 +14,45 @@ 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"
"strconv"
"strings"
"time"
"unicode/utf8"
"strconv"
)
var (
jsonCheck = regexp.MustCompile("(?i:[application|text]/json)")
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
)
// APIClient manages communication with the Vikunja API API v0.8+21-854fde1e4c
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
cfg *Configuration
common service // Reuse a single struct instead of allocating one for each service on the heap.
// API Services
AssigneesApi *AssigneesApiService
LabelsApi *LabelsApiService
ListApi *ListApiService
NamespaceApi *NamespaceApiService
ServiceApi *ServiceApiService
SharingApi *SharingApiService
TaskApi *TaskApiService
TeamApi *TeamApiService
UserApi *UserApiService
cfg *Configuration
common service // Reuse a single struct instead of allocating one for each service on the heap.
// API Services
AssigneesApi *AssigneesApiService
LabelsApi *LabelsApiService
ListApi *ListApiService
NamespaceApi *NamespaceApiService
ServiceApi *ServiceApiService
SharingApi *SharingApiService
TaskApi *TaskApiService
TeamApi *TeamApiService
UserApi *UserApiService
}
type service struct {
@ -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 {
@ -159,18 +158,18 @@ func parameterToString(obj interface{}, collectionFormat string) string {
return fmt.Sprintf("%v", obj)
}
// callAPI do the request.
// callAPI do the request.
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
return c.cfg.HTTPClient.Do(request)
return c.cfg.HTTPClient.Do(request)
}
// 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{},
@ -230,7 +229,7 @@ func (c *APIClient) prepareRequest (
// Set the Boundary in the Content-Type
headerParams["Content-Type"] = w.FormDataContentType()
}
// Set Content-Length
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
w.Close()
@ -276,10 +275,9 @@ func (c *APIClient) prepareRequest (
if c.cfg.Host != "" {
localVarRequest.Host = c.cfg.Host
}
// Add the user agent to the request.
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
if ctx != nil {
// add context to the request
@ -305,18 +303,17 @@ 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)
}
}
for header, value := range c.cfg.DefaultHeader {
localVarRequest.Header.Add(header, value)
}
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...)
}
@ -372,7 +369,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e
func detectContentType(body interface{}) string {
contentType := "text/plain; charset=utf-8"
kind := reflect.TypeOf(body).Kind()
switch kind {
case reflect.Struct, reflect.Map, reflect.Ptr:
contentType = "application/json; charset=utf-8"
@ -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"))
@ -420,7 +416,7 @@ func CacheExpires(r *http.Response) (time.Time) {
return time.Now()
}
respCacheControl := parseCacheControl(r.Header)
if maxAge, ok := respCacheControl["max-age"]; ok {
lifetime, err := time.ParseDuration(maxAge + "s")
if err != nil {
@ -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)
}

8
api_response.go

@ -16,15 +16,15 @@ import (
type APIResponse struct {
*http.Response `json:"-"`
Message string `json:"message,omitempty"`
Message string `json:"message,omitempty"`
// Operation is the name of the swagger operation.
Operation string `json:"operation,omitempty"`
Operation string `json:"operation,omitempty"`
// RequestURL is the request URL. This value is always available, even if the
// embedded *http.Response is nil.
RequestURL string `json:"url,omitempty"`
RequestURL string `json:"url,omitempty"`
// Method is the HTTP method used for the request. This value is always
// available, even if the embedded *http.Response is nil.
Method string `json:"method,omitempty"`
Method string `json:"method,omitempty"`
// Payload holds the contents of the response body (which may be nil or empty).
// This is provided here as the raw response.Body() reader will have already
// been drained.

117
assignees_api.go

@ -11,13 +11,13 @@
package swagger
import (
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/url"
"net/http"
"net/url"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
)
// Linger please
@ -27,20 +27,19 @@ 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*/
func (a *AssigneesApiService) TasksTaskIDAssigneesBulkPost(ctx context.Context, assignee ModelsBulkAssignees, taskID int32) (ModelsTaskAssginee, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsTaskAssginee
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsTaskAssginee
)
// create path and map variables
@ -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)
@ -64,7 +62,7 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesBulkPost(ctx context.Context,
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -104,25 +102,24 @@ 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:
@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*/
func (a *AssigneesApiService) TasksTaskIDAssigneesGet(ctx context.Context, taskID int32, localVarOptionals map[string]interface{}) ([]ModelsUser, *http.Response, error) {
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*/
func (a *AssigneesApiService) TasksTaskIDAssigneesGet(ctx context.Context, taskID int32, localVarOptionals map[string]interface{}) ([]ModelsUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsUser
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsUser
)
// create path and map variables
@ -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)
@ -158,7 +155,7 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesGet(ctx context.Context, taskI
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -196,23 +193,22 @@ 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*/
func (a *AssigneesApiService) TasksTaskIDAssigneesPut(ctx context.Context, assignee ModelsTaskAssginee, taskID int32) (ModelsTaskAssginee, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsTaskAssginee
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsTaskAssginee
)
// create path and map variables
@ -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)
@ -236,7 +231,7 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesPut(ctx context.Context, assig
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -276,23 +271,22 @@ 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*/
func (a *AssigneesApiService) TasksTaskIDAssigneesUserIDDelete(ctx context.Context, taskID int32, userID int32) (ModelsMessage, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsMessage
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsMessage
)
// create path and map variables
@ -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)
@ -317,7 +310,7 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesUserIDDelete(ctx context.Conte
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -355,7 +348,5 @@ func (a *AssigneesApiService) TasksTaskIDAssigneesUserIDDelete(ctx context.Conte
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

1
code_vikunja_io_web_http_error.go

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

32
configuration.go

@ -26,37 +26,37 @@ func (c contextKey) String() string {
var (
// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
ContextOAuth2 = contextKey("token")
ContextOAuth2 = contextKey("token")
// ContextBasicAuth takes BasicAuth as authentication for the request.
ContextBasicAuth = contextKey("basic")
ContextBasicAuth = contextKey("basic")
// ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAccessToken = contextKey("accesstoken")
ContextAccessToken = contextKey("accesstoken")
// ContextAPIKey takes an APIKey as authentication for the request
ContextAPIKey = contextKey("apikey")
ContextAPIKey = contextKey("apikey")
)
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BasicAuth struct {
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
}
// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIKey struct {
Key string
Prefix string
Key string
Prefix string
}
type Configuration struct {
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
HTTPClient *http.Client
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
HTTPClient *http.Client
}
func NewConfiguration() *Configuration {
@ -70,4 +70,4 @@ func NewConfiguration() *Configuration {
func (c *Configuration) AddDefaultHeader(key string, value string) {
c.DefaultHeader[key] = value
}
}

1
files_file.go

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

5
go.mod

@ -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

@ -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=

242
labels_api.go

@ -11,13 +11,13 @@
package swagger
import (
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/url"
"net/http"
"net/url"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
)
// Linger please
@ -27,21 +27,20 @@ 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:
@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*/
func (a *LabelsApiService) LabelsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsLabel, *http.Response, error) {
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*/
func (a *LabelsApiService) LabelsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsLabel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsLabel
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsLabel
)
// create path and map variables
@ -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)
@ -76,7 +75,7 @@ func (a *LabelsApiService) LabelsGet(ctx context.Context, localVarOptionals map[
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -114,22 +113,21 @@ 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*/
func (a *LabelsApiService) LabelsIdDelete(ctx context.Context, id int32) (ModelsLabel, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabel
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabel
)
// create path and map variables
@ -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)
@ -153,7 +150,7 @@ func (a *LabelsApiService) LabelsIdDelete(ctx context.Context, id int32) (Models
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -191,22 +188,21 @@ 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*/
func (a *LabelsApiService) LabelsIdGet(ctx context.Context, id int32) (ModelsLabel, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabel
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabel
)
// create path and map variables
@ -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)
@ -230,7 +225,7 @@ func (a *LabelsApiService) LabelsIdGet(ctx context.Context, id int32) (ModelsLab
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -268,23 +263,22 @@ 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*/
func (a *LabelsApiService) LabelsIdPut(ctx context.Context, id int32, label ModelsLabel) (ModelsLabel, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabel
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabel
)
// create path and map variables
@ -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)
@ -308,7 +301,7 @@ func (a *LabelsApiService) LabelsIdPut(ctx context.Context, id int32, label Mode
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -348,22 +341,21 @@ 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*/
func (a *LabelsApiService) LabelsPut(ctx context.Context, label ModelsLabel) (ModelsLabel, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabel
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabel
)
// create path and map variables
@ -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)
@ -386,7 +377,7 @@ func (a *LabelsApiService) LabelsPut(ctx context.Context, label ModelsLabel) (Mo
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -426,23 +417,22 @@ 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*/
func (a *LabelsApiService) TasksTaskIDLabelsBulkPost(ctx context.Context, label ModelsLabelTaskBulk, taskID int32) (ModelsLabelTaskBulk, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabelTaskBulk
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabelTaskBulk
)
// create path and map variables
@ -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)
@ -466,7 +455,7 @@ func (a *LabelsApiService) TasksTaskIDLabelsBulkPost(ctx context.Context, label
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -506,25 +495,24 @@ 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:
@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*/
func (a *LabelsApiService) TasksTaskLabelsGet(ctx context.Context, task int32, localVarOptionals map[string]interface{}) ([]ModelsLabel, *http.Response, error) {
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*/
func (a *LabelsApiService) TasksTaskLabelsGet(ctx context.Context, task int32, localVarOptionals map[string]interface{}) ([]ModelsLabel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsLabel
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsLabel
)
// create path and map variables
@ -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)
@ -560,7 +548,7 @@ func (a *LabelsApiService) TasksTaskLabelsGet(ctx context.Context, task int32, l
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -598,23 +586,22 @@ 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*/
func (a *LabelsApiService) TasksTaskLabelsLabelDelete(ctx context.Context, task int32, label int32) (ModelsMessage, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsMessage
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsMessage
)
// create path and map variables
@ -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)
@ -639,7 +625,7 @@ func (a *LabelsApiService) TasksTaskLabelsLabelDelete(ctx context.Context, task
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -677,23 +663,22 @@ 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*/
func (a *LabelsApiService) TasksTaskLabelsPut(ctx context.Context, task int32, label ModelsLabelTask) (ModelsLabelTask, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabelTask
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsLabelTask
)
// create path and map variables
@ -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)
@ -717,7 +701,7 @@ func (a *LabelsApiService) TasksTaskLabelsPut(ctx context.Context, task int32, l
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -757,7 +741,5 @@ func (a *LabelsApiService) TasksTaskLabelsPut(ctx context.Context, task int32, l
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

164
list_api.go

@ -11,13 +11,13 @@
package swagger
import (
"encoding/json"
"fmt"
"golang.org/x/net/context"
"io/ioutil"
"net/url"
"net/http"
"net/url"
"strings"
"golang.org/x/net/context"
"encoding/json"
"fmt"
)
// Linger please
@ -27,21 +27,20 @@ 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:
@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*/
func (a *ListApiService) ListsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsList, *http.Response, error) {
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*/
func (a *ListApiService) ListsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsList, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsList
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsList
)
// create path and map variables
@ -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)
@ -76,7 +75,7 @@ func (a *ListApiService) ListsGet(ctx context.Context, localVarOptionals map[str
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -114,22 +113,21 @@ 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*/
func (a *ListApiService) ListsIdDelete(ctx context.Context, id int32) (ModelsMessage, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsMessage
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsMessage
)
// create path and map variables
@ -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)
@ -153,7 +150,7 @@ func (a *ListApiService) ListsIdDelete(ctx context.Context, id int32) (ModelsMes
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -191,22 +188,21 @@ 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*/
func (a *ListApiService) ListsIdGet(ctx context.Context, id int32) (ModelsList, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsList
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsList
)
// create path and map variables
@ -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)
@ -230,7 +225,7 @@ func (a *ListApiService) ListsIdGet(ctx context.Context, id int32) (ModelsList,
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -268,24 +263,23 @@ 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:
@param "s" (string) Search for a user by its name.
@return []ModelsUser*/
func (a *ListApiService) ListsIdListusersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUser, *http.Response, error) {
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*/
func (a *ListApiService) ListsIdListusersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUser, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsUser
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload []ModelsUser
)
// create path and map variables
@ -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)
@ -315,7 +309,7 @@ func (a *ListApiService) ListsIdListusersGet(ctx context.Context, id int32, loca
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -353,23 +347,22 @@ 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*/
func (a *ListApiService) ListsIdPost(ctx context.Context, id int32, list ModelsList) (ModelsList, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsList
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsList
)
// create path and map variables
@ -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)
@ -393,7 +385,7 @@ func (a *ListApiService) ListsIdPost(ctx context.Context, id int32, list ModelsL
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -433,23 +425,22 @@ 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*/
func (a *ListApiService) NamespacesNamespaceIDListsPut(ctx context.Context, namespaceID int32, list ModelsList) (ModelsList, *http.Response, error) {
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")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsList
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload ModelsList
)
// create path and map variables
@ -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)
@ -473,7 +463,7 @@ func (a *ListApiService) NamespacesNamespaceIDListsPut(ctx context.Context, name
// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
}
}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -513,7 +503,5 @@ func (a *ListApiService) NamespacesNamespaceIDListsPut(ctx context.Context, name
return successPayload, localVarHttpResponse, err
}
return successPayload, localVarHttpResponse, err
}

1
models_password_token_request.go

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