Merge pull request #2862 from mateuszmackowiak/master

[Objc] Moved the generated files to Api, Core and Model folders
This commit is contained in:
wing328 2016-05-14 17:48:22 +08:00
commit 2a11720b1d
40 changed files with 74 additions and 72 deletions

View File

@ -42,6 +42,9 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String[] specialWords = {"new", "copy"}; protected String[] specialWords = {"new", "copy"};
protected String apiDocPath = "docs/"; protected String apiDocPath = "docs/";
protected String modelDocPath = "docs/"; protected String modelDocPath = "docs/";
protected String modelFilesPath = "Model/";
protected String coreFilesPath = "Core/";
protected String apiFilesPath = "Api/";
protected Set<String> advancedMapingTypes = new HashSet<String>(); protected Set<String> advancedMapingTypes = new HashSet<String>();
@ -223,37 +226,38 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
additionalProperties.put("apiDocPath", apiDocPath); additionalProperties.put("apiDocPath", apiDocPath);
additionalProperties.put("modelDocPath", modelDocPath); additionalProperties.put("modelDocPath", modelDocPath);
String swaggerFolder = podName; additionalProperties.put("modelFilesPath", modelFilesPath);
additionalProperties.put("coreFilesPath", coreFilesPath);
additionalProperties.put("apiFilesPath", apiFilesPath);
modelPackage = swaggerFolder; modelPackage = podName;
apiPackage = swaggerFolder; apiPackage = podName;
supportingFiles.add(new SupportingFile("Object-header.mustache", swaggerFolder, classPrefix + "Object.h")); supportingFiles.add(new SupportingFile("Object-header.mustache", coreFileFolder(), classPrefix + "Object.h"));
supportingFiles.add(new SupportingFile("Object-body.mustache", swaggerFolder, classPrefix + "Object.m")); supportingFiles.add(new SupportingFile("Object-body.mustache", coreFileFolder(), classPrefix + "Object.m"));
supportingFiles.add(new SupportingFile("QueryParamCollection-header.mustache", swaggerFolder, classPrefix + "QueryParamCollection.h")); supportingFiles.add(new SupportingFile("QueryParamCollection-header.mustache", coreFileFolder(), classPrefix + "QueryParamCollection.h"));
supportingFiles.add(new SupportingFile("QueryParamCollection-body.mustache", swaggerFolder, classPrefix + "QueryParamCollection.m")); supportingFiles.add(new SupportingFile("QueryParamCollection-body.mustache", coreFileFolder(), classPrefix + "QueryParamCollection.m"));
supportingFiles.add(new SupportingFile("ApiClient-header.mustache", swaggerFolder, classPrefix + "ApiClient.h")); supportingFiles.add(new SupportingFile("ApiClient-header.mustache", coreFileFolder(), classPrefix + "ApiClient.h"));
supportingFiles.add(new SupportingFile("ApiClient-body.mustache", swaggerFolder, classPrefix + "ApiClient.m")); supportingFiles.add(new SupportingFile("ApiClient-body.mustache", coreFileFolder(), classPrefix + "ApiClient.m"));
supportingFiles.add(new SupportingFile("JSONResponseSerializer-header.mustache", swaggerFolder, classPrefix + "JSONResponseSerializer.h")); supportingFiles.add(new SupportingFile("JSONResponseSerializer-header.mustache", coreFileFolder(), classPrefix + "JSONResponseSerializer.h"));
supportingFiles.add(new SupportingFile("JSONResponseSerializer-body.mustache", swaggerFolder, classPrefix + "JSONResponseSerializer.m")); supportingFiles.add(new SupportingFile("JSONResponseSerializer-body.mustache", coreFileFolder(), classPrefix + "JSONResponseSerializer.m"));
supportingFiles.add(new SupportingFile("JSONRequestSerializer-body.mustache", swaggerFolder, classPrefix + "JSONRequestSerializer.m")); supportingFiles.add(new SupportingFile("JSONRequestSerializer-body.mustache", coreFileFolder(), classPrefix + "JSONRequestSerializer.m"));
supportingFiles.add(new SupportingFile("JSONRequestSerializer-header.mustache", swaggerFolder, classPrefix + "JSONRequestSerializer.h")); supportingFiles.add(new SupportingFile("JSONRequestSerializer-header.mustache", coreFileFolder(), classPrefix + "JSONRequestSerializer.h"));
supportingFiles.add(new SupportingFile("ResponseDeserializer-body.mustache", swaggerFolder, classPrefix + "ResponseDeserializer.m")); supportingFiles.add(new SupportingFile("ResponseDeserializer-body.mustache", coreFileFolder(), classPrefix + "ResponseDeserializer.m"));
supportingFiles.add(new SupportingFile("ResponseDeserializer-header.mustache", swaggerFolder, classPrefix + "ResponseDeserializer.h")); supportingFiles.add(new SupportingFile("ResponseDeserializer-header.mustache", coreFileFolder(), classPrefix + "ResponseDeserializer.h"));
supportingFiles.add(new SupportingFile("Sanitizer-body.mustache", swaggerFolder, classPrefix + "Sanitizer.m")); supportingFiles.add(new SupportingFile("Sanitizer-body.mustache", coreFileFolder(), classPrefix + "Sanitizer.m"));
supportingFiles.add(new SupportingFile("Sanitizer-header.mustache", swaggerFolder, classPrefix + "Sanitizer.h")); supportingFiles.add(new SupportingFile("Sanitizer-header.mustache", coreFileFolder(), classPrefix + "Sanitizer.h"));
supportingFiles.add(new SupportingFile("Logger-body.mustache", swaggerFolder, classPrefix + "Logger.m")); supportingFiles.add(new SupportingFile("Logger-body.mustache", coreFileFolder(), classPrefix + "Logger.m"));
supportingFiles.add(new SupportingFile("Logger-header.mustache", swaggerFolder, classPrefix + "Logger.h")); supportingFiles.add(new SupportingFile("Logger-header.mustache", coreFileFolder(), classPrefix + "Logger.h"));
supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601.m", swaggerFolder, "JSONValueTransformer+ISO8601.m")); supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601.m", coreFileFolder(), "JSONValueTransformer+ISO8601.m"));
supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601.h", swaggerFolder, "JSONValueTransformer+ISO8601.h")); supportingFiles.add(new SupportingFile("JSONValueTransformer+ISO8601.h", coreFileFolder(), "JSONValueTransformer+ISO8601.h"));
supportingFiles.add(new SupportingFile("Configuration-body.mustache", swaggerFolder, classPrefix + "Configuration.m")); supportingFiles.add(new SupportingFile("Configuration-body.mustache", coreFileFolder(), classPrefix + "Configuration.m"));
supportingFiles.add(new SupportingFile("Configuration-header.mustache", swaggerFolder, classPrefix + "Configuration.h")); supportingFiles.add(new SupportingFile("Configuration-header.mustache", coreFileFolder(), classPrefix + "Configuration.h"));
supportingFiles.add(new SupportingFile("podspec.mustache", "", podName + ".podspec")); supportingFiles.add(new SupportingFile("podspec.mustache", "", podName + ".podspec"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
} }
@Override @Override
@ -456,12 +460,16 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
@Override @Override
public String apiFileFolder() { public String apiFileFolder() {
return outputFolder + File.separatorChar + apiPackage(); return (outputFolder + "/"+ apiPackage() + "/" + apiFilesPath).replace("/", File.separator);
} }
@Override @Override
public String modelFileFolder() { public String modelFileFolder() {
return outputFolder + File.separatorChar + modelPackage(); return (outputFolder + "/"+ modelPackage() + "/" + modelFilesPath).replace("/", File.separator);
}
public String coreFileFolder() {
return (apiPackage() + "/" + coreFilesPath).replace("/", File.separator);
} }
@Override @Override

View File

@ -22,13 +22,12 @@
+({{classname}}*) apiWithHeader:(NSString*)headerValue key:(NSString*)key; +({{classname}}*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
+({{classname}}*) sharedAPI; +({{classname}}*) sharedAPI;
{{#operation}} {{#operation}}
///
///
/// {{{summary}}} /// {{{summary}}}
/// {{#notes}}{{{notes}}}{{/notes}} /// {{#notes}}{{{notes}}}{{/notes}}
/// ///
/// {{#allParams}}@param {{paramName}} {{description}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} /// {{#allParams}}@param {{paramName}} {{description}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
/// {{/allParams}} /// {{/allParams}}{{#responses}}
/// code:{{{code}}} message:"{{{message}}}"{{#hasMore}},{{/hasMore}}{{/responses}}
/// ///
/// @return {{{returnType}}} /// @return {{{returnType}}}
-(NSNumber*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}} -(NSNumber*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}}

View File

@ -1,12 +1,12 @@
# SwaggerClient # SwaggerClient
This is a sample server Petstore server. You can find out more about Swagger at <a href="http://swagger.io">http://swagger.io</a> or on irc.freenode.net, #swagger. 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 <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This ObjC package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This ObjC package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0 - API version: 1.0.0
- Package version: - Package version:
- Build date: 2016-05-11T10:37:53.050+02:00 - Build date: 2016-05-13T17:46:25.156+02:00
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen - Build package: class io.swagger.codegen.languages.ObjcClientCodegen
## Requirements ## Requirements

View File

@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.summary = "Swagger Petstore" s.summary = "Swagger Petstore"
s.description = <<-DESC s.description = <<-DESC
This is a sample server Petstore server. You can find out more about Swagger at <a href="http://swagger.io">http://swagger.io</a> or on irc.freenode.net, #swagger. 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 <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
DESC DESC
s.platform = :ios, '7.0' s.platform = :ios, '7.0'

View File

@ -19,27 +19,25 @@
-(unsigned long) requestQueueSize; -(unsigned long) requestQueueSize;
+(SWGPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key; +(SWGPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
+(SWGPetApi*) sharedAPI; +(SWGPetApi*) sharedAPI;
///
///
/// Add a new pet to the store /// Add a new pet to the store
/// ///
/// ///
/// @param body Pet object that needs to be added to the store (optional) /// @param body Pet object that needs to be added to the store (optional)
/// ///
/// code:405 message:"Invalid input"
/// ///
/// @return /// @return
-(NSNumber*) addPetWithBody: (SWGPet*) body -(NSNumber*) addPetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// Deletes a pet /// Deletes a pet
/// ///
/// ///
/// @param petId Pet id to delete /// @param petId Pet id to delete
/// @param apiKey (optional) /// @param apiKey (optional)
/// ///
/// code:400 message:"Invalid pet value"
/// ///
/// @return /// @return
-(NSNumber*) deletePetWithPetId: (NSNumber*) petId -(NSNumber*) deletePetWithPetId: (NSNumber*) petId
@ -47,60 +45,60 @@
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// Finds Pets by status /// Finds Pets by status
/// Multiple status values can be provided with comma seperated strings /// Multiple status values can be provided with comma seperated strings
/// ///
/// @param status Status values that need to be considered for filter (optional) (default to available) /// @param status Status values that need to be considered for filter (optional) (default to available)
/// ///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid status value"
/// ///
/// @return NSArray<SWGPet>* /// @return NSArray<SWGPet>*
-(NSNumber*) findPetsByStatusWithStatus: (NSArray<NSString*>*) status -(NSNumber*) findPetsByStatusWithStatus: (NSArray<NSString*>*) status
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler; completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler;
///
///
/// Finds Pets by tags /// Finds Pets by tags
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. /// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// ///
/// @param tags Tags to filter by (optional) /// @param tags Tags to filter by (optional)
/// ///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid tag value"
/// ///
/// @return NSArray<SWGPet>* /// @return NSArray<SWGPet>*
-(NSNumber*) findPetsByTagsWithTags: (NSArray<NSString*>*) tags -(NSNumber*) findPetsByTagsWithTags: (NSArray<NSString*>*) tags
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler; completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler;
///
///
/// Find pet by ID /// Find pet by ID
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
/// ///
/// @param petId ID of pet that needs to be fetched /// @param petId ID of pet that needs to be fetched
/// ///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Pet not found"
/// ///
/// @return SWGPet* /// @return SWGPet*
-(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId -(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId
completionHandler: (void (^)(SWGPet* output, NSError* error)) handler; completionHandler: (void (^)(SWGPet* output, NSError* error)) handler;
///
///
/// Update an existing pet /// Update an existing pet
/// ///
/// ///
/// @param body Pet object that needs to be added to the store (optional) /// @param body Pet object that needs to be added to the store (optional)
/// ///
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Pet not found",
/// code:405 message:"Validation exception"
/// ///
/// @return /// @return
-(NSNumber*) updatePetWithBody: (SWGPet*) body -(NSNumber*) updatePetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// Updates a pet in the store with form data /// Updates a pet in the store with form data
/// ///
/// ///
@ -108,6 +106,7 @@
/// @param name Updated name of the pet (optional) /// @param name Updated name of the pet (optional)
/// @param status Updated status of the pet (optional) /// @param status Updated status of the pet (optional)
/// ///
/// code:405 message:"Invalid input"
/// ///
/// @return /// @return
-(NSNumber*) updatePetWithFormWithPetId: (NSString*) petId -(NSNumber*) updatePetWithFormWithPetId: (NSString*) petId
@ -116,8 +115,6 @@
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// uploads an image /// uploads an image
/// ///
/// ///
@ -125,6 +122,7 @@
/// @param additionalMetadata Additional data to pass to server (optional) /// @param additionalMetadata Additional data to pass to server (optional)
/// @param file file to upload (optional) /// @param file file to upload (optional)
/// ///
/// code:0 message:"successful operation"
/// ///
/// @return /// @return
-(NSNumber*) uploadFileWithPetId: (NSNumber*) petId -(NSNumber*) uploadFileWithPetId: (NSNumber*) petId

View File

@ -19,51 +19,51 @@
-(unsigned long) requestQueueSize; -(unsigned long) requestQueueSize;
+(SWGStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key; +(SWGStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
+(SWGStoreApi*) sharedAPI; +(SWGStoreApi*) sharedAPI;
///
///
/// Delete purchase order by ID /// Delete purchase order by ID
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
/// ///
/// @param orderId ID of the order that needs to be deleted /// @param orderId ID of the order that needs to be deleted
/// ///
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Order not found"
/// ///
/// @return /// @return
-(NSNumber*) deleteOrderWithOrderId: (NSString*) orderId -(NSNumber*) deleteOrderWithOrderId: (NSString*) orderId
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// Returns pet inventories by status /// Returns pet inventories by status
/// Returns a map of status codes to quantities /// Returns a map of status codes to quantities
/// ///
/// ///
/// code:200 message:"successful operation"
/// ///
/// @return NSDictionary<NSString*, NSNumber*>* /// @return NSDictionary<NSString*, NSNumber*>*
-(NSNumber*) getInventoryWithCompletionHandler: -(NSNumber*) getInventoryWithCompletionHandler:
(void (^)(NSDictionary<NSString*, NSNumber*>* output, NSError* error)) handler; (void (^)(NSDictionary<NSString*, NSNumber*>* output, NSError* error)) handler;
///
///
/// Find purchase order by ID /// Find purchase order by ID
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
/// ///
/// @param orderId ID of pet that needs to be fetched /// @param orderId ID of pet that needs to be fetched
/// ///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Order not found"
/// ///
/// @return SWGOrder* /// @return SWGOrder*
-(NSNumber*) getOrderByIdWithOrderId: (NSString*) orderId -(NSNumber*) getOrderByIdWithOrderId: (NSString*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;
///
///
/// Place an order for a pet /// Place an order for a pet
/// ///
/// ///
/// @param body order placed for purchasing the pet (optional) /// @param body order placed for purchasing the pet (optional)
/// ///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid Order"
/// ///
/// @return SWGOrder* /// @return SWGOrder*
-(NSNumber*) placeOrderWithBody: (SWGOrder*) body -(NSNumber*) placeOrderWithBody: (SWGOrder*) body

View File

@ -19,79 +19,77 @@
-(unsigned long) requestQueueSize; -(unsigned long) requestQueueSize;
+(SWGUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key; +(SWGUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
+(SWGUserApi*) sharedAPI; +(SWGUserApi*) sharedAPI;
///
///
/// Create user /// Create user
/// This can only be done by the logged in user. /// This can only be done by the logged in user.
/// ///
/// @param body Created user object (optional) /// @param body Created user object (optional)
/// ///
/// code:0 message:"successful operation"
/// ///
/// @return /// @return
-(NSNumber*) createUserWithBody: (SWGUser*) body -(NSNumber*) createUserWithBody: (SWGUser*) body
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// Creates list of users with given input array /// Creates list of users with given input array
/// ///
/// ///
/// @param body List of user object (optional) /// @param body List of user object (optional)
/// ///
/// code:0 message:"successful operation"
/// ///
/// @return /// @return
-(NSNumber*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body -(NSNumber*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// Creates list of users with given input array /// Creates list of users with given input array
/// ///
/// ///
/// @param body List of user object (optional) /// @param body List of user object (optional)
/// ///
/// code:0 message:"successful operation"
/// ///
/// @return /// @return
-(NSNumber*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body -(NSNumber*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// Delete user /// Delete user
/// This can only be done by the logged in user. /// This can only be done by the logged in user.
/// ///
/// @param username The name that needs to be deleted /// @param username The name that needs to be deleted
/// ///
/// code:400 message:"Invalid username supplied",
/// code:404 message:"User not found"
/// ///
/// @return /// @return
-(NSNumber*) deleteUserWithUsername: (NSString*) username -(NSNumber*) deleteUserWithUsername: (NSString*) username
completionHandler: (void (^)(NSError* error)) handler; completionHandler: (void (^)(NSError* error)) handler;
///
///
/// Get user by user name /// Get user by user name
/// ///
/// ///
/// @param username The name that needs to be fetched. Use user1 for testing. /// @param username The name that needs to be fetched. Use user1 for testing.
/// ///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid username supplied",
/// code:404 message:"User not found"
/// ///
/// @return SWGUser* /// @return SWGUser*
-(NSNumber*) getUserByNameWithUsername: (NSString*) username -(NSNumber*) getUserByNameWithUsername: (NSString*) username
completionHandler: (void (^)(SWGUser* output, NSError* error)) handler; completionHandler: (void (^)(SWGUser* output, NSError* error)) handler;
///
///
/// Logs user into the system /// Logs user into the system
/// ///
/// ///
/// @param username The user name for login (optional) /// @param username The user name for login (optional)
/// @param password The password for login in clear text (optional) /// @param password The password for login in clear text (optional)
/// ///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid username/password supplied"
/// ///
/// @return NSString* /// @return NSString*
-(NSNumber*) loginUserWithUsername: (NSString*) username -(NSNumber*) loginUserWithUsername: (NSString*) username
@ -99,26 +97,25 @@
completionHandler: (void (^)(NSString* output, NSError* error)) handler; completionHandler: (void (^)(NSString* output, NSError* error)) handler;
///
///
/// Logs out current logged in user session /// Logs out current logged in user session
/// ///
/// ///
/// ///
/// code:0 message:"successful operation"
/// ///
/// @return /// @return
-(NSNumber*) logoutUserWithCompletionHandler: -(NSNumber*) logoutUserWithCompletionHandler:
(void (^)(NSError* error)) handler; (void (^)(NSError* error)) handler;
///
///
/// Updated user /// Updated user
/// This can only be done by the logged in user. /// This can only be done by the logged in user.
/// ///
/// @param username name that need to be deleted /// @param username name that need to be deleted
/// @param body Updated user object (optional) /// @param body Updated user object (optional)
/// ///
/// code:400 message:"Invalid user supplied",
/// code:404 message:"User not found"
/// ///
/// @return /// @return
-(NSNumber*) updateUserWithUsername: (NSString*) username -(NSNumber*) updateUserWithUsername: (NSString*) username