updated prefix

This commit is contained in:
Tony Tam 2013-08-16 21:22:06 -07:00
parent 83ff341e5e
commit ad4bf57535
23 changed files with 506 additions and 347 deletions

View File

@ -10,47 +10,37 @@
EA07F4BE16134F27006A2112 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA07F4BD16134F27006A2112 /* Foundation.framework */; };
EA07F4C116134F27006A2112 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F4C016134F27006A2112 /* main.m */; };
EA07F4C516134F27006A2112 /* PetstoreClient.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = EA07F4C416134F27006A2112 /* PetstoreClient.1 */; };
EA07F5221613569A006A2112 /* NIKApiInvoker.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50D1613569A006A2112 /* NIKApiInvoker.m */; };
EA07F5231613569A006A2112 /* NIKCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50F1613569A006A2112 /* NIKCategory.m */; };
EA07F5241613569A006A2112 /* NIKDate.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5111613569A006A2112 /* NIKDate.m */; };
EA07F5251613569A006A2112 /* NIKOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5131613569A006A2112 /* NIKOrder.m */; };
EA07F5261613569A006A2112 /* NIKPet.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5151613569A006A2112 /* NIKPet.m */; };
EA07F5271613569A006A2112 /* NIKPetApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5171613569A006A2112 /* NIKPetApi.m */; };
EA07F5281613569A006A2112 /* NIKStoreApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5191613569A006A2112 /* NIKStoreApi.m */; };
EA07F5291613569A006A2112 /* NIKSwaggerObject.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51B1613569A006A2112 /* NIKSwaggerObject.m */; };
EA07F52A1613569A006A2112 /* NIKTag.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51D1613569A006A2112 /* NIKTag.m */; };
EA07F52B1613569A006A2112 /* NIKUser.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51F1613569A006A2112 /* NIKUser.m */; };
EA07F52C1613569A006A2112 /* NIKUserApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5211613569A006A2112 /* NIKUserApi.m */; };
EA07F5311613580E006A2112 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA07F5301613580E006A2112 /* SenTestingKit.framework */; };
EA07F53316135819006A2112 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA07F53216135819006A2112 /* Cocoa.framework */; };
EA07F53516135916006A2112 /* NIKApiInvoker.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50C1613569A006A2112 /* NIKApiInvoker.h */; };
EA07F53616135916006A2112 /* NIKApiInvoker.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50D1613569A006A2112 /* NIKApiInvoker.m */; };
EA07F53716135916006A2112 /* NIKCategory.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50E1613569A006A2112 /* NIKCategory.h */; };
EA07F53816135916006A2112 /* NIKCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50F1613569A006A2112 /* NIKCategory.m */; };
EA07F53916135916006A2112 /* NIKDate.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5101613569A006A2112 /* NIKDate.h */; };
EA07F53A16135916006A2112 /* NIKDate.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5111613569A006A2112 /* NIKDate.m */; };
EA07F53B16135916006A2112 /* NIKOrder.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5121613569A006A2112 /* NIKOrder.h */; };
EA07F53C16135916006A2112 /* NIKOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5131613569A006A2112 /* NIKOrder.m */; };
EA07F53D16135916006A2112 /* NIKPet.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5141613569A006A2112 /* NIKPet.h */; };
EA07F53E16135916006A2112 /* NIKPet.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5151613569A006A2112 /* NIKPet.m */; };
EA07F53F16135916006A2112 /* NIKPetApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5161613569A006A2112 /* NIKPetApi.h */; };
EA07F54016135916006A2112 /* NIKPetApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5171613569A006A2112 /* NIKPetApi.m */; };
EA07F54116135916006A2112 /* NIKStoreApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5181613569A006A2112 /* NIKStoreApi.h */; };
EA07F54216135916006A2112 /* NIKStoreApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5191613569A006A2112 /* NIKStoreApi.m */; };
EA07F54316135916006A2112 /* NIKSwaggerObject.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51A1613569A006A2112 /* NIKSwaggerObject.h */; };
EA07F54416135916006A2112 /* NIKSwaggerObject.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51B1613569A006A2112 /* NIKSwaggerObject.m */; };
EA07F54516135916006A2112 /* NIKTag.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51C1613569A006A2112 /* NIKTag.h */; };
EA07F54616135916006A2112 /* NIKTag.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51D1613569A006A2112 /* NIKTag.m */; };
EA07F54716135916006A2112 /* NIKUser.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51E1613569A006A2112 /* NIKUser.h */; };
EA07F54816135916006A2112 /* NIKUser.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51F1613569A006A2112 /* NIKUser.m */; };
EA07F54916135916006A2112 /* NIKUserApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5201613569A006A2112 /* NIKUserApi.h */; };
EA07F54A16135916006A2112 /* NIKUserApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5211613569A006A2112 /* NIKUserApi.m */; };
EA4F4D3816F1A90A00F24B35 /* NIKFile.m in Sources */ = {isa = PBXBuildFile; fileRef = EA4F4D3716F1A90A00F24B35 /* NIKFile.m */; };
EA4F4D3916F1A92E00F24B35 /* NIKFile.h in Sources */ = {isa = PBXBuildFile; fileRef = EA4F4D3616F1A90A00F24B35 /* NIKFile.h */; };
EA4F4D3A16F1A92E00F24B35 /* NIKFile.m in Sources */ = {isa = PBXBuildFile; fileRef = EA4F4D3716F1A90A00F24B35 /* NIKFile.m */; };
EA5A034416141443003B3E41 /* UserApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EA5A034316141443003B3E41 /* UserApiTest.m */; };
EAE96DE616138695004AB97C /* PetApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EA81837816137FD500341A6E /* PetApiTest.m */; };
EAE96DE716138695004AB97C /* PetApiTest.h in Sources */ = {isa = PBXBuildFile; fileRef = EA81837916137FD500341A6E /* PetApiTest.h */; };
EAE9042217BF2F7900486EFE /* NIKApiInvoker.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040617BF2F3A00486EFE /* NIKApiInvoker.h */; };
EAE9042317BF2F7900486EFE /* NIKApiInvoker.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040717BF2F3A00486EFE /* NIKApiInvoker.m */; };
EAE9042417BF2F7900486EFE /* NIKDate.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040817BF2F3A00486EFE /* NIKDate.h */; };
EAE9042517BF2F7900486EFE /* NIKDate.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040917BF2F3A00486EFE /* NIKDate.m */; };
EAE9042617BF2F7900486EFE /* NIKSwaggerObject.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040A17BF2F3A00486EFE /* NIKSwaggerObject.h */; };
EAE9042717BF2F7900486EFE /* NIKSwaggerObject.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040B17BF2F3A00486EFE /* NIKSwaggerObject.m */; };
EAE9042817BF2F7900486EFE /* RVBCategory.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE903F617BF2CB200486EFE /* RVBCategory.h */; };
EAE9042917BF2F7900486EFE /* RVBCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE903F717BF2CB200486EFE /* RVBCategory.m */; };
EAE9042A17BF2F7900486EFE /* RVBOrder.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE903F817BF2CB200486EFE /* RVBOrder.h */; };
EAE9042B17BF2F7900486EFE /* RVBOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE903F917BF2CB200486EFE /* RVBOrder.m */; };
EAE9042C17BF2F7900486EFE /* RVBPet.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE903FA17BF2CB200486EFE /* RVBPet.h */; };
EAE9042D17BF2F7900486EFE /* RVBPet.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE903FB17BF2CB200486EFE /* RVBPet.m */; };
EAE9042E17BF2F7900486EFE /* RVBPetApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE903FC17BF2CB200486EFE /* RVBPetApi.h */; };
EAE9042F17BF2F7900486EFE /* RVBPetApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE903FD17BF2CB200486EFE /* RVBPetApi.m */; };
EAE9043017BF2F7900486EFE /* RVBStoreApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE903FE17BF2CB200486EFE /* RVBStoreApi.h */; };
EAE9043117BF2F7900486EFE /* RVBStoreApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE903FF17BF2CB200486EFE /* RVBStoreApi.m */; };
EAE9043217BF2F7900486EFE /* RVBTag.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040017BF2CB200486EFE /* RVBTag.h */; };
EAE9043317BF2F7900486EFE /* RVBTag.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040117BF2CB200486EFE /* RVBTag.m */; };
EAE9043417BF2F7900486EFE /* RVBUser.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040217BF2CB200486EFE /* RVBUser.h */; };
EAE9043517BF2F7900486EFE /* RVBUser.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040317BF2CB200486EFE /* RVBUser.m */; };
EAE9043617BF2F7900486EFE /* RVBUserApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040417BF2CB200486EFE /* RVBUserApi.h */; };
EAE9043717BF2F7900486EFE /* RVBUserApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EAE9040517BF2CB200486EFE /* RVBUserApi.m */; };
EAE9043817BF318800486EFE /* NIKFile.h in Sources */ = {isa = PBXBuildFile; fileRef = EA4F4D3616F1A90A00F24B35 /* NIKFile.h */; };
EAE9043917BF318800486EFE /* NIKFile.m in Sources */ = {isa = PBXBuildFile; fileRef = EA4F4D3716F1A90A00F24B35 /* NIKFile.m */; };
EAE9043A17BF31C800486EFE /* PetApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EA81837816137FD500341A6E /* PetApiTest.m */; };
EAE9043B17BF31C800486EFE /* PetApiTest.h in Sources */ = {isa = PBXBuildFile; fileRef = EA81837916137FD500341A6E /* PetApiTest.h */; };
EAE9043C17BF31C800486EFE /* UserApiTest.h in Sources */ = {isa = PBXBuildFile; fileRef = EA5A034216141443003B3E41 /* UserApiTest.h */; };
EAE9043D17BF31C800486EFE /* UserApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EA5A034316141443003B3E41 /* UserApiTest.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -83,28 +73,6 @@
EA07F4C316134F27006A2112 /* PetstoreClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-Prefix.pch"; sourceTree = "<group>"; };
EA07F4C416134F27006A2112 /* PetstoreClient.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = PetstoreClient.1; sourceTree = "<group>"; };
EA07F4F21613521A006A2112 /* PetstoreClientTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PetstoreClientTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
EA07F50C1613569A006A2112 /* NIKApiInvoker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKApiInvoker.h; path = ../client/NIKApiInvoker.h; sourceTree = "<group>"; };
EA07F50D1613569A006A2112 /* NIKApiInvoker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKApiInvoker.m; path = ../client/NIKApiInvoker.m; sourceTree = "<group>"; };
EA07F50E1613569A006A2112 /* NIKCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKCategory.h; path = ../client/NIKCategory.h; sourceTree = "<group>"; };
EA07F50F1613569A006A2112 /* NIKCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKCategory.m; path = ../client/NIKCategory.m; sourceTree = "<group>"; };
EA07F5101613569A006A2112 /* NIKDate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKDate.h; path = ../client/NIKDate.h; sourceTree = "<group>"; };
EA07F5111613569A006A2112 /* NIKDate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKDate.m; path = ../client/NIKDate.m; sourceTree = "<group>"; };
EA07F5121613569A006A2112 /* NIKOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKOrder.h; path = ../client/NIKOrder.h; sourceTree = "<group>"; };
EA07F5131613569A006A2112 /* NIKOrder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKOrder.m; path = ../client/NIKOrder.m; sourceTree = "<group>"; };
EA07F5141613569A006A2112 /* NIKPet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKPet.h; path = ../client/NIKPet.h; sourceTree = "<group>"; };
EA07F5151613569A006A2112 /* NIKPet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKPet.m; path = ../client/NIKPet.m; sourceTree = "<group>"; };
EA07F5161613569A006A2112 /* NIKPetApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKPetApi.h; path = ../client/NIKPetApi.h; sourceTree = "<group>"; };
EA07F5171613569A006A2112 /* NIKPetApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKPetApi.m; path = ../client/NIKPetApi.m; sourceTree = "<group>"; };
EA07F5181613569A006A2112 /* NIKStoreApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKStoreApi.h; path = ../client/NIKStoreApi.h; sourceTree = "<group>"; };
EA07F5191613569A006A2112 /* NIKStoreApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKStoreApi.m; path = ../client/NIKStoreApi.m; sourceTree = "<group>"; };
EA07F51A1613569A006A2112 /* NIKSwaggerObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKSwaggerObject.h; path = ../client/NIKSwaggerObject.h; sourceTree = "<group>"; };
EA07F51B1613569A006A2112 /* NIKSwaggerObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKSwaggerObject.m; path = ../client/NIKSwaggerObject.m; sourceTree = "<group>"; };
EA07F51C1613569A006A2112 /* NIKTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKTag.h; path = ../client/NIKTag.h; sourceTree = "<group>"; };
EA07F51D1613569A006A2112 /* NIKTag.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKTag.m; path = ../client/NIKTag.m; sourceTree = "<group>"; };
EA07F51E1613569A006A2112 /* NIKUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKUser.h; path = ../client/NIKUser.h; sourceTree = "<group>"; };
EA07F51F1613569A006A2112 /* NIKUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKUser.m; path = ../client/NIKUser.m; sourceTree = "<group>"; };
EA07F5201613569A006A2112 /* NIKUserApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKUserApi.h; path = ../client/NIKUserApi.h; sourceTree = "<group>"; };
EA07F5211613569A006A2112 /* NIKUserApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKUserApi.m; path = ../client/NIKUserApi.m; sourceTree = "<group>"; };
EA07F5301613580E006A2112 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
EA07F53216135819006A2112 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
EA4F4D3616F1A90A00F24B35 /* NIKFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKFile.h; path = ../client/NIKFile.h; sourceTree = "<group>"; };
@ -113,6 +81,28 @@
EA5A034316141443003B3E41 /* UserApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UserApiTest.m; path = ../tests/UserApiTest.m; sourceTree = "<group>"; };
EA81837816137FD500341A6E /* PetApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PetApiTest.m; path = ../tests/PetApiTest.m; sourceTree = "<group>"; };
EA81837916137FD500341A6E /* PetApiTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PetApiTest.h; path = ../tests/PetApiTest.h; sourceTree = "<group>"; };
EAE903F617BF2CB200486EFE /* RVBCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RVBCategory.h; path = ../client/RVBCategory.h; sourceTree = "<group>"; };
EAE903F717BF2CB200486EFE /* RVBCategory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RVBCategory.m; path = ../client/RVBCategory.m; sourceTree = "<group>"; };
EAE903F817BF2CB200486EFE /* RVBOrder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RVBOrder.h; path = ../client/RVBOrder.h; sourceTree = "<group>"; };
EAE903F917BF2CB200486EFE /* RVBOrder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RVBOrder.m; path = ../client/RVBOrder.m; sourceTree = "<group>"; };
EAE903FA17BF2CB200486EFE /* RVBPet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RVBPet.h; path = ../client/RVBPet.h; sourceTree = "<group>"; };
EAE903FB17BF2CB200486EFE /* RVBPet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RVBPet.m; path = ../client/RVBPet.m; sourceTree = "<group>"; };
EAE903FC17BF2CB200486EFE /* RVBPetApi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RVBPetApi.h; path = ../client/RVBPetApi.h; sourceTree = "<group>"; };
EAE903FD17BF2CB200486EFE /* RVBPetApi.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RVBPetApi.m; path = ../client/RVBPetApi.m; sourceTree = "<group>"; };
EAE903FE17BF2CB200486EFE /* RVBStoreApi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RVBStoreApi.h; path = ../client/RVBStoreApi.h; sourceTree = "<group>"; };
EAE903FF17BF2CB200486EFE /* RVBStoreApi.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RVBStoreApi.m; path = ../client/RVBStoreApi.m; sourceTree = "<group>"; };
EAE9040017BF2CB200486EFE /* RVBTag.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RVBTag.h; path = ../client/RVBTag.h; sourceTree = "<group>"; };
EAE9040117BF2CB200486EFE /* RVBTag.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RVBTag.m; path = ../client/RVBTag.m; sourceTree = "<group>"; };
EAE9040217BF2CB200486EFE /* RVBUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RVBUser.h; path = ../client/RVBUser.h; sourceTree = "<group>"; };
EAE9040317BF2CB200486EFE /* RVBUser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RVBUser.m; path = ../client/RVBUser.m; sourceTree = "<group>"; };
EAE9040417BF2CB200486EFE /* RVBUserApi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RVBUserApi.h; path = ../client/RVBUserApi.h; sourceTree = "<group>"; };
EAE9040517BF2CB200486EFE /* RVBUserApi.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RVBUserApi.m; path = ../client/RVBUserApi.m; sourceTree = "<group>"; };
EAE9040617BF2F3A00486EFE /* NIKApiInvoker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NIKApiInvoker.h; path = ../client/NIKApiInvoker.h; sourceTree = "<group>"; };
EAE9040717BF2F3A00486EFE /* NIKApiInvoker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NIKApiInvoker.m; path = ../client/NIKApiInvoker.m; sourceTree = "<group>"; };
EAE9040817BF2F3A00486EFE /* NIKDate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NIKDate.h; path = ../client/NIKDate.h; sourceTree = "<group>"; };
EAE9040917BF2F3A00486EFE /* NIKDate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NIKDate.m; path = ../client/NIKDate.m; sourceTree = "<group>"; };
EAE9040A17BF2F3A00486EFE /* NIKSwaggerObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NIKSwaggerObject.h; path = ../client/NIKSwaggerObject.h; sourceTree = "<group>"; };
EAE9040B17BF2F3A00486EFE /* NIKSwaggerObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NIKSwaggerObject.m; path = ../client/NIKSwaggerObject.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -139,8 +129,6 @@
EA07F4AE16134F27006A2112 = {
isa = PBXGroup;
children = (
EA4F4D3616F1A90A00F24B35 /* NIKFile.h */,
EA4F4D3716F1A90A00F24B35 /* NIKFile.m */,
EA81837C1613809300341A6E /* Tests */,
EA07F52D1613569E006A2112 /* Generated Client */,
EA07F4BF16134F27006A2112 /* PetstoreClient */,
@ -197,28 +185,30 @@
EA07F52D1613569E006A2112 /* Generated Client */ = {
isa = PBXGroup;
children = (
EA07F50C1613569A006A2112 /* NIKApiInvoker.h */,
EA07F50D1613569A006A2112 /* NIKApiInvoker.m */,
EA07F50E1613569A006A2112 /* NIKCategory.h */,
EA07F50F1613569A006A2112 /* NIKCategory.m */,
EA07F5101613569A006A2112 /* NIKDate.h */,
EA07F5111613569A006A2112 /* NIKDate.m */,
EA07F5121613569A006A2112 /* NIKOrder.h */,
EA07F5131613569A006A2112 /* NIKOrder.m */,
EA07F5141613569A006A2112 /* NIKPet.h */,
EA07F5151613569A006A2112 /* NIKPet.m */,
EA07F5161613569A006A2112 /* NIKPetApi.h */,
EA07F5171613569A006A2112 /* NIKPetApi.m */,
EA07F5181613569A006A2112 /* NIKStoreApi.h */,
EA07F5191613569A006A2112 /* NIKStoreApi.m */,
EA07F51A1613569A006A2112 /* NIKSwaggerObject.h */,
EA07F51B1613569A006A2112 /* NIKSwaggerObject.m */,
EA07F51C1613569A006A2112 /* NIKTag.h */,
EA07F51D1613569A006A2112 /* NIKTag.m */,
EA07F51E1613569A006A2112 /* NIKUser.h */,
EA07F51F1613569A006A2112 /* NIKUser.m */,
EA07F5201613569A006A2112 /* NIKUserApi.h */,
EA07F5211613569A006A2112 /* NIKUserApi.m */,
EAE9040617BF2F3A00486EFE /* NIKApiInvoker.h */,
EAE9040717BF2F3A00486EFE /* NIKApiInvoker.m */,
EAE9040817BF2F3A00486EFE /* NIKDate.h */,
EAE9040917BF2F3A00486EFE /* NIKDate.m */,
EA4F4D3616F1A90A00F24B35 /* NIKFile.h */,
EA4F4D3716F1A90A00F24B35 /* NIKFile.m */,
EAE9040A17BF2F3A00486EFE /* NIKSwaggerObject.h */,
EAE9040B17BF2F3A00486EFE /* NIKSwaggerObject.m */,
EAE903F617BF2CB200486EFE /* RVBCategory.h */,
EAE903F717BF2CB200486EFE /* RVBCategory.m */,
EAE903F817BF2CB200486EFE /* RVBOrder.h */,
EAE903F917BF2CB200486EFE /* RVBOrder.m */,
EAE903FA17BF2CB200486EFE /* RVBPet.h */,
EAE903FB17BF2CB200486EFE /* RVBPet.m */,
EAE903FC17BF2CB200486EFE /* RVBPetApi.h */,
EAE903FD17BF2CB200486EFE /* RVBPetApi.m */,
EAE903FE17BF2CB200486EFE /* RVBStoreApi.h */,
EAE903FF17BF2CB200486EFE /* RVBStoreApi.m */,
EAE9040017BF2CB200486EFE /* RVBTag.h */,
EAE9040117BF2CB200486EFE /* RVBTag.m */,
EAE9040217BF2CB200486EFE /* RVBUser.h */,
EAE9040317BF2CB200486EFE /* RVBUser.m */,
EAE9040417BF2CB200486EFE /* RVBUserApi.h */,
EAE9040517BF2CB200486EFE /* RVBUserApi.m */,
);
name = "Generated Client";
sourceTree = "<group>";
@ -332,17 +322,6 @@
buildActionMask = 2147483647;
files = (
EA07F4C116134F27006A2112 /* main.m in Sources */,
EA07F5221613569A006A2112 /* NIKApiInvoker.m in Sources */,
EA07F5231613569A006A2112 /* NIKCategory.m in Sources */,
EA07F5241613569A006A2112 /* NIKDate.m in Sources */,
EA07F5251613569A006A2112 /* NIKOrder.m in Sources */,
EA07F5261613569A006A2112 /* NIKPet.m in Sources */,
EA07F5271613569A006A2112 /* NIKPetApi.m in Sources */,
EA07F5281613569A006A2112 /* NIKStoreApi.m in Sources */,
EA07F5291613569A006A2112 /* NIKSwaggerObject.m in Sources */,
EA07F52A1613569A006A2112 /* NIKTag.m in Sources */,
EA07F52B1613569A006A2112 /* NIKUser.m in Sources */,
EA07F52C1613569A006A2112 /* NIKUserApi.m in Sources */,
EA4F4D3816F1A90A00F24B35 /* NIKFile.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -351,33 +330,34 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EA4F4D3916F1A92E00F24B35 /* NIKFile.h in Sources */,
EA4F4D3A16F1A92E00F24B35 /* NIKFile.m in Sources */,
EAE96DE616138695004AB97C /* PetApiTest.m in Sources */,
EAE96DE716138695004AB97C /* PetApiTest.h in Sources */,
EA07F53516135916006A2112 /* NIKApiInvoker.h in Sources */,
EA07F53616135916006A2112 /* NIKApiInvoker.m in Sources */,
EA07F53716135916006A2112 /* NIKCategory.h in Sources */,
EA07F53816135916006A2112 /* NIKCategory.m in Sources */,
EA07F53916135916006A2112 /* NIKDate.h in Sources */,
EA07F53A16135916006A2112 /* NIKDate.m in Sources */,
EA07F53B16135916006A2112 /* NIKOrder.h in Sources */,
EA07F53C16135916006A2112 /* NIKOrder.m in Sources */,
EA07F53D16135916006A2112 /* NIKPet.h in Sources */,
EA07F53E16135916006A2112 /* NIKPet.m in Sources */,
EA07F53F16135916006A2112 /* NIKPetApi.h in Sources */,
EA07F54016135916006A2112 /* NIKPetApi.m in Sources */,
EA07F54116135916006A2112 /* NIKStoreApi.h in Sources */,
EA07F54216135916006A2112 /* NIKStoreApi.m in Sources */,
EA07F54316135916006A2112 /* NIKSwaggerObject.h in Sources */,
EA07F54416135916006A2112 /* NIKSwaggerObject.m in Sources */,
EA07F54516135916006A2112 /* NIKTag.h in Sources */,
EA07F54616135916006A2112 /* NIKTag.m in Sources */,
EA07F54716135916006A2112 /* NIKUser.h in Sources */,
EA07F54816135916006A2112 /* NIKUser.m in Sources */,
EA07F54916135916006A2112 /* NIKUserApi.h in Sources */,
EA07F54A16135916006A2112 /* NIKUserApi.m in Sources */,
EA5A034416141443003B3E41 /* UserApiTest.m in Sources */,
EAE9043A17BF31C800486EFE /* PetApiTest.m in Sources */,
EAE9043B17BF31C800486EFE /* PetApiTest.h in Sources */,
EAE9043C17BF31C800486EFE /* UserApiTest.h in Sources */,
EAE9043D17BF31C800486EFE /* UserApiTest.m in Sources */,
EAE9043817BF318800486EFE /* NIKFile.h in Sources */,
EAE9043917BF318800486EFE /* NIKFile.m in Sources */,
EAE9042217BF2F7900486EFE /* NIKApiInvoker.h in Sources */,
EAE9042317BF2F7900486EFE /* NIKApiInvoker.m in Sources */,
EAE9042417BF2F7900486EFE /* NIKDate.h in Sources */,
EAE9042517BF2F7900486EFE /* NIKDate.m in Sources */,
EAE9042617BF2F7900486EFE /* NIKSwaggerObject.h in Sources */,
EAE9042717BF2F7900486EFE /* NIKSwaggerObject.m in Sources */,
EAE9042817BF2F7900486EFE /* RVBCategory.h in Sources */,
EAE9042917BF2F7900486EFE /* RVBCategory.m in Sources */,
EAE9042A17BF2F7900486EFE /* RVBOrder.h in Sources */,
EAE9042B17BF2F7900486EFE /* RVBOrder.m in Sources */,
EAE9042C17BF2F7900486EFE /* RVBPet.h in Sources */,
EAE9042D17BF2F7900486EFE /* RVBPet.m in Sources */,
EAE9042E17BF2F7900486EFE /* RVBPetApi.h in Sources */,
EAE9042F17BF2F7900486EFE /* RVBPetApi.m in Sources */,
EAE9043017BF2F7900486EFE /* RVBStoreApi.h in Sources */,
EAE9043117BF2F7900486EFE /* RVBStoreApi.m in Sources */,
EAE9043217BF2F7900486EFE /* RVBTag.h in Sources */,
EAE9043317BF2F7900486EFE /* RVBTag.m in Sources */,
EAE9043417BF2F7900486EFE /* RVBUser.h in Sources */,
EAE9043517BF2F7900486EFE /* RVBUser.m in Sources */,
EAE9043617BF2F7900486EFE /* RVBUserApi.h in Sources */,
EAE9043717BF2F7900486EFE /* RVBUserApi.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -403,9 +383,7 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
);
FRAMEWORK_SEARCH_PATHS = "\"$(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks\"";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@ -437,9 +415,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
);
FRAMEWORK_SEARCH_PATHS = "\"$(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks\"";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../tests/PetApiTest.m"
timestampString = "398404382.504334"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "20"
endingLineNumber = "20"
landmarkName = "-testGetPetById"
landmarkType = "5">
<Locations>
<Location
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "-[PetApiTest testGetPetById]"
moduleName = "PetstoreClientTests"
urlString = "file://localhost/Users/tony/dev/projects/fehguy/swagger-codegen/samples/client/petstore/objc/tests/PetApiTest.m"
timestampString = "398406089.256685"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "20"
endingLineNumber = "20"
offsetFromSymbolStart = "52">
</Location>
<Location
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "__28-[PetApiTest testGetPetById]_block_invoke"
moduleName = "PetstoreClientTests"
urlString = "file://localhost/Users/tony/dev/projects/fehguy/swagger-codegen/samples/client/petstore/objc/tests/PetApiTest.m"
timestampString = "398406089.257244"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "20"
endingLineNumber = "20"
offsetFromSymbolStart = "67">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../client/NIKApiInvoker.m"
timestampString = "398404435.909212"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "146"
endingLineNumber = "146"
landmarkName = "-dictionary:method:queryParams:body:headerParams:contentType:completionBlock:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../client/NIKApiInvoker.m"
timestampString = "398404448.364827"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "165"
endingLineNumber = "165"
landmarkName = "-dictionary:method:queryParams:body:headerParams:contentType:completionBlock:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../tests/PetApiTest.m"
timestampString = "398405359.218379"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "16"
endingLineNumber = "16"
landmarkName = "-testGetPetById"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

View File

@ -1,12 +1,12 @@
#import <Foundation/Foundation.h>
#import "NIKSwaggerObject.h"
@interface NIKCategory : NIKSwaggerObject
@interface RVBCategory : NIKSwaggerObject
@property(nonatomic) NSNumber* _id;
@property(nonatomic) NSString* name;
- (id) _id: (NSNumber*) _id
name: (NSString*) name;
@property(nonatomic) NSNumber* _id;
- (id) name: (NSString*) name
_id: (NSNumber*) _id;
- (id) initWithValues: (NSDictionary*)dict;
- (NSDictionary*) asDictionary;

View File

@ -1,13 +1,13 @@
#import "NIKDate.h"
#import "NIKCategory.h"
#import "RVBCategory.h"
@implementation NIKCategory
@implementation RVBCategory
-(id)_id: (NSNumber*) _id
name: (NSString*) name
-(id)name: (NSString*) name
_id: (NSNumber*) _id
{
__id = _id;
_name = name;
__id = _id;
return self;
}
@ -15,8 +15,8 @@
{
self = [super init];
if(self) {
__id = dict[@"id"];
_name = dict[@"name"];
__id = dict[@"id"];
}
@ -25,8 +25,8 @@
-(NSDictionary*) asDictionary {
NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
if(__id != nil) dict[@"id"] = __id ;
if(_name != nil) dict[@"name"] = _name ;
if(__id != nil) dict[@"id"] = __id ;
NSDictionary* output = [dict copy];
return output;
}

View File

@ -2,16 +2,16 @@
#import "NIKSwaggerObject.h"
#import "NIKDate.h"
@interface NIKOrder : NIKSwaggerObject
@interface RVBOrder : NIKSwaggerObject
@property(nonatomic) NSNumber* _id;
@property(nonatomic) NSNumber* petId;
@property(nonatomic) NSString* status;
@property(nonatomic) NSNumber* petId;
@property(nonatomic) NSNumber* quantity;
@property(nonatomic) NIKDate* shipDate;
- (id) _id: (NSNumber*) _id
petId: (NSNumber*) petId
status: (NSString*) status
petId: (NSNumber*) petId
quantity: (NSNumber*) quantity
shipDate: (NIKDate*) shipDate;

View File

@ -1,17 +1,17 @@
#import "NIKDate.h"
#import "NIKOrder.h"
#import "RVBOrder.h"
@implementation NIKOrder
@implementation RVBOrder
-(id)_id: (NSNumber*) _id
petId: (NSNumber*) petId
status: (NSString*) status
petId: (NSNumber*) petId
quantity: (NSNumber*) quantity
shipDate: (NIKDate*) shipDate
{
__id = _id;
_petId = petId;
_status = status;
_petId = petId;
_quantity = quantity;
_shipDate = shipDate;
return self;
@ -22,8 +22,8 @@
self = [super init];
if(self) {
__id = dict[@"id"];
_petId = dict[@"petId"];
_status = dict[@"status"];
_petId = dict[@"petId"];
_quantity = dict[@"quantity"];
id shipDate_dict = dict[@"shipDate"];
_shipDate = [[NIKDate alloc]initWithValues:shipDate_dict];
@ -36,8 +36,8 @@
-(NSDictionary*) asDictionary {
NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
if(__id != nil) dict[@"id"] = __id ;
if(_petId != nil) dict[@"petId"] = _petId ;
if(_status != nil) dict[@"status"] = _status ;
if(_petId != nil) dict[@"petId"] = _petId ;
if(_quantity != nil) dict[@"quantity"] = _quantity ;
if(_shipDate != nil){
if([_shipDate isKindOfClass:[NSArray class]]){

View File

@ -1,22 +1,22 @@
#import <Foundation/Foundation.h>
#import "NIKSwaggerObject.h"
#import "NIKCategory.h"
#import "NIKTag.h"
#import "RVBCategory.h"
#import "RVBTag.h"
@interface NIKPet : NIKSwaggerObject
@interface RVBPet : NIKSwaggerObject
@property(nonatomic) NSArray* tags;
@property(nonatomic) NSNumber* _id;
@property(nonatomic) NIKCategory* category;
@property(nonatomic) NSString* status;
@property(nonatomic) NSString* name;
@property(nonatomic) NSNumber* _id;
@property(nonatomic) NSArray* tags;
@property(nonatomic) NSString* status;
@property(nonatomic) NSArray* photoUrls;
- (id) tags: (NSArray*) tags
@property(nonatomic) RVBCategory* category;
- (id) name: (NSString*) name
_id: (NSNumber*) _id
category: (NIKCategory*) category
tags: (NSArray*) tags
status: (NSString*) status
name: (NSString*) name
photoUrls: (NSArray*) photoUrls;
photoUrls: (NSArray*) photoUrls
category: (RVBCategory*) category;
- (id) initWithValues: (NSDictionary*)dict;
- (NSDictionary*) asDictionary;

View File

@ -1,21 +1,21 @@
#import "NIKDate.h"
#import "NIKPet.h"
#import "RVBPet.h"
@implementation NIKPet
@implementation RVBPet
-(id)tags: (NSArray*) tags
-(id)name: (NSString*) name
_id: (NSNumber*) _id
category: (NIKCategory*) category
tags: (NSArray*) tags
status: (NSString*) status
name: (NSString*) name
photoUrls: (NSArray*) photoUrls
category: (RVBCategory*) category
{
_tags = tags;
__id = _id;
_category = category;
_status = status;
_name = name;
__id = _id;
_tags = tags;
_status = status;
_photoUrls = photoUrls;
_category = category;
return self;
}
@ -23,6 +23,8 @@
{
self = [super init];
if(self) {
_name = dict[@"name"];
__id = dict[@"id"];
id tags_dict = dict[@"tags"];
if([tags_dict isKindOfClass:[NSArray class]]) {
@ -30,7 +32,7 @@
if([(NSArray*)tags_dict count] > 0) {
for (NSDictionary* dict in (NSArray*)tags_dict) {
NIKTag* d = [[NIKTag alloc] initWithValues:dict];
RVBTag* d = [[RVBTag alloc] initWithValues:dict];
[objs addObject:d];
}
@ -43,12 +45,10 @@
else {
_tags = [[NSArray alloc] init];
}
__id = dict[@"id"];
id category_dict = dict[@"category"];
_category = [[NIKCategory alloc]initWithValues:category_dict];
_status = dict[@"status"];
_name = dict[@"name"];
_photoUrls = dict[@"photoUrls"];
id category_dict = dict[@"category"];
_category = [[RVBCategory alloc]initWithValues:category_dict];
}
@ -57,10 +57,12 @@
-(NSDictionary*) asDictionary {
NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
if(_name != nil) dict[@"name"] = _name ;
if(__id != nil) dict[@"id"] = __id ;
if(_tags != nil){
if([_tags isKindOfClass:[NSArray class]]){
NSMutableArray * array = [[NSMutableArray alloc] init];
for( NIKTag *tags in (NSArray*)_tags) {
for( RVBTag *tags in (NSArray*)_tags) {
[array addObject:[(NIKSwaggerObject*)tags asDictionary]];
}
dict[@"tags"] = array;
@ -75,11 +77,12 @@
else {
if(_tags != nil) dict[@"tags"] = [(NIKSwaggerObject*)_tags asDictionary];
}
if(__id != nil) dict[@"id"] = __id ;
if(_status != nil) dict[@"status"] = _status ;
if(_photoUrls != nil) dict[@"photoUrls"] = _photoUrls ;
if(_category != nil){
if([_category isKindOfClass:[NSArray class]]){
NSMutableArray * array = [[NSMutableArray alloc] init];
for( NIKCategory *category in (NSArray*)_category) {
for( RVBCategory *category in (NSArray*)_category) {
[array addObject:[(NIKSwaggerObject*)category asDictionary]];
}
dict[@"category"] = array;
@ -94,9 +97,6 @@
else {
if(_category != nil) dict[@"category"] = [(NIKSwaggerObject*)_category asDictionary];
}
if(_status != nil) dict[@"status"] = _status ;
if(_name != nil) dict[@"name"] = _name ;
if(_photoUrls != nil) dict[@"photoUrls"] = _photoUrls ;
NSDictionary* output = [dict copy];
return output;
}

View File

@ -1,9 +1,9 @@
#import <Foundation/Foundation.h>
#import "NIKApiInvoker.h"
#import "NIKPet.h"
#import "RVBPet.h"
@interface NIKPetApi: NSObject {
@interface RVBPetApi: NSObject {
@private
NSOperationQueue *_queue;
@ -21,7 +21,16 @@
@param petId ID of pet that needs to be fetched
*/
-(void) getPetByIdWithCompletionBlock :(NSString*) petId
completionHandler: (void (^)(NIKPet* output, NSError* error))completionBlock;
completionHandler: (void (^)(RVBPet* output, NSError* error))completionBlock;
/**
Deletes a pet
@param petId Pet id to delete
*/
-(void) deletePetWithCompletionBlock :(NSString*) petId
completionHandler: (void (^)(NSError* error))completionBlock;
/**
@ -29,7 +38,7 @@
@param body Pet object that needs to be added to the store
*/
-(void) addPetWithCompletionBlock :(NIKPet*) body
-(void) addPetWithCompletionBlock :(RVBPet*) body
completionHandler: (void (^)(NSError* error))completionBlock;
/**
@ -38,7 +47,7 @@
@param body Pet object that needs to be updated in the store
*/
-(void) updatePetWithCompletionBlock :(NIKPet*) body
-(void) updatePetWithCompletionBlock :(RVBPet*) body
completionHandler: (void (^)(NSError* error))completionBlock;
/**

View File

@ -1,20 +1,20 @@
#import "NIKPetApi.h"
#import "RVBPetApi.h"
#import "NIKFile.h"
#import "NIKPet.h"
#import "RVBPet.h"
@implementation NIKPetApi
@implementation RVBPetApi
static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
@synthesize queue = _queue;
@synthesize api = _api;
+(NIKPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key {
static NIKPetApi* singletonAPI = nil;
+(RVBPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key {
static RVBPetApi* singletonAPI = nil;
if (singletonAPI == nil) {
singletonAPI = [[NIKPetApi alloc] init];
singletonAPI = [[RVBPetApi alloc] init];
[singletonAPI addHeader:headerValue forKey:key];
}
return singletonAPI;
@ -34,9 +34,9 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) getPetByIdWithCompletionBlock:(NSString*) petId
completionHandler: (void (^)(NIKPet* output, NSError* error))completionBlock{
completionHandler: (void (^)(RVBPet* output, NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}/{petId}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet/{petId}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -63,15 +63,51 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionBlock(nil, error);return;
}
completionBlock( [[NIKPet alloc]initWithValues: data], nil);}];
completionBlock( [[RVBPet alloc]initWithValues: data], nil);}];
}
-(void) addPetWithCompletionBlock:(NIKPet*) body
-(void) deletePetWithCompletionBlock:(NSString*) petId
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet/{petId}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString:@".{format}"] withString:@".json"];
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString:[NSString stringWithFormat:@"%@%@%@", @"{", @"petId", @"}"]] withString: [_api escapeString:petId]];
NSString* contentType = @"application/json";
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* headerParams = [[NSMutableDictionary alloc] init];
id bodyDictionary = nil;
if(petId == nil) {
// error
}
[_api stringWithCompletionBlock:requestUrl
method:@"DELETE"
queryParams:queryParams
body:bodyDictionary
headerParams:headerParams
contentType:contentType
completionBlock:^(NSString *data, NSError *error) {
if (error) {
completionBlock(error);
return;
}
completionBlock(nil);
}];
}
-(void) addPetWithCompletionBlock:(RVBPet*) body
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -129,10 +165,10 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) updatePetWithCompletionBlock:(NIKPet*) body
-(void) updatePetWithCompletionBlock:(RVBPet*) body
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -193,7 +229,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
-(void) findPetsByStatusWithCompletionBlock:(NSString*) status
completionHandler: (void (^)(NSArray* output, NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}/findByStatus", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet/findByStatus", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -224,7 +260,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
if([data isKindOfClass:[NSArray class]]){
NSMutableArray * objs = [[NSMutableArray alloc] initWithCapacity:[data count]];
for (NSDictionary* dict in (NSArray*)data) {
NIKPet* d = [[NIKPet alloc]initWithValues: dict];
RVBPet* d = [[RVBPet alloc]initWithValues: dict];
[objs addObject:d];
}
completionBlock(objs, nil);
@ -237,7 +273,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
-(void) findPetsByTagsWithCompletionBlock:(NSString*) tags
completionHandler: (void (^)(NSArray* output, NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}/findByTags", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet/findByTags", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -268,7 +304,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
if([data isKindOfClass:[NSArray class]]){
NSMutableArray * objs = [[NSMutableArray alloc] initWithCapacity:[data count]];
for (NSDictionary* dict in (NSArray*)data) {
NIKPet* d = [[NIKPet alloc]initWithValues: dict];
RVBPet* d = [[RVBPet alloc]initWithValues: dict];
[objs addObject:d];
}
completionBlock(objs, nil);
@ -282,7 +318,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionHandler:(void (^)(NSString*, NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}/{petId}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet/{petId}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -326,11 +362,48 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) addPetAsJsonWithCompletionBlock :(NIKPet*) body
-(void) deletePetAsJsonWithCompletionBlock :(NSString*) petId
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet/{petId}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString:@".{format}"] withString:@""];
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString:[NSString stringWithFormat:@"%@%@%@", @"{", @"petId", @"}"]] withString: [_api escapeString:petId]];
NSString* contentType = @"application/json";
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* headerParams = [[NSMutableDictionary alloc] init];
id bodyDictionary = nil;
if(petId == nil) {
// error
}
[_api dictionary:requestUrl
method:@"DELETE"
queryParams:queryParams
body:bodyDictionary
headerParams:headerParams
contentType:contentType
completionBlock:^(NSDictionary *data, NSError *error) {
if (error) {
completionBlock(error);return;
}
completionBlock(nil);
}];
}
-(void) addPetAsJsonWithCompletionBlock :(RVBPet*) body
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -384,11 +457,11 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) updatePetAsJsonWithCompletionBlock :(NIKPet*) body
-(void) updatePetAsJsonWithCompletionBlock :(RVBPet*) body
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -446,7 +519,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionHandler:(void (^)(NSString*, NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}/findByStatus", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet/findByStatus", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -495,7 +568,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionHandler:(void (^)(NSString*, NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet.{format}/findByTags", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/pet/findByTags", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)

View File

@ -1,9 +1,9 @@
#import <Foundation/Foundation.h>
#import "NIKApiInvoker.h"
#import "NIKOrder.h"
#import "RVBOrder.h"
@interface NIKStoreApi: NSObject {
@interface RVBStoreApi: NSObject {
@private
NSOperationQueue *_queue;
@ -21,12 +21,12 @@
@param orderId ID of pet that needs to be fetched
*/
-(void) getOrderByIdWithCompletionBlock :(NSString*) orderId
completionHandler: (void (^)(NIKOrder* output, NSError* error))completionBlock;
completionHandler: (void (^)(RVBOrder* output, NSError* error))completionBlock;
/**
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
*/
-(void) deleteOrderWithCompletionBlock :(NSString*) orderId
@ -38,7 +38,7 @@
@param body order placed for purchasing the pet
*/
-(void) placeOrderWithCompletionBlock :(NIKOrder*) body
-(void) placeOrderWithCompletionBlock :(RVBOrder*) body
completionHandler: (void (^)(NSError* error))completionBlock;
@end

View File

@ -1,20 +1,20 @@
#import "NIKStoreApi.h"
#import "RVBStoreApi.h"
#import "NIKFile.h"
#import "NIKOrder.h"
#import "RVBOrder.h"
@implementation NIKStoreApi
@implementation RVBStoreApi
static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
@synthesize queue = _queue;
@synthesize api = _api;
+(NIKStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key {
static NIKStoreApi* singletonAPI = nil;
+(RVBStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key {
static RVBStoreApi* singletonAPI = nil;
if (singletonAPI == nil) {
singletonAPI = [[NIKStoreApi alloc] init];
singletonAPI = [[RVBStoreApi alloc] init];
[singletonAPI addHeader:headerValue forKey:key];
}
return singletonAPI;
@ -34,9 +34,9 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) getOrderByIdWithCompletionBlock:(NSString*) orderId
completionHandler: (void (^)(NIKOrder* output, NSError* error))completionBlock{
completionHandler: (void (^)(RVBOrder* output, NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store.{format}/order/{orderId}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store/order/{orderId}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -63,7 +63,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionBlock(nil, error);return;
}
completionBlock( [[NIKOrder alloc]initWithValues: data], nil);}];
completionBlock( [[RVBOrder alloc]initWithValues: data], nil);}];
}
@ -71,7 +71,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
-(void) deleteOrderWithCompletionBlock:(NSString*) orderId
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store.{format}/order/{orderId}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store/order/{orderId}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -104,10 +104,10 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) placeOrderWithCompletionBlock:(NIKOrder*) body
-(void) placeOrderWithCompletionBlock:(RVBOrder*) body
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store.{format}/order", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store/order", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -169,7 +169,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionHandler:(void (^)(NSString*, NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store.{format}/order/{orderId}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store/order/{orderId}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -217,7 +217,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store.{format}/order/{orderId}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store/order/{orderId}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -250,11 +250,11 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) placeOrderAsJsonWithCompletionBlock :(NIKOrder*) body
-(void) placeOrderAsJsonWithCompletionBlock :(RVBOrder*) body
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store.{format}/order", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/store/order", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)

View File

@ -1,12 +1,12 @@
#import <Foundation/Foundation.h>
#import "NIKSwaggerObject.h"
@interface NIKTag : NIKSwaggerObject
@interface RVBTag : NIKSwaggerObject
@property(nonatomic) NSNumber* _id;
@property(nonatomic) NSString* name;
- (id) _id: (NSNumber*) _id
name: (NSString*) name;
@property(nonatomic) NSNumber* _id;
- (id) name: (NSString*) name
_id: (NSNumber*) _id;
- (id) initWithValues: (NSDictionary*)dict;
- (NSDictionary*) asDictionary;

View File

@ -1,13 +1,13 @@
#import "NIKDate.h"
#import "NIKTag.h"
#import "RVBTag.h"
@implementation NIKTag
@implementation RVBTag
-(id)_id: (NSNumber*) _id
name: (NSString*) name
-(id)name: (NSString*) name
_id: (NSNumber*) _id
{
__id = _id;
_name = name;
__id = _id;
return self;
}
@ -15,8 +15,8 @@
{
self = [super init];
if(self) {
__id = dict[@"id"];
_name = dict[@"name"];
__id = dict[@"id"];
}
@ -25,8 +25,8 @@
-(NSDictionary*) asDictionary {
NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
if(__id != nil) dict[@"id"] = __id ;
if(_name != nil) dict[@"name"] = _name ;
if(__id != nil) dict[@"id"] = __id ;
NSDictionary* output = [dict copy];
return output;
}

View File

@ -1,24 +1,24 @@
#import <Foundation/Foundation.h>
#import "NIKSwaggerObject.h"
@interface NIKUser : NIKSwaggerObject
@interface RVBUser : NIKSwaggerObject
@property(nonatomic) NSNumber* _id;
@property(nonatomic) NSString* lastName;
@property(nonatomic) NSString* phone;
@property(nonatomic) NSString* username;
@property(nonatomic) NSString* email;
@property(nonatomic) NSNumber* userStatus;
@property(nonatomic) NSString* firstName;
@property(nonatomic) NSString* username;
@property(nonatomic) NSString* lastName;
@property(nonatomic) NSString* email;
@property(nonatomic) NSString* password;
@property(nonatomic) NSString* phone;
@property(nonatomic) NSNumber* userStatus;
- (id) _id: (NSNumber*) _id
lastName: (NSString*) lastName
phone: (NSString*) phone
username: (NSString*) username
email: (NSString*) email
userStatus: (NSNumber*) userStatus
firstName: (NSString*) firstName
password: (NSString*) password;
username: (NSString*) username
lastName: (NSString*) lastName
email: (NSString*) email
password: (NSString*) password
phone: (NSString*) phone
userStatus: (NSNumber*) userStatus;
- (id) initWithValues: (NSDictionary*)dict;
- (NSDictionary*) asDictionary;

View File

@ -1,25 +1,25 @@
#import "NIKDate.h"
#import "NIKUser.h"
#import "RVBUser.h"
@implementation NIKUser
@implementation RVBUser
-(id)_id: (NSNumber*) _id
lastName: (NSString*) lastName
phone: (NSString*) phone
username: (NSString*) username
email: (NSString*) email
userStatus: (NSNumber*) userStatus
firstName: (NSString*) firstName
username: (NSString*) username
lastName: (NSString*) lastName
email: (NSString*) email
password: (NSString*) password
phone: (NSString*) phone
userStatus: (NSNumber*) userStatus
{
__id = _id;
_lastName = lastName;
_phone = phone;
_username = username;
_email = email;
_userStatus = userStatus;
_firstName = firstName;
_username = username;
_lastName = lastName;
_email = email;
_password = password;
_phone = phone;
_userStatus = userStatus;
return self;
}
@ -28,13 +28,13 @@
self = [super init];
if(self) {
__id = dict[@"id"];
_lastName = dict[@"lastName"];
_phone = dict[@"phone"];
_username = dict[@"username"];
_email = dict[@"email"];
_userStatus = dict[@"userStatus"];
_firstName = dict[@"firstName"];
_username = dict[@"username"];
_lastName = dict[@"lastName"];
_email = dict[@"email"];
_password = dict[@"password"];
_phone = dict[@"phone"];
_userStatus = dict[@"userStatus"];
}
@ -44,13 +44,13 @@
-(NSDictionary*) asDictionary {
NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
if(__id != nil) dict[@"id"] = __id ;
if(_lastName != nil) dict[@"lastName"] = _lastName ;
if(_phone != nil) dict[@"phone"] = _phone ;
if(_username != nil) dict[@"username"] = _username ;
if(_email != nil) dict[@"email"] = _email ;
if(_userStatus != nil) dict[@"userStatus"] = _userStatus ;
if(_firstName != nil) dict[@"firstName"] = _firstName ;
if(_username != nil) dict[@"username"] = _username ;
if(_lastName != nil) dict[@"lastName"] = _lastName ;
if(_email != nil) dict[@"email"] = _email ;
if(_password != nil) dict[@"password"] = _password ;
if(_phone != nil) dict[@"phone"] = _phone ;
if(_userStatus != nil) dict[@"userStatus"] = _userStatus ;
NSDictionary* output = [dict copy];
return output;
}

View File

@ -1,9 +1,9 @@
#import <Foundation/Foundation.h>
#import "NIKApiInvoker.h"
#import "NIKUser.h"
#import "RVBUser.h"
@interface NIKUserApi: NSObject {
@interface RVBUserApi: NSObject {
@private
NSOperationQueue *_queue;
@ -14,6 +14,15 @@
-(void) addHeader:(NSString*)value forKey:(NSString*)key;
/**
Create user
This can only be done by the logged in user.
@param body Created user object
*/
-(void) createUserWithCompletionBlock :(RVBUser*) body
completionHandler: (void (^)(NSError* error))completionBlock;
/**
Creates list of users with given input array
@ -23,15 +32,6 @@
-(void) createUsersWithArrayInputWithCompletionBlock :(NSArray*) body
completionHandler: (void (^)(NSError* error))completionBlock;
/**
Create user
This can only be done by the logged in user.
@param body Created user object
*/
-(void) createUserWithCompletionBlock :(NIKUser*) body
completionHandler: (void (^)(NSError* error))completionBlock;
/**
Creates list of users with given list input
@ -49,7 +49,7 @@
@param body Updated user object
*/
-(void) updateUserWithCompletionBlock :(NSString*) username
body:(NIKUser*) body
body:(RVBUser*) body
completionHandler: (void (^)(NSError* error))completionBlock;
/**
@ -68,7 +68,7 @@
@param username The name that needs to be fetched. Use user1 for testing.
*/
-(void) getUserByNameWithCompletionBlock :(NSString*) username
completionHandler: (void (^)(NIKUser* output, NSError* error))completionBlock;
completionHandler: (void (^)(RVBUser* output, NSError* error))completionBlock;
/**

View File

@ -1,20 +1,20 @@
#import "NIKUserApi.h"
#import "RVBUserApi.h"
#import "NIKFile.h"
#import "NIKUser.h"
#import "RVBUser.h"
@implementation NIKUserApi
@implementation RVBUserApi
static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
@synthesize queue = _queue;
@synthesize api = _api;
+(NIKUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key {
static NIKUserApi* singletonAPI = nil;
+(RVBUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key {
static RVBUserApi* singletonAPI = nil;
if (singletonAPI == nil) {
singletonAPI = [[NIKUserApi alloc] init];
singletonAPI = [[RVBUserApi alloc] init];
[singletonAPI addHeader:headerValue forKey:key];
}
return singletonAPI;
@ -33,10 +33,10 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
[_api addHeader:value forKey:key];
}
-(void) createUsersWithArrayInputWithCompletionBlock:(NSArray*) body
-(void) createUserWithCompletionBlock:(RVBUser*) body
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/createWithArray", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -94,10 +94,10 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) createUserWithCompletionBlock:(NIKUser*) body
-(void) createUsersWithArrayInputWithCompletionBlock:(NSArray*) body
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/createWithArray", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -158,7 +158,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
-(void) createUsersWithListInputWithCompletionBlock:(NSArray*) body
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/createWithList", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/createWithList", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -217,10 +217,10 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) updateUserWithCompletionBlock:(NSString*) username
body:(NIKUser*) body
body:(RVBUser*) body
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/{username}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/{username}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -285,7 +285,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
-(void) deleteUserWithCompletionBlock:(NSString*) username
completionHandler: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/{username}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/{username}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -319,9 +319,9 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) getUserByNameWithCompletionBlock:(NSString*) username
completionHandler: (void (^)(NIKUser* output, NSError* error))completionBlock{
completionHandler: (void (^)(RVBUser* output, NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/{username}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/{username}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -348,7 +348,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionBlock(nil, error);return;
}
completionBlock( [[NIKUser alloc]initWithValues: data], nil);}];
completionBlock( [[RVBUser alloc]initWithValues: data], nil);}];
}
@ -357,7 +357,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
password:(NSString*) password
completionHandler: (void (^)(NSString* output, NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/login", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/login", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -399,7 +399,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
-(void) logoutUserWithCompletionBlock: (void (^)(NSError* error))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/logout", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/logout", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -428,11 +428,11 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) createUsersWithArrayInputAsJsonWithCompletionBlock :(NSArray*) body
-(void) createUserAsJsonWithCompletionBlock :(RVBUser*) body
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/createWithArray", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -486,11 +486,11 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) createUserAsJsonWithCompletionBlock :(NIKUser*) body
-(void) createUsersWithArrayInputAsJsonWithCompletionBlock :(NSArray*) body
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/createWithArray", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -548,7 +548,7 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/createWithList", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/createWithList", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -603,11 +603,11 @@ static NSString * basePath = @"http://petstore.swagger.wordnik.com/api";
}
-(void) updateUserAsJsonWithCompletionBlock :(NSString*) username
body:(NIKUser*) body
body:(RVBUser*) body
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/{username}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/{username}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -669,7 +669,7 @@ body:(NIKUser*) body
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/{username}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/{username}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -706,7 +706,7 @@ body:(NIKUser*) body
completionHandler:(void (^)(NSString*, NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/{username}", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/{username}", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -755,7 +755,7 @@ password:(NSString*) password
completionHandler:(void (^)(NSString*, NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/login", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/login", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)
@ -809,7 +809,7 @@ password:(NSString*) password
completionHandler:(void (^)(NSError *))completionBlock{
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user.{format}/logout", basePath];
NSMutableString* requestUrl = [NSMutableString stringWithFormat:@"%@/user/logout", basePath];
// remove format in URL if needed
if ([requestUrl rangeOfString:@".{format}"].location != NSNotFound)

View File

@ -1,9 +1,9 @@
#import <SenTestingKit/SenTestingKit.h>
#import "NIKPetApi.h"
#import "RVBPetApi.h"
@interface PetApiTest : SenTestCase {
@private
NIKPetApi * api;
RVBPetApi * api;
}
@end

View File

@ -5,7 +5,7 @@
- (void)setUp {
[super setUp];
api = [[NIKPetApi alloc ]init];
api = [[RVBPetApi alloc ]init];
}
- (void)tearDown {
@ -14,10 +14,10 @@
- (void)testGetPetById {
bool done = false;
static NIKPet* pet = nil;
static RVBPet* pet = nil;
static NSError * gError = nil;
[api getPetByIdWithCompletionBlock:@"1" completionHandler:^(NIKPet *output, NSError *error) {
[api getPetByIdWithCompletionBlock:@"1" completionHandler:^(RVBPet *output, NSError *error) {
if(error) {
gError = error;
}
@ -25,7 +25,7 @@
NSLog(@"failed to fetch pet");
}
else {
pet = [[NIKPet alloc] initWithValues:[output asDictionary]];
pet = [[RVBPet alloc] initWithValues:[output asDictionary]];
}
}];
@ -47,11 +47,11 @@
bool done = false;
static NSError * gError = nil;
NIKPet * petToAdd = [[NIKPet alloc] init];
RVBPet * petToAdd = [[RVBPet alloc] init];
[petToAdd set_id:@"1000"];
NSMutableArray* tags = [[NSMutableArray alloc] init];
for(int i = 0; i < 5; i++){
NIKTag * tag = [[NIKTag alloc] init];
RVBTag * tag = [[RVBTag alloc] init];
[tag set_id:[NSNumber numberWithInt:i]];
[tag setName:[NSString stringWithFormat:@"tag-%d", i]];
[tags addObject:tag];
@ -59,7 +59,7 @@
[petToAdd setTags:tags];
[petToAdd setStatus:@"lost"];
NIKCategory * category = [[NIKCategory alloc] init];
RVBCategory * category = [[RVBCategory alloc] init];
[category setName:@"sold"];
[petToAdd setCategory:category];
[petToAdd setName:@"dragon"];
@ -89,9 +89,9 @@
}
}
static NIKPet* pet = nil;
static RVBPet* pet = nil;
[api getPetByIdWithCompletionBlock:[NSString stringWithFormat:@"%@",[petToAdd _id]] completionHandler:^(NIKPet *output, NSError *error) {
[api getPetByIdWithCompletionBlock:[NSString stringWithFormat:@"%@",[petToAdd _id]] completionHandler:^(RVBPet *output, NSError *error) {
if(error) {
gError = error;
}
@ -99,7 +99,7 @@
NSLog(@"failed to fetch pet");
}
else {
pet = [[NIKPet alloc] initWithValues:[output asDictionary]];
pet = [[RVBPet alloc] initWithValues:[output asDictionary]];
}
}];
@ -123,11 +123,11 @@
bool done = false;
static NSError * gError = nil;
NIKPet * petToAdd = [[NIKPet alloc] init];
RVBPet * petToAdd = [[RVBPet alloc] init];
[petToAdd set_id:[NSNumber numberWithInt:1000]];
NSMutableArray* tags = [[NSMutableArray alloc] init];
for(int i = 0; i < 5; i++){
NIKTag * tag = [[NIKTag alloc] init];
RVBTag * tag = [[RVBTag alloc] init];
[tag set_id:[NSNumber numberWithInt:i]];
[tag setName:[NSString stringWithFormat:@"tag-%d", i]];
[tags addObject:tag];
@ -135,7 +135,7 @@
[petToAdd setTags:tags];
[petToAdd setStatus:@"lost"];
NIKCategory * category = [[NIKCategory alloc] init];
RVBCategory * category = [[RVBCategory alloc] init];
[category setName:@"sold"];
[petToAdd setCategory:category];
[petToAdd setName:@"dragon"];
@ -167,10 +167,10 @@
}
}
static NIKPet* pet = nil;
static RVBPet* pet = nil;
done = false;
[api getPetByIdWithCompletionBlock:[NSString stringWithFormat:@"%@",[petToAdd _id]] completionHandler:^(NIKPet *output, NSError *error) {
[api getPetByIdWithCompletionBlock:[NSString stringWithFormat:@"%@",[petToAdd _id]] completionHandler:^(RVBPet *output, NSError *error) {
if(error) {
gError = error;
}
@ -178,7 +178,7 @@
NSLog(@"failed to fetch pet");
}
else {
pet = [[NIKPet alloc] initWithValues:[output asDictionary]];
pet = [[RVBPet alloc] initWithValues:[output asDictionary]];
NSLog(@"got the pet");
}
}];
@ -223,7 +223,7 @@
pet = nil;
done = false;
[api getPetByIdWithCompletionBlock:[NSString stringWithFormat:@"%d",1000] completionHandler:^(NIKPet *output, NSError *error) {
[api getPetByIdWithCompletionBlock:[NSString stringWithFormat:@"%d",1000] completionHandler:^(RVBPet *output, NSError *error) {
if(error) {
gError = error;
}
@ -231,7 +231,7 @@
NSLog(@"failed to fetch pet");
}
else {
pet = [[NIKPet alloc] initWithValues:[output asDictionary]];
pet = [[RVBPet alloc] initWithValues:[output asDictionary]];
}
}];
@ -264,8 +264,8 @@
}
else {
pets = [[NSMutableArray alloc]init];
for(NIKPet* pet in output) {
[pets addObject:[[NIKPet alloc] initWithValues:[pet asDictionary]]];
for(RVBPet* pet in output) {
[pets addObject:[[RVBPet alloc] initWithValues:[pet asDictionary]]];
}
}
}];
@ -276,7 +276,7 @@
done = true;
}
if(pets){
for(NIKPet * pet in pets) {
for(RVBPet * pet in pets) {
STAssertEqualObjects([pet status], @"available", @"got invalid status for pets");
}
done = true;
@ -297,8 +297,8 @@
}
else {
pets = [[NSMutableArray alloc]init];
for(NIKPet* pet in output) {
[pets addObject:[[NIKPet alloc] initWithValues:[pet asDictionary]]];
for(RVBPet* pet in output) {
[pets addObject:[[RVBPet alloc] initWithValues:[pet asDictionary]]];
}
}
}];
@ -309,9 +309,9 @@
done = true;
}
if(pets){
for(NIKPet * pet in pets) {
for(RVBPet * pet in pets) {
bool hasTag = false;
for(NIKTag * tag in [pet tags]){
for(RVBTag * tag in [pet tags]){
if([[tag name] isEqualToString:@"tag1"] || [[tag name] isEqualToString:@"tag2"])
hasTag = true;
}

View File

@ -1,9 +1,9 @@
#import <SenTestingKit/SenTestingKit.h>
#import "NIKUserApi.h"
#import "RVBUserApi.h"
@interface UserApiTest : SenTestCase {
@private
NIKUserApi * api;
RVBUserApi * api;
}
@end

View File

@ -4,7 +4,7 @@
- (void)setUp {
[super setUp];
api = [[NIKUserApi alloc ]init];
api = [[RVBUserApi alloc ]init];
}
- (void)tearDown {