Merge pull request #2 from sanketjpatel/feat/pagination

Add pagination options for GetRepositories
This commit is contained in:
George Fleury 2018-06-03 20:43:18 +02:00 committed by GitHub
commit 95377ab099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5858,6 +5858,10 @@ Retrieve repositories from the project corresponding to the supplied <strong&
@param projectKey the parent project key
@return */
func (a *DefaultApiService) GetRepositories(projectKey string) (*APIResponse, error) {
return a.GetRepositoriesWithOptions(projectKey, make(map[string]interface{}))
}
func (a *DefaultApiService) GetRepositoriesWithOptions(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error) {
var (
localVarHTTPMethod = strings.ToUpper("Get")
localVarPostBody interface{}
@ -5873,6 +5877,20 @@ func (a *DefaultApiService) GetRepositories(projectKey string) (*APIResponse, er
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if err := typeCheckParameter(localVarOptionals["limit"], "int", "limit"); err != nil {
return nil, err
}
if err := typeCheckParameter(localVarOptionals["start"], "int", "start"); err != nil {
return nil, err
}
if localVarTempParam, localVarOk := localVarOptionals["limit"].(int); localVarOk {
localVarQueryParams.Add("limit", parameterToString(localVarTempParam, ""))
}
if localVarTempParam, localVarOk := localVarOptionals["start"].(int); localVarOk {
localVarQueryParams.Add("start", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}