regenerated client

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

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
WordAPI.py WordAPI.py
Copyright 2012 Wordnik, Inc. Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -29,12 +29,15 @@ class PetApi(object):
self.apiClient = apiClient self.apiClient = apiClient
def getPetById(self, petId, **kwargs): def getPetById(self, petId, **kwargs):
"""Find pet by ID """Find pet by ID
Args: Args:
petId, long: ID of pet that needs to be fetched (required) petId, long: ID of pet that needs to be fetched (required)
Returns: Pet Returns: Pet
""" """
@@ -70,12 +73,16 @@ class PetApi(object):
return responseObject return responseObject
def deletePet(self, petId, **kwargs): def deletePet(self, petId, **kwargs):
"""Deletes a pet """Deletes a pet
Args: Args:
petId, str: Pet id to delete (required) petId, str: Pet id to delete (required)
Returns: Returns:
""" """
@@ -106,13 +113,18 @@ class PetApi(object):
def partialUpdate(self, petId, body, **kwargs): def partialUpdate(self, petId, body, **kwargs):
"""partial updates to a pet """partial updates to a pet
Args: Args:
petId, str: ID of pet that needs to be fetched (required) petId, str: ID of pet that needs to be fetched (required)
body, Pet: Pet object that needs to be added to the store (required) body, Pet: Pet object that needs to be added to the store (required)
Returns: Array[Pet] Returns: Array[Pet]
""" """
@@ -148,14 +160,20 @@ class PetApi(object):
return responseObject return responseObject
def updatePetWithForm(self, petId, **kwargs): def updatePetWithForm(self, petId, **kwargs):
"""Updates a pet in the store with form data """Updates a pet in the store with form data
Args: Args:
petId, str: ID of pet that needs to be updated (required) petId, str: ID of pet that needs to be updated (required)
name, str: Updated name of the pet (optional) name, str: Updated name of the pet (optional)
status, str: Updated status of the pet (optional) status, str: Updated status of the pet (optional)
Returns: Returns:
""" """
@@ -186,13 +204,18 @@ class PetApi(object):
def uploadFile(self, **kwargs): def uploadFile(self, **kwargs):
"""uploads an image """uploads an image
Args: Args:
additionalMetadata, str: Additional data to pass to server (optional) additionalMetadata, str: Additional data to pass to server (optional)
body, File: file to upload (optional) body, File: file to upload (optional)
Returns: Returns:
""" """
@@ -219,12 +242,16 @@ class PetApi(object):
def addPet(self, body, **kwargs): def addPet(self, body, **kwargs):
"""Add a new pet to the store """Add a new pet to the store
Args: Args:
body, Pet: Pet object that needs to be added to the store (required) body, Pet: Pet object that needs to be added to the store (required)
Returns: Returns:
""" """
@@ -251,12 +278,16 @@ class PetApi(object):
def updatePet(self, body, **kwargs): def updatePet(self, body, **kwargs):
"""Update an existing pet """Update an existing pet
Args: Args:
body, Pet: Pet object that needs to be updated in the store (required) body, Pet: Pet object that needs to be updated in the store (required)
Returns: Returns:
""" """
@@ -283,12 +314,16 @@ class PetApi(object):
def findPetsByStatus(self, status= None, **kwargs): def findPetsByStatus(self, status= None, **kwargs):
"""Finds Pets by status """Finds Pets by status
Args: Args:
status, str: Status values that need to be considered for filter (required) status, str: Status values that need to be considered for filter (required)
Returns: Array[Pet] Returns: Array[Pet]
""" """
@@ -322,12 +357,16 @@ class PetApi(object):
return responseObject return responseObject
def findPetsByTags(self, tags, **kwargs): def findPetsByTags(self, tags, **kwargs):
"""Finds Pets by tags """Finds Pets by tags
Args: Args:
tags, str: Tags to filter by (required) tags, str: Tags to filter by (required)
Returns: Array[Pet] Returns: Array[Pet]
""" """
@@ -364,3 +403,7 @@ class PetApi(object):

View File

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

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
WordAPI.py WordAPI.py
Copyright 2012 Wordnik, Inc. Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -29,12 +29,15 @@ class StoreApi(object):
self.apiClient = apiClient self.apiClient = apiClient
def getOrderById(self, orderId, **kwargs): def getOrderById(self, orderId, **kwargs):
"""Find purchase order by ID """Find purchase order by ID
Args: Args:
orderId, str: ID of pet that needs to be fetched (required) orderId, str: ID of pet that needs to be fetched (required)
Returns: Order Returns: Order
""" """
@@ -70,12 +73,16 @@ class StoreApi(object):
return responseObject return responseObject
def deleteOrder(self, orderId, **kwargs): def deleteOrder(self, orderId, **kwargs):
"""Delete purchase order by ID """Delete purchase order by ID
Args: Args:
orderId, str: ID of the order that needs to be deleted (required) orderId, str: ID of the order that needs to be deleted (required)
Returns: Returns:
""" """
@@ -106,12 +113,16 @@ class StoreApi(object):
def placeOrder(self, body, **kwargs): def placeOrder(self, body, **kwargs):
"""Place an order for a pet """Place an order for a pet
Args: Args:
body, Order: order placed for purchasing the pet (required) body, Order: order placed for purchasing the pet (required)
Returns: Returns:
""" """
@@ -141,3 +152,7 @@ class StoreApi(object):

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
WordAPI.py WordAPI.py
Copyright 2012 Wordnik, Inc. Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -29,109 +29,17 @@ class UserApi(object):
self.apiClient = apiClient 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'].iteritems():
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'].iteritems():
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'].iteritems():
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): def updateUser(self, username, body, **kwargs):
"""Updated user """Updated user
Args: Args:
username, str: name that need to be deleted (required) username, str: name that need to be deleted (required)
body, User: Updated user object (required) body, User: Updated user object (required)
Returns: Returns:
""" """
@@ -162,12 +70,16 @@ class UserApi(object):
def deleteUser(self, username, **kwargs): def deleteUser(self, username, **kwargs):
"""Delete user """Delete user
Args: Args:
username, str: The name that needs to be deleted (required) username, str: The name that needs to be deleted (required)
Returns: Returns:
""" """
@@ -198,12 +110,16 @@ class UserApi(object):
def getUserByName(self, username, **kwargs): def getUserByName(self, username, **kwargs):
"""Get user by user name """Get user by user name
Args: Args:
username, str: The name that needs to be fetched. Use user1 for testing. (required) username, str: The name that needs to be fetched. Use user1 for testing. (required)
Returns: User Returns: User
""" """
@@ -239,13 +155,18 @@ class UserApi(object):
return responseObject return responseObject
def loginUser(self, username, password, **kwargs): def loginUser(self, username, password, **kwargs):
"""Logs user into the system """Logs user into the system
Args: Args:
username, str: The user name for login (required) username, str: The user name for login (required)
password, str: The password for login in clear text (required) password, str: The password for login in clear text (required)
Returns: str Returns: str
""" """
@@ -281,11 +202,14 @@ class UserApi(object):
return responseObject return responseObject
def logoutUser(self, **kwargs): def logoutUser(self, **kwargs):
"""Logs out current logged in user session """Logs out current logged in user session
Args: Args:
Returns: Returns:
""" """
@@ -314,4 +238,116 @@ class UserApi(object):
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'].iteritems():
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'].iteritems():
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'].iteritems():
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 #!/usr/bin/env python
""" """
Copyright 2012 Wordnik, Inc. Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with 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 # long self.id = None # long
#Name of the category
self.name = None # str self.name = None # str

View File

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

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
Copyright 2012 Wordnik, Inc. Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with 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 # long self.id = None # long
#Category the pet is in
self.category = None # Category self.category = None # Category
#Friendly name of the pet
self.name = None # str self.name = None # str
#Image URLs
self.photoUrls = None # list[str] self.photoUrls = None # list[str]
#Tags assigned to this pet
self.tags = None # list[Tag] self.tags = None # list[Tag]
#pet status in the store #pet status in the store
self.status = None # str self.status = None # str

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
Copyright 2012 Wordnik, Inc. Copyright 2014 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with 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 # long self.id = None # long
#Friendly name for the tag
self.name = None # str self.name = None # str

View File

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