mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
remove unnecessary change in JS closure codegen
This commit is contained in:
@@ -3,9 +3,8 @@
|
||||
* Do not edit this file by hand or your changes will be lost next time it is
|
||||
* generated.
|
||||
*
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* Version: 1.0.0
|
||||
* Generated at: 2016-04-28T06:15:51.482Z
|
||||
* Generated by: class io.swagger.codegen.languages.JavascriptClosureAngularClientCodegen
|
||||
*/
|
||||
/**
|
||||
@@ -45,45 +44,6 @@ API.Client.PetApi = function($http, $httpParamSerializer, $injector) {
|
||||
}
|
||||
API.Client.PetApi.$inject = ['$http', '$httpParamSerializer', '$injector'];
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param {!Pet} body Pet object that needs to be added to the store
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise}
|
||||
*/
|
||||
API.Client.PetApi.prototype.updatePet = function(body, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/pet';
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'body' is set
|
||||
if (!body) {
|
||||
throw new Error('Missing required parameter body when calling updatePet');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'PUT',
|
||||
url: path,
|
||||
json: true,
|
||||
data: body,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
@@ -110,9 +70,47 @@ API.Client.PetApi.prototype.addPet = function(body, opt_extraHttpRequestParams)
|
||||
url: path,
|
||||
json: true,
|
||||
data: body,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param {!number} petId Pet id to delete
|
||||
* @param {!string=} opt_apiKey
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise}
|
||||
*/
|
||||
API.Client.PetApi.prototype.deletePet = function(petId, opt_apiKey, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/pet/{petId}'
|
||||
.replace('{' + 'petId' + '}', String(petId));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'petId' is set
|
||||
if (!petId) {
|
||||
throw new Error('Missing required parameter petId when calling deletePet');
|
||||
}
|
||||
headerParams['api_key'] = opt_apiKey;
|
||||
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'DELETE',
|
||||
url: path,
|
||||
json: true,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -152,9 +150,7 @@ API.Client.PetApi.prototype.findPetsByStatus = function(status, opt_extraHttpReq
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -194,9 +190,7 @@ API.Client.PetApi.prototype.findPetsByTags = function(tags, opt_extraHttpRequest
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -233,9 +227,44 @@ API.Client.PetApi.prototype.getPetById = function(petId, opt_extraHttpRequestPar
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param {!Pet} body Pet object that needs to be added to the store
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise}
|
||||
*/
|
||||
API.Client.PetApi.prototype.updatePet = function(body, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/pet';
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'body' is set
|
||||
if (!body) {
|
||||
throw new Error('Missing required parameter body when calling updatePet');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'PUT',
|
||||
url: path,
|
||||
json: true,
|
||||
data: body,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -283,51 +312,7 @@ API.Client.PetApi.prototype.updatePetWithForm = function(petId, opt_name, opt_st
|
||||
method: 'POST',
|
||||
url: path,
|
||||
json: false,
|
||||
|
||||
data: this.httpParamSerializer(formParams),
|
||||
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param {!number} petId Pet id to delete
|
||||
* @param {!string=} opt_apiKey
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise}
|
||||
*/
|
||||
API.Client.PetApi.prototype.deletePet = function(petId, opt_apiKey, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/pet/{petId}'
|
||||
.replace('{' + 'petId' + '}', String(petId));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'petId' is set
|
||||
if (!petId) {
|
||||
throw new Error('Missing required parameter petId when calling deletePet');
|
||||
}
|
||||
headerParams['api_key'] = opt_apiKey;
|
||||
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'DELETE',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
data: this.httpParamSerializer(formParams),
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
@@ -376,9 +361,7 @@ API.Client.PetApi.prototype.uploadFile = function(petId, opt_additionalMetadata,
|
||||
method: 'POST',
|
||||
url: path,
|
||||
json: false,
|
||||
|
||||
data: this.httpParamSerializer(formParams),
|
||||
|
||||
data: this.httpParamSerializer(formParams),
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
* Do not edit this file by hand or your changes will be lost next time it is
|
||||
* generated.
|
||||
*
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* Version: 1.0.0
|
||||
* Generated at: 2016-04-28T06:15:51.482Z
|
||||
* Generated by: class io.swagger.codegen.languages.JavascriptClosureAngularClientCodegen
|
||||
*/
|
||||
/**
|
||||
@@ -44,6 +43,43 @@ API.Client.StoreApi = function($http, $httpParamSerializer, $injector) {
|
||||
}
|
||||
API.Client.StoreApi.$inject = ['$http', '$httpParamSerializer', '$injector'];
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param {!string} orderId ID of the order that needs to be deleted
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise}
|
||||
*/
|
||||
API.Client.StoreApi.prototype.deleteOrder = function(orderId, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/store/order/{orderId}'
|
||||
.replace('{' + 'orderId' + '}', String(orderId));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'orderId' is set
|
||||
if (!orderId) {
|
||||
throw new Error('Missing required parameter orderId when calling deleteOrder');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'DELETE',
|
||||
url: path,
|
||||
json: true,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
@@ -64,9 +100,44 @@ API.Client.StoreApi.prototype.getInventory = function(opt_extraHttpRequestParams
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param {!number} orderId ID of pet that needs to be fetched
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise<!API.Client.Order>}
|
||||
*/
|
||||
API.Client.StoreApi.prototype.getOrderById = function(orderId, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/store/order/{orderId}'
|
||||
.replace('{' + 'orderId' + '}', String(orderId));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'orderId' is set
|
||||
if (!orderId) {
|
||||
throw new Error('Missing required parameter orderId when calling getOrderById');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -103,87 +174,7 @@ API.Client.StoreApi.prototype.placeOrder = function(body, opt_extraHttpRequestPa
|
||||
url: path,
|
||||
json: true,
|
||||
data: body,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param {!number} orderId ID of pet that needs to be fetched
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise<!API.Client.Order>}
|
||||
*/
|
||||
API.Client.StoreApi.prototype.getOrderById = function(orderId, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/store/order/{orderId}'
|
||||
.replace('{' + 'orderId' + '}', String(orderId));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'orderId' is set
|
||||
if (!orderId) {
|
||||
throw new Error('Missing required parameter orderId when calling getOrderById');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param {!string} orderId ID of the order that needs to be deleted
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise}
|
||||
*/
|
||||
API.Client.StoreApi.prototype.deleteOrder = function(orderId, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/store/order/{orderId}'
|
||||
.replace('{' + 'orderId' + '}', String(orderId));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'orderId' is set
|
||||
if (!orderId) {
|
||||
throw new Error('Missing required parameter orderId when calling deleteOrder');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'DELETE',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
* Do not edit this file by hand or your changes will be lost next time it is
|
||||
* generated.
|
||||
*
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* Version: 1.0.0
|
||||
* Generated at: 2016-04-28T06:15:51.482Z
|
||||
* Generated by: class io.swagger.codegen.languages.JavascriptClosureAngularClientCodegen
|
||||
*/
|
||||
/**
|
||||
@@ -70,9 +69,7 @@ API.Client.UserApi.prototype.createUser = function(body, opt_extraHttpRequestPar
|
||||
url: path,
|
||||
json: true,
|
||||
data: body,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -109,9 +106,7 @@ API.Client.UserApi.prototype.createUsersWithArrayInput = function(body, opt_extr
|
||||
url: path,
|
||||
json: true,
|
||||
data: body,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -148,9 +143,81 @@ API.Client.UserApi.prototype.createUsersWithListInput = function(body, opt_extra
|
||||
url: path,
|
||||
json: true,
|
||||
data: body,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {!string} username The name that needs to be deleted
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise}
|
||||
*/
|
||||
API.Client.UserApi.prototype.deleteUser = function(username, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/user/{username}'
|
||||
.replace('{' + 'username' + '}', String(username));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'username' is set
|
||||
if (!username) {
|
||||
throw new Error('Missing required parameter username when calling deleteUser');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'DELETE',
|
||||
url: path,
|
||||
json: true,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param {!string} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise<!API.Client.User>}
|
||||
*/
|
||||
API.Client.UserApi.prototype.getUserByName = function(username, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/user/{username}'
|
||||
.replace('{' + 'username' + '}', String(username));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'username' is set
|
||||
if (!username) {
|
||||
throw new Error('Missing required parameter username when calling getUserByName');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -199,9 +266,7 @@ API.Client.UserApi.prototype.loginUser = function(username, password, opt_extraH
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -232,48 +297,7 @@ API.Client.UserApi.prototype.logoutUser = function(opt_extraHttpRequestParams) {
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param {!string} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise<!API.Client.User>}
|
||||
*/
|
||||
API.Client.UserApi.prototype.getUserByName = function(username, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/user/{username}'
|
||||
.replace('{' + 'username' + '}', String(username));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'username' is set
|
||||
if (!username) {
|
||||
throw new Error('Missing required parameter username when calling getUserByName');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'GET',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
@@ -316,48 +340,7 @@ API.Client.UserApi.prototype.updateUser = function(username, body, opt_extraHttp
|
||||
url: path,
|
||||
json: true,
|
||||
data: body,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
if (opt_extraHttpRequestParams) {
|
||||
httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
|
||||
}
|
||||
|
||||
return (/** @type {?} */ (this.http_))(httpRequestParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {!string} username The name that needs to be deleted
|
||||
* @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
|
||||
* @return {!angular.$q.Promise}
|
||||
*/
|
||||
API.Client.UserApi.prototype.deleteUser = function(username, opt_extraHttpRequestParams) {
|
||||
/** @const {string} */
|
||||
var path = this.basePath_ + '/user/{username}'
|
||||
.replace('{' + 'username' + '}', String(username));
|
||||
|
||||
/** @type {!Object} */
|
||||
var queryParameters = {};
|
||||
|
||||
/** @type {!Object} */
|
||||
var headerParams = angular.extend({}, this.defaultHeaders_);
|
||||
// verify required parameter 'username' is set
|
||||
if (!username) {
|
||||
throw new Error('Missing required parameter username when calling deleteUser');
|
||||
}
|
||||
/** @type {!Object} */
|
||||
var httpRequestParams = {
|
||||
method: 'DELETE',
|
||||
url: path,
|
||||
json: true,
|
||||
|
||||
|
||||
params: queryParameters,
|
||||
params: queryParameters,
|
||||
headers: headerParams
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user