diff --git a/api_client.go b/api_client.go index 2eb1a0b..4160f94 100644 --- a/api_client.go +++ b/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" - "strings" - "unicode/utf8" "strconv" + "strings" + "time" + "unicode/utf8" ) 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. + 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 + // 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) } - diff --git a/api_response.go b/api_response.go index 5ee0c7c..69ef966 100644 --- a/api_response.go +++ b/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. diff --git a/assignees_api.go b/assignees_api.go index c7bec58..059933c 100644 --- a/assignees_api.go +++ b/assignees_api.go @@ -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,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 } - diff --git a/code_vikunja_io_web_http_error.go b/code_vikunja_io_web_http_error.go index 693cab7..6ef0662 100644 --- a/code_vikunja_io_web_http_error.go +++ b/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"` diff --git a/configuration.go b/configuration.go index ef0b7ba..c3b27be 100644 --- a/configuration.go +++ b/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 -} \ No newline at end of file +} diff --git a/files_file.go b/files_file.go index f37f413..6426226 100644 --- a/files_file.go +++ b/files_file.go @@ -11,7 +11,6 @@ package swagger type FilesFile struct { - Created string `json:"created,omitempty"` Id int32 `json:"id,omitempty"` diff --git a/go.mod b/go.mod index 738879d..8183840 100644 --- a/go.mod +++ b/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 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..2005b0e --- /dev/null +++ b/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= diff --git a/labels_api.go b/labels_api.go index a88658b..e792f2e 100644 --- a/labels_api.go +++ b/labels_api.go @@ -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,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 } - diff --git a/list_api.go b/list_api.go index a29e55c..b5e29ce 100644 --- a/list_api.go +++ b/list_api.go @@ -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,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 } - diff --git a/models_password_token_request.go b/models_password_token_request.go index ddc7fae..790b218 100644 --- a/models_password_token_request.go +++ b/models_password_token_request.go @@ -11,6 +11,5 @@ package swagger type ModelsPasswordTokenRequest struct { - Email string `json:"email,omitempty"` } diff --git a/models_task_assginee.go b/models_task_assginee.go index a825b1a..a9ac828 100644 --- a/models_task_assginee.go +++ b/models_task_assginee.go @@ -11,7 +11,6 @@ package swagger type ModelsTaskAssginee struct { - Created int32 `json:"created,omitempty"` UserId int32 `json:"user_id,omitempty"` diff --git a/models_task_attachment.go b/models_task_attachment.go index e510517..7e02b2c 100644 --- a/models_task_attachment.go +++ b/models_task_attachment.go @@ -11,7 +11,6 @@ package swagger type ModelsTaskAttachment struct { - Created int32 `json:"created,omitempty"` CreatedBy *ModelsUser `json:"created_by,omitempty"` diff --git a/namespace_api.go b/namespace_api.go index fe0b535..821b3b2 100644 --- a/namespace_api.go +++ b/namespace_api.go @@ -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,20 +27,19 @@ 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*/ -func (a *NamespaceApiService) NamespaceIdPost(ctx context.Context, id int32, namespace ModelsNamespace) (ModelsNamespace, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsNamespace + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsNamespace ) // create path and map variables @@ -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) @@ -64,7 +62,7 @@ func (a *NamespaceApiService) NamespaceIdPost(ctx context.Context, id int32, nam // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -104,24 +102,23 @@ 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: - @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*/ -func (a *NamespaceApiService) NamespacesGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsNamespaceWithLists, *http.Response, error) { +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*/ +func (a *NamespaceApiService) NamespacesGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsNamespaceWithLists, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsNamespaceWithLists + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsNamespaceWithLists ) // create path and map variables @@ -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) @@ -156,7 +153,7 @@ func (a *NamespaceApiService) NamespacesGet(ctx context.Context, localVarOptiona // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -194,22 +191,21 @@ 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*/ -func (a *NamespaceApiService) NamespacesIdDelete(ctx context.Context, id int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -233,7 +228,7 @@ func (a *NamespaceApiService) NamespacesIdDelete(ctx context.Context, id int32) // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -271,22 +266,21 @@ 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*/ -func (a *NamespaceApiService) NamespacesIdGet(ctx context.Context, id int32) (ModelsNamespace, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsNamespace + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsNamespace ) // create path and map variables @@ -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) @@ -310,7 +303,7 @@ func (a *NamespaceApiService) NamespacesIdGet(ctx context.Context, id int32) (Mo // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -348,22 +341,21 @@ 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*/ -func (a *NamespaceApiService) NamespacesIdListsGet(ctx context.Context, id int32) ([]ModelsList, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsList + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsList ) // create path and map variables @@ -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) @@ -387,7 +378,7 @@ func (a *NamespaceApiService) NamespacesIdListsGet(ctx context.Context, id int32 // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -425,22 +416,21 @@ 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*/ -func (a *NamespaceApiService) NamespacesPut(ctx context.Context, namespace ModelsNamespace) (ModelsNamespace, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsNamespace + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsNamespace ) // create path and map variables @@ -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) @@ -463,7 +452,7 @@ func (a *NamespaceApiService) NamespacesPut(ctx context.Context, namespace Model // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -503,7 +492,5 @@ func (a *NamespaceApiService) NamespacesPut(ctx context.Context, namespace Model return successPayload, localVarHttpResponse, err } - return successPayload, localVarHttpResponse, err } - diff --git a/service_api.go b/service_api.go index 40971fd..3f1bfb8 100644 --- a/service_api.go +++ b/service_api.go @@ -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,18 +26,17 @@ 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*/ -func (a *ServiceApiService) InfoGet(ctx context.Context) (V1VikunjaInfos, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload V1VikunjaInfos + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload V1VikunjaInfos ) // create path and map variables @@ -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) @@ -60,7 +58,7 @@ func (a *ServiceApiService) InfoGet(ctx context.Context) (V1VikunjaInfos, *http // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -86,7 +84,5 @@ func (a *ServiceApiService) InfoGet(ctx context.Context) (V1VikunjaInfos, *http return successPayload, localVarHttpResponse, err } - return successPayload, localVarHttpResponse, err } - diff --git a/sharing_api.go b/sharing_api.go index 48c5e1d..92908a8 100644 --- a/sharing_api.go +++ b/sharing_api.go @@ -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,22 +27,21 @@ 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: - @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*/ -func (a *SharingApiService) ListsIdTeamsGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsTeamWithRight, *http.Response, error) { +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*/ +func (a *SharingApiService) ListsIdTeamsGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsTeamWithRight, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsTeamWithRight + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsTeamWithRight ) // create path and map variables @@ -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) @@ -78,7 +77,7 @@ func (a *SharingApiService) ListsIdTeamsGet(ctx context.Context, id int32, local // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -116,23 +115,22 @@ 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*/ -func (a *SharingApiService) ListsIdTeamsPut(ctx context.Context, id int32, list ModelsTeamList) (ModelsTeamList, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTeamList + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTeamList ) // create path and map variables @@ -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) @@ -156,7 +153,7 @@ func (a *SharingApiService) ListsIdTeamsPut(ctx context.Context, id int32, list // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -196,25 +193,24 @@ 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: - @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*/ -func (a *SharingApiService) ListsIdUsersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUserWithRight, *http.Response, error) { +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*/ +func (a *SharingApiService) ListsIdUsersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUserWithRight, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsUserWithRight + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsUserWithRight ) // create path and map variables @@ -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) @@ -250,7 +246,7 @@ func (a *SharingApiService) ListsIdUsersGet(ctx context.Context, id int32, local // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -288,23 +284,22 @@ 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*/ -func (a *SharingApiService) ListsIdUsersPut(ctx context.Context, id int32, list ModelsListUser) (ModelsListUser, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsListUser + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsListUser ) // create path and map variables @@ -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) @@ -328,7 +322,7 @@ func (a *SharingApiService) ListsIdUsersPut(ctx context.Context, id int32, list // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -368,23 +362,22 @@ 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*/ -func (a *SharingApiService) ListsListIDTeamsTeamIDDelete(ctx context.Context, listID int32, teamID int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -409,7 +401,7 @@ func (a *SharingApiService) ListsListIDTeamsTeamIDDelete(ctx context.Context, li // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -447,24 +439,23 @@ 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*/ -func (a *SharingApiService) ListsListIDTeamsTeamIDPost(ctx context.Context, listID int32, teamID int32, list ModelsTeamList) (ModelsTeamList, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTeamList + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTeamList ) // create path and map variables @@ -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) @@ -489,7 +479,7 @@ func (a *SharingApiService) ListsListIDTeamsTeamIDPost(ctx context.Context, list // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -529,23 +519,22 @@ 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*/ -func (a *SharingApiService) ListsListIDUsersUserIDDelete(ctx context.Context, listID int32, userID int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -570,7 +558,7 @@ func (a *SharingApiService) ListsListIDUsersUserIDDelete(ctx context.Context, li // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -608,24 +596,23 @@ 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*/ -func (a *SharingApiService) ListsListIDUsersUserIDPost(ctx context.Context, listID int32, userID int32, list ModelsListUser) (ModelsListUser, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsListUser + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsListUser ) // create path and map variables @@ -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) @@ -650,7 +636,7 @@ func (a *SharingApiService) ListsListIDUsersUserIDPost(ctx context.Context, list // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -690,25 +676,24 @@ 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: - @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*/ -func (a *SharingApiService) ListsListSharesGet(ctx context.Context, list int32, localVarOptionals map[string]interface{}) ([]ModelsLinkSharing, *http.Response, error) { +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*/ +func (a *SharingApiService) ListsListSharesGet(ctx context.Context, list int32, localVarOptionals map[string]interface{}) ([]ModelsLinkSharing, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsLinkSharing + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsLinkSharing ) // create path and map variables @@ -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) @@ -744,7 +729,7 @@ func (a *SharingApiService) ListsListSharesGet(ctx context.Context, list int32, // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -782,23 +767,22 @@ 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*/ -func (a *SharingApiService) ListsListSharesPut(ctx context.Context, list int32, label ModelsLinkSharing) (ModelsLinkSharing, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsLinkSharing + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsLinkSharing ) // create path and map variables @@ -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) @@ -822,7 +805,7 @@ func (a *SharingApiService) ListsListSharesPut(ctx context.Context, list int32, // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -862,23 +845,22 @@ 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*/ -func (a *SharingApiService) ListsListSharesShareDelete(ctx context.Context, list int32, share int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -903,7 +884,7 @@ func (a *SharingApiService) ListsListSharesShareDelete(ctx context.Context, list // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -941,23 +922,22 @@ 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*/ -func (a *SharingApiService) ListsListSharesShareGet(ctx context.Context, list int32, share int32) (ModelsLinkSharing, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsLinkSharing + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsLinkSharing ) // create path and map variables @@ -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) @@ -982,7 +961,7 @@ func (a *SharingApiService) ListsListSharesShareGet(ctx context.Context, list in // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1020,25 +999,24 @@ 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: - @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*/ -func (a *SharingApiService) NamespacesIdTeamsGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsTeamWithRight, *http.Response, error) { +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*/ +func (a *SharingApiService) NamespacesIdTeamsGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsTeamWithRight, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsTeamWithRight + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsTeamWithRight ) // create path and map variables @@ -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) @@ -1074,7 +1052,7 @@ func (a *SharingApiService) NamespacesIdTeamsGet(ctx context.Context, id int32, // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1112,23 +1090,22 @@ 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*/ -func (a *SharingApiService) NamespacesIdTeamsPut(ctx context.Context, id int32, namespace ModelsTeamNamespace) (ModelsTeamNamespace, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTeamNamespace + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTeamNamespace ) // create path and map variables @@ -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) @@ -1152,7 +1128,7 @@ func (a *SharingApiService) NamespacesIdTeamsPut(ctx context.Context, id int32, // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1192,25 +1168,24 @@ 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: - @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*/ -func (a *SharingApiService) NamespacesIdUsersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUserWithRight, *http.Response, error) { +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*/ +func (a *SharingApiService) NamespacesIdUsersGet(ctx context.Context, id int32, localVarOptionals map[string]interface{}) ([]ModelsUserWithRight, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsUserWithRight + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsUserWithRight ) // create path and map variables @@ -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) @@ -1246,7 +1221,7 @@ func (a *SharingApiService) NamespacesIdUsersGet(ctx context.Context, id int32, // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1284,23 +1259,22 @@ 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*/ -func (a *SharingApiService) NamespacesIdUsersPut(ctx context.Context, id int32, namespace ModelsNamespaceUser) (ModelsNamespaceUser, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsNamespaceUser + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsNamespaceUser ) // create path and map variables @@ -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) @@ -1324,7 +1297,7 @@ func (a *SharingApiService) NamespacesIdUsersPut(ctx context.Context, id int32, // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1364,23 +1337,22 @@ 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*/ -func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDDelete(ctx context.Context, namespaceID int32, teamID int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -1405,7 +1376,7 @@ func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDDelete(ctx context.C // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1443,24 +1414,23 @@ 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*/ -func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDPost(ctx context.Context, namespaceID int32, teamID int32, namespace ModelsTeamNamespace) (ModelsTeamNamespace, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTeamNamespace + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTeamNamespace ) // create path and map variables @@ -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) @@ -1485,7 +1454,7 @@ func (a *SharingApiService) NamespacesNamespaceIDTeamsTeamIDPost(ctx context.Con // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1525,23 +1494,22 @@ 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*/ -func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDDelete(ctx context.Context, namespaceID int32, userID int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -1566,7 +1533,7 @@ func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDDelete(ctx context.C // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1604,24 +1571,23 @@ 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*/ -func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDPost(ctx context.Context, namespaceID int32, userID int32, namespace ModelsNamespaceUser) (ModelsNamespaceUser, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsNamespaceUser + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsNamespaceUser ) // create path and map variables @@ -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) @@ -1646,7 +1611,7 @@ func (a *SharingApiService) NamespacesNamespaceIDUsersUserIDPost(ctx context.Con // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1686,22 +1651,21 @@ 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*/ -func (a *SharingApiService) SharesShareAuthPost(ctx context.Context, share string) (V1Token, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload V1Token + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload V1Token ) // create path and map variables @@ -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) @@ -1725,7 +1688,7 @@ func (a *SharingApiService) SharesShareAuthPost(ctx context.Context, share strin // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -1751,7 +1714,5 @@ func (a *SharingApiService) SharesShareAuthPost(ctx context.Context, share strin return successPayload, localVarHttpResponse, err } - return successPayload, localVarHttpResponse, err } - diff --git a/task_api.go b/task_api.go index 0a1b5c1..82dd599 100644 --- a/task_api.go +++ b/task_api.go @@ -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,20 +27,19 @@ 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*/ -func (a *TaskApiService) ListsIdPut(ctx context.Context, id int32, task ModelsTask) (ModelsTask, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTask + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTask ) // create path and map variables @@ -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) @@ -64,7 +62,7 @@ func (a *TaskApiService) ListsIdPut(ctx context.Context, id int32, task ModelsTa // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -104,27 +102,26 @@ 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: - @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*/ -func (a *TaskApiService) TasksAllGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsTask, *http.Response, error) { +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*/ +func (a *TaskApiService) TasksAllGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsTask, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsTask + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsTask ) // create path and map variables @@ -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) @@ -177,7 +174,7 @@ func (a *TaskApiService) TasksAllGet(ctx context.Context, localVarOptionals map[ // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -215,22 +212,21 @@ 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*/ -func (a *TaskApiService) TasksBulkPost(ctx context.Context, task ModelsBulkTask) (ModelsTask, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTask + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTask ) // create path and map variables @@ -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) @@ -253,7 +248,7 @@ func (a *TaskApiService) TasksBulkPost(ctx context.Context, task ModelsBulkTask) // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -293,23 +288,22 @@ 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*/ -func (a *TaskApiService) TasksIdAttachmentsAttachmentIDDelete(ctx context.Context, id int32, attachmentID int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -334,7 +327,7 @@ func (a *TaskApiService) TasksIdAttachmentsAttachmentIDDelete(ctx context.Contex // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -372,22 +365,21 @@ 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{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -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) @@ -412,7 +403,7 @@ func (a *TaskApiService) TasksIdAttachmentsAttachmentIDGet(ctx context.Context, // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/octet-stream", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -450,17 +441,17 @@ 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*/ -func (a *TaskApiService) TasksIdAttachmentsGet(ctx context.Context, id int32) ([]ModelsTaskAttachment, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsTaskAttachment + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsTaskAttachment ) // create path and map variables @@ -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) @@ -484,7 +474,7 @@ func (a *TaskApiService) TasksIdAttachmentsGet(ctx context.Context, id int32) ([ // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -522,23 +512,22 @@ 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*/ -func (a *TaskApiService) TasksIdAttachmentsPut(ctx context.Context, id int32, files string) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -562,7 +550,7 @@ func (a *TaskApiService) TasksIdAttachmentsPut(ctx context.Context, id int32, fi // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -601,22 +589,21 @@ 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*/ -func (a *TaskApiService) TasksIdDelete(ctx context.Context, id int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -640,7 +626,7 @@ func (a *TaskApiService) TasksIdDelete(ctx context.Context, id int32) (ModelsMes // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -678,23 +664,22 @@ 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*/ -func (a *TaskApiService) TasksIdPost(ctx context.Context, id int32, task ModelsTask) (ModelsTask, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTask + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTask ) // create path and map variables @@ -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) @@ -718,7 +702,7 @@ func (a *TaskApiService) TasksIdPost(ctx context.Context, id int32, task ModelsT // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -758,22 +742,21 @@ 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*/ -func (a *TaskApiService) TasksTaskIDRelationsDelete(ctx context.Context, relation ModelsTaskRelation, taskID int32) (ModelsMessage, *http.Response, error) { +* @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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -797,7 +779,7 @@ func (a *TaskApiService) TasksTaskIDRelationsDelete(ctx context.Context, relatio // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -837,23 +819,22 @@ 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*/ -func (a *TaskApiService) TasksTaskIDRelationsPut(ctx context.Context, relation ModelsTaskRelation, taskID int32) (ModelsTaskRelation, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTaskRelation + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTaskRelation ) // create path and map variables @@ -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) @@ -877,7 +857,7 @@ func (a *TaskApiService) TasksTaskIDRelationsPut(ctx context.Context, relation M // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -917,7 +897,5 @@ func (a *TaskApiService) TasksTaskIDRelationsPut(ctx context.Context, relation M return successPayload, localVarHttpResponse, err } - return successPayload, localVarHttpResponse, err } - diff --git a/team_api.go b/team_api.go index 6fc1700..4f2d478 100644 --- a/team_api.go +++ b/team_api.go @@ -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,21 +27,20 @@ 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: - @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*/ -func (a *TeamApiService) TeamsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsTeam, *http.Response, error) { +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*/ +func (a *TeamApiService) TeamsGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ModelsTeam, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload []ModelsTeam + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []ModelsTeam ) // create path and map variables @@ -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) @@ -76,7 +75,7 @@ func (a *TeamApiService) TeamsGet(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 *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*/ -func (a *TeamApiService) TeamsIdDelete(ctx context.Context, id int32) (ModelsMessage, *http.Response, error) { +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") - 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 *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) @@ -153,7 +150,7 @@ func (a *TeamApiService) TeamsIdDelete(ctx context.Context, id int32) (ModelsMes // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -191,23 +188,22 @@ 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*/ -func (a *TeamApiService) TeamsIdMembersPut(ctx context.Context, id int32, team ModelsTeamMember) (ModelsTeamMember, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTeamMember + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTeamMember ) // create path and map variables @@ -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) @@ -231,7 +226,7 @@ func (a *TeamApiService) TeamsIdMembersPut(ctx context.Context, id int32, team M // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -271,23 +266,22 @@ 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*/ -func (a *TeamApiService) TeamsIdMembersUserIDDelete(ctx context.Context, id int32, userID int32) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -312,7 +305,7 @@ func (a *TeamApiService) TeamsIdMembersUserIDDelete(ctx context.Context, id int3 // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -350,23 +343,22 @@ 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*/ -func (a *TeamApiService) TeamsIdPost(ctx context.Context, id int32, team ModelsTeam) (ModelsTeam, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTeam + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTeam ) // create path and map variables @@ -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) @@ -390,7 +381,7 @@ func (a *TeamApiService) TeamsIdPost(ctx context.Context, id int32, team ModelsT // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -430,22 +421,21 @@ 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*/ -func (a *TeamApiService) TeamsPut(ctx context.Context, team ModelsTeam) (ModelsTeam, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsTeam + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsTeam ) // create path and map variables @@ -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) @@ -468,7 +457,7 @@ func (a *TeamApiService) TeamsPut(ctx context.Context, team ModelsTeam) (ModelsT // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -508,7 +497,5 @@ func (a *TeamApiService) TeamsPut(ctx context.Context, team ModelsTeam) (ModelsT return successPayload, localVarHttpResponse, err } - return successPayload, localVarHttpResponse, err } - diff --git a/user_api.go b/user_api.go index 3b76c95..064cd35 100644 --- a/user_api.go +++ b/user_api.go @@ -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,19 +26,18 @@ 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*/ -func (a *UserApiService) LoginPost(ctx context.Context, credentials ModelsUserLogin) (V1Token, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload V1Token + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload V1Token ) // create path and map variables @@ -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) @@ -61,7 +59,7 @@ func (a *UserApiService) LoginPost(ctx context.Context, credentials ModelsUserLo // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -89,22 +87,21 @@ 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*/ -func (a *UserApiService) RegisterPost(ctx context.Context, credentials ModelsApiUserPassword) (ModelsUser, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsUser + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsUser ) // create path and map variables @@ -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) @@ -127,7 +123,7 @@ func (a *UserApiService) RegisterPost(ctx context.Context, credentials ModelsApi // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -155,22 +151,21 @@ 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*/ -func (a *UserApiService) UserConfirmPost(ctx context.Context, credentials ModelsEmailConfirm) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -193,7 +187,7 @@ func (a *UserApiService) UserConfirmPost(ctx context.Context, credentials Models // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -221,21 +215,20 @@ 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*/ -func (a *UserApiService) UserGet(ctx context.Context) (ModelsUser, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsUser + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsUser ) // create path and map variables @@ -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) @@ -258,7 +250,7 @@ func (a *UserApiService) UserGet(ctx context.Context) (ModelsUser, *http.Respon // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -296,22 +288,21 @@ 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*/ -func (a *UserApiService) UserPasswordPost(ctx context.Context, userPassword V1UserPassword) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -334,7 +324,7 @@ func (a *UserApiService) UserPasswordPost(ctx context.Context, userPassword V1Us // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -374,22 +364,21 @@ 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*/ -func (a *UserApiService) UserPasswordResetPost(ctx context.Context, credentials ModelsPasswordReset) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -412,7 +400,7 @@ func (a *UserApiService) UserPasswordResetPost(ctx context.Context, credentials // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -440,22 +428,21 @@ 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*/ -func (a *UserApiService) UserPasswordTokenPost(ctx context.Context, credentials ModelsPasswordTokenRequest) (ModelsMessage, *http.Response, error) { +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") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - successPayload ModelsMessage + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload ModelsMessage ) // create path and map variables @@ -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) @@ -478,7 +464,7 @@ func (a *UserApiService) UserPasswordTokenPost(ctx context.Context, credentials // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -506,23 +492,22 @@ 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: - @param "s" (string) Search for a user by its name. - @return []ModelsUser*/ -func (a *UserApiService) UsersGet(ctx context.Context, 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 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 *UserApiService) UsersGet(ctx context.Context, 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 @@ -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) @@ -551,7 +536,7 @@ func (a *UserApiService) UsersGet(ctx context.Context, localVarOptionals map[str // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", - } + } // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -589,7 +574,5 @@ func (a *UserApiService) UsersGet(ctx context.Context, localVarOptionals map[str return successPayload, localVarHttpResponse, err } - return successPayload, localVarHttpResponse, err } - diff --git a/v1_token.go b/v1_token.go index 5c4444e..f5b2893 100644 --- a/v1_token.go +++ b/v1_token.go @@ -11,6 +11,5 @@ package swagger type V1Token struct { - Token string `json:"token,omitempty"` } diff --git a/v1_user_password.go b/v1_user_password.go index 0b6d042..7545581 100644 --- a/v1_user_password.go +++ b/v1_user_password.go @@ -11,7 +11,6 @@ package swagger type V1UserPassword struct { - NewPassword string `json:"new_password,omitempty"` OldPassword string `json:"old_password,omitempty"` diff --git a/v1_vikunja_infos.go b/v1_vikunja_infos.go index cc39f6a..734a360 100644 --- a/v1_vikunja_infos.go +++ b/v1_vikunja_infos.go @@ -11,7 +11,6 @@ package swagger type V1VikunjaInfos struct { - FrontendUrl string `json:"frontend_url,omitempty"` LinkSharingEnabled bool `json:"link_sharing_enabled,omitempty"`