regenerated client

This commit is contained in:
Tony Tam 2014-06-10 16:55:17 -07:00
parent 8274196999
commit 3f480482b6
9 changed files with 202 additions and 127 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
WordAPI.py
Copyright 2012 Wordnik, Inc.
Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -29,12 +29,15 @@ class PetApi(object):
self.apiClient = apiClient
def getPetById(self, petId, **kwargs):
"""Find pet by ID
Args:
petId, int: ID of pet that needs to be fetched (required)
Returns: Pet
"""
@ -69,13 +72,17 @@ class PetApi(object):
responseObject = self.apiClient.deserialize(response, 'Pet')
return responseObject
def deletePet(self, petId, **kwargs):
"""Deletes a pet
Args:
petId, str: Pet id to delete (required)
Returns:
"""
@ -105,14 +112,19 @@ class PetApi(object):
postData, headerParams)
def partialUpdate(self, petId, body, **kwargs):
"""partial updates to a pet
Args:
petId, str: ID of pet that needs to be fetched (required)
body, Pet: Pet object that needs to be added to the store (required)
Returns: Array[Pet]
"""
@ -147,15 +159,21 @@ class PetApi(object):
responseObject = self.apiClient.deserialize(response, 'Array[Pet]')
return responseObject
def updatePetWithForm(self, petId, **kwargs):
"""Updates a pet in the store with form data
Args:
petId, str: ID of pet that needs to be updated (required)
name, str: Updated name of the pet (optional)
status, str: Updated status of the pet (optional)
Returns:
"""
@ -185,14 +203,19 @@ class PetApi(object):
postData, headerParams)
def uploadFile(self, **kwargs):
"""uploads an image
Args:
additionalMetadata, str: Additional data to pass to server (optional)
body, File: file to upload (optional)
Returns:
"""
@ -218,13 +241,17 @@ class PetApi(object):
postData, headerParams)
def addPet(self, body, **kwargs):
"""Add a new pet to the store
Args:
body, Pet: Pet object that needs to be added to the store (required)
Returns:
"""
@ -250,13 +277,17 @@ class PetApi(object):
postData, headerParams)
def updatePet(self, body, **kwargs):
"""Update an existing pet
Args:
body, Pet: Pet object that needs to be updated in the store (required)
Returns:
"""
@ -282,13 +313,17 @@ class PetApi(object):
postData, headerParams)
def findPetsByStatus(self, status= None, **kwargs):
"""Finds Pets by status
Args:
status, str: Status values that need to be considered for filter (required)
Returns: Array[Pet]
"""
@ -321,13 +356,17 @@ class PetApi(object):
responseObject = self.apiClient.deserialize(response, 'Array[Pet]')
return responseObject
def findPetsByTags(self, tags, **kwargs):
"""Finds Pets by tags
Args:
tags, str: Tags to filter by (required)
Returns: Array[Pet]
"""
@ -360,7 +399,11 @@ class PetApi(object):
responseObject = self.apiClient.deserialize(response, 'Array[Pet]')
return responseObject

View File

@ -1,5 +1,5 @@
/**
* Copyright 2012 Wordnik, Inc.
* Copyright 2014 Wordnik, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
WordAPI.py
Copyright 2012 Wordnik, Inc.
Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -29,12 +29,15 @@ class StoreApi(object):
self.apiClient = apiClient
def getOrderById(self, orderId, **kwargs):
"""Find purchase order by ID
Args:
orderId, str: ID of pet that needs to be fetched (required)
Returns: Order
"""
@ -69,13 +72,17 @@ class StoreApi(object):
responseObject = self.apiClient.deserialize(response, 'Order')
return responseObject
def deleteOrder(self, orderId, **kwargs):
"""Delete purchase order by ID
Args:
orderId, str: ID of the order that needs to be deleted (required)
Returns:
"""
@ -105,13 +112,17 @@ class StoreApi(object):
postData, headerParams)
def placeOrder(self, body, **kwargs):
"""Place an order for a pet
Args:
body, Order: order placed for purchasing the pet (required)
Returns:
"""
@ -137,7 +148,11 @@ class StoreApi(object):
postData, headerParams)

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
WordAPI.py
Copyright 2012 Wordnik, Inc.
Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -29,109 +29,17 @@ class UserApi(object):
self.apiClient = apiClient
def createUser(self, body, **kwargs):
"""Create user
Args:
body, User: Created user object (required)
Returns:
"""
allParams = ['body']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method createUser" % key)
params[key] = val
del params['kwargs']
resourcePath = '/user'
resourcePath = resourcePath.replace('{format}', 'json')
method = 'POST'
queryParams = {}
headerParams = {}
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(resourcePath, method, queryParams,
postData, headerParams)
def createUsersWithArrayInput(self, body, **kwargs):
"""Creates list of users with given input array
Args:
body, list[User]: List of user object (required)
Returns:
"""
allParams = ['body']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method createUsersWithArrayInput" % key)
params[key] = val
del params['kwargs']
resourcePath = '/user/createWithArray'
resourcePath = resourcePath.replace('{format}', 'json')
method = 'POST'
queryParams = {}
headerParams = {}
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(resourcePath, method, queryParams,
postData, headerParams)
def createUsersWithListInput(self, body, **kwargs):
"""Creates list of users with given list input
Args:
body, list[User]: List of user object (required)
Returns:
"""
allParams = ['body']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method createUsersWithListInput" % key)
params[key] = val
del params['kwargs']
resourcePath = '/user/createWithList'
resourcePath = resourcePath.replace('{format}', 'json')
method = 'POST'
queryParams = {}
headerParams = {}
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(resourcePath, method, queryParams,
postData, headerParams)
def updateUser(self, username, body, **kwargs):
"""Updated user
Args:
username, str: name that need to be deleted (required)
body, User: Updated user object (required)
Returns:
"""
@ -161,13 +69,17 @@ class UserApi(object):
postData, headerParams)
def deleteUser(self, username, **kwargs):
"""Delete user
Args:
username, str: The name that needs to be deleted (required)
Returns:
"""
@ -197,13 +109,17 @@ class UserApi(object):
postData, headerParams)
def getUserByName(self, username, **kwargs):
"""Get user by user name
Args:
username, str: The name that needs to be fetched. Use user1 for testing. (required)
Returns: User
"""
@ -238,14 +154,19 @@ class UserApi(object):
responseObject = self.apiClient.deserialize(response, 'User')
return responseObject
def loginUser(self, username, password, **kwargs):
"""Logs user into the system
Args:
username, str: The user name for login (required)
password, str: The password for login in clear text (required)
Returns: str
"""
@ -280,12 +201,15 @@ class UserApi(object):
responseObject = self.apiClient.deserialize(response, 'str')
return responseObject
def logoutUser(self, **kwargs):
"""Logs out current logged in user session
Args:
Returns:
"""
@ -311,7 +235,119 @@ class UserApi(object):
postData, headerParams)
def createUser(self, body, **kwargs):
"""Create user
Args:
body, User: Created user object (required)
Returns:
"""
allParams = ['body']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method createUser" % key)
params[key] = val
del params['kwargs']
resourcePath = '/user'
resourcePath = resourcePath.replace('{format}', 'json')
method = 'POST'
queryParams = {}
headerParams = {}
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(resourcePath, method, queryParams,
postData, headerParams)
def createUsersWithArrayInput(self, body, **kwargs):
"""Creates list of users with given input array
Args:
body, list[User]: List of user object (required)
Returns:
"""
allParams = ['body']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method createUsersWithArrayInput" % key)
params[key] = val
del params['kwargs']
resourcePath = '/user/createWithArray'
resourcePath = resourcePath.replace('{format}', 'json')
method = 'POST'
queryParams = {}
headerParams = {}
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(resourcePath, method, queryParams,
postData, headerParams)
def createUsersWithListInput(self, body, **kwargs):
"""Creates list of users with given list input
Args:
body, list[User]: List of user object (required)
Returns:
"""
allParams = ['body']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method createUsersWithListInput" % key)
params[key] = val
del params['kwargs']
resourcePath = '/user/createWithList'
resourcePath = resourcePath.replace('{format}', 'json')
method = 'POST'
queryParams = {}
headerParams = {}
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(resourcePath, method, queryParams,
postData, headerParams)

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
Copyright 2012 Wordnik, Inc.
Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -27,8 +27,6 @@ class Category:
}
#Category unique identifier
self.id = None # int
#Name of the category
self.name = None # str

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
Copyright 2012 Wordnik, Inc.
Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -30,14 +30,10 @@ class Order:
}
#Unique identifier for the order
self.id = None # int
#ID of pet being ordered
self.petId = None # int
#Number of pets ordered
self.quantity = None # int
#Status of the order
#Order Status
self.status = None # str
#Date shipped, only if it has been
self.shipDate = None # datetime

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
Copyright 2012 Wordnik, Inc.
Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -31,15 +31,11 @@ class Pet:
}
#Unique identifier for the Pet
#unique identifier for the pet
self.id = None # int
#Category the pet is in
self.category = None # Category
#Friendly name of the pet
self.name = None # str
#Image URLs
self.photoUrls = None # list[str]
#Tags assigned to this pet
self.tags = None # list[Tag]
#pet status in the store
self.status = None # str

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
Copyright 2012 Wordnik, Inc.
Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -27,8 +27,6 @@ class Tag:
}
#Unique identifier for the tag
self.id = None # int
#Friendly name for the tag
self.name = None # str

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
Copyright 2012 Wordnik, Inc.
Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -22,8 +22,8 @@ class User:
def __init__(self):
self.swaggerTypes = {
'id': 'int',
'username': 'str',
'firstName': 'str',
'username': 'str',
'lastName': 'str',
'email': 'str',
'password': 'str',
@ -33,19 +33,12 @@ class User:
}
#Unique identifier for the user
self.id = None # int
#Unique username
self.username = None # str
#First name of the user
self.firstName = None # str
#Last name of the user
self.username = None # str
self.lastName = None # str
#Email address of the user
self.email = None # str
#Password name of the user
self.password = None # str
#Phone number of the user
self.phone = None # str
#User Status
self.userStatus = None # int