Permalink
Browse files

添加同城活动 Model

  • Loading branch information...
1 parent 16c155f commit 3702c0c3d479a9847011141ae68c1fb6c3ba0e91 @lincode lincode committed Oct 16, 2012
Showing with 694 additions and 74 deletions.
  1. +52 −8 DoubanAPIEngine/DoubanAPIEngine.xcodeproj/project.pbxproj
  2. +1 −2 DoubanAPIEngine/DoubanAPIEngine/Sources/DOUAPIConfig.m
  3. +5 −1 DoubanAPIEngine/DoubanAPIEngine/Sources/Model/GDataDoubanWrapper/Elements/DoubanLocation.h
  4. +11 −2 DoubanAPIEngine/DoubanAPIEngine/Sources/Model/GDataDoubanWrapper/Elements/DoubanLocation.m
  5. +2 −2 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Community/DOUComment.h
  6. +4 −4 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Community/DOUComment.m
  7. +2 −2 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Community/DOUOnline.h
  8. +4 −4 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Community/DOUOnline.m
  9. +6 −2 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Community/{DOUPeople.h → DOUUser.h}
  10. +22 −3 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Community/{DOUPeople.m → DOUUser.m}
  11. +1 −1 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/DOUObject+Utils.m
  12. +34 −8 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/DOUObject.m
  13. +56 −0 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Event/DOUEvent.h
  14. +282 −0 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Event/DOUEvent.m
  15. +13 −0 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Event/DOUEventArray.h
  16. +22 −0 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Event/DOUEventArray.m
  17. +19 −0 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Event/DOULoc.h
  18. +85 −0 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Event/DOULoc.m
  19. +13 −0 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Event/DOULocArray.h
  20. +22 −0 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Event/DOULocArray.m
  21. +2 −2 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Photo/DOUAlbum.h
  22. +3 −3 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Photo/DOUAlbum.m
  23. +2 −2 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Photo/DOUPhoto.h
  24. +4 −4 DoubanAPIEngine/DoubanAPIEngine/Sources/Model2/Photo/DOUPhoto.m
  25. +1 −1 DoubanAPIEngine/DoubanAPIEngine/Sources/Network/DOUHttpRequest.m
  26. +0 −1 DoubanAPIEngine/DoubanAPIEngine/Sources/Network/DOUService.h
  27. +19 −8 DoubanAPIEngine/DoubanAPIEngine/Sources/Network/DOUService.m
  28. +3 −11 DoubanAPIEngine/DoubanAPIEngineTests/DoubanAPIEngineTests.m
  29. +1 −0 DoubanAPIEngine/DoubanAPIEngineTests/Model/DoubanPeopleTests.m
  30. +1 −1 DoubanAPIEngine/DoubanAPIEngineTests/Model2/DOUOnlineTests.m
  31. +1 −1 DoubanAPIEngine/DoubanAPIEngineTests/Model2/DOUPhotoTests.m
  32. +1 −1 DoubanAPIEngine/DoubanAPIEngineTests/Resources/Model/DoubanEntryEvent.xml
@@ -280,8 +280,6 @@
D87D4C7E15C3F14E0006FAFE /* DOUComment.m in Sources */ = {isa = PBXBuildFile; fileRef = D87D4C7815C3F14E0006FAFE /* DOUComment.m */; };
D87D4C7F15C3F14E0006FAFE /* DOUCommentArray.h in Headers */ = {isa = PBXBuildFile; fileRef = D87D4C7915C3F14E0006FAFE /* DOUCommentArray.h */; };
D87D4C8015C3F14E0006FAFE /* DOUCommentArray.m in Sources */ = {isa = PBXBuildFile; fileRef = D87D4C7A15C3F14E0006FAFE /* DOUCommentArray.m */; };
- D87D4C8115C3F14E0006FAFE /* DOUPeople.h in Headers */ = {isa = PBXBuildFile; fileRef = D87D4C7B15C3F14E0006FAFE /* DOUPeople.h */; };
- D87D4C8215C3F14E0006FAFE /* DOUPeople.m in Sources */ = {isa = PBXBuildFile; fileRef = D87D4C7C15C3F14E0006FAFE /* DOUPeople.m */; };
D87D4C8D15C3F2A70006FAFE /* DoubanCityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D87D4C8515C3F2A70006FAFE /* DoubanCityTests.m */; };
D87D4C8E15C3F2A70006FAFE /* DoubanCommentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D87D4C8615C3F2A70006FAFE /* DoubanCommentTests.m */; };
D87D4C8F15C3F2A70006FAFE /* DoubanEventCategoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D87D4C8715C3F2A70006FAFE /* DoubanEventCategoryTests.m */; };
@@ -324,6 +322,17 @@
D88EAEFD14691D0800A4DE43 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88EAEFC14691D0800A4DE43 /* CoreGraphics.framework */; };
D88EAEFE14691D2F00A4DE43 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D800D71F14690D32009F64FD /* Security.framework */; };
D88EAEFF14691D5B00A4DE43 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88EAEFC14691D0800A4DE43 /* CoreGraphics.framework */; };
+ D89A2A5615ECA3360027C0B0 /* Event.json in Resources */ = {isa = PBXBuildFile; fileRef = D89A2A5515ECA3360027C0B0 /* Event.json */; };
+ D89A6A96162D37EE00954BC4 /* DOUUser.h in Headers */ = {isa = PBXBuildFile; fileRef = D89A6A94162D37EE00954BC4 /* DOUUser.h */; };
+ D89A6A97162D37EE00954BC4 /* DOUUser.m in Sources */ = {isa = PBXBuildFile; fileRef = D89A6A95162D37EE00954BC4 /* DOUUser.m */; };
+ D89A6AA1162D384100954BC4 /* DOUEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = D89A6A99162D384100954BC4 /* DOUEvent.h */; };
+ D89A6AA2162D384100954BC4 /* DOUEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = D89A6A9A162D384100954BC4 /* DOUEvent.m */; };
+ D89A6AA3162D384100954BC4 /* DOUEventArray.h in Headers */ = {isa = PBXBuildFile; fileRef = D89A6A9B162D384100954BC4 /* DOUEventArray.h */; };
+ D89A6AA4162D384100954BC4 /* DOUEventArray.m in Sources */ = {isa = PBXBuildFile; fileRef = D89A6A9C162D384100954BC4 /* DOUEventArray.m */; };
+ D89A6AA5162D384100954BC4 /* DOULoc.h in Headers */ = {isa = PBXBuildFile; fileRef = D89A6A9D162D384100954BC4 /* DOULoc.h */; };
+ D89A6AA6162D384100954BC4 /* DOULoc.m in Sources */ = {isa = PBXBuildFile; fileRef = D89A6A9E162D384100954BC4 /* DOULoc.m */; };
+ D89A6AA7162D384100954BC4 /* DOULocArray.h in Headers */ = {isa = PBXBuildFile; fileRef = D89A6A9F162D384100954BC4 /* DOULocArray.h */; };
+ D89A6AA8162D384100954BC4 /* DOULocArray.m in Sources */ = {isa = PBXBuildFile; fileRef = D89A6AA0162D384100954BC4 /* DOULocArray.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -606,8 +615,6 @@
D87D4C7815C3F14E0006FAFE /* DOUComment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOUComment.m; sourceTree = "<group>"; };
D87D4C7915C3F14E0006FAFE /* DOUCommentArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOUCommentArray.h; sourceTree = "<group>"; };
D87D4C7A15C3F14E0006FAFE /* DOUCommentArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOUCommentArray.m; sourceTree = "<group>"; };
- D87D4C7B15C3F14E0006FAFE /* DOUPeople.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOUPeople.h; sourceTree = "<group>"; };
- D87D4C7C15C3F14E0006FAFE /* DOUPeople.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOUPeople.m; sourceTree = "<group>"; };
D87D4C8515C3F2A70006FAFE /* DoubanCityTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DoubanCityTests.m; sourceTree = "<group>"; };
D87D4C8615C3F2A70006FAFE /* DoubanCommentTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DoubanCommentTests.m; sourceTree = "<group>"; };
D87D4C8715C3F2A70006FAFE /* DoubanEventCategoryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DoubanEventCategoryTests.m; sourceTree = "<group>"; };
@@ -649,6 +656,17 @@
D882161715889DDE004B4AD4 /* DOUTestResponseLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOUTestResponseLoader.h; sourceTree = "<group>"; };
D882161815889DDE004B4AD4 /* DOUTestResponseLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOUTestResponseLoader.m; sourceTree = "<group>"; };
D88EAEFC14691D0800A4DE43 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ D89A2A5515ECA3360027C0B0 /* Event.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Event.json; sourceTree = "<group>"; };
+ D89A6A94162D37EE00954BC4 /* DOUUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOUUser.h; sourceTree = "<group>"; };
+ D89A6A95162D37EE00954BC4 /* DOUUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOUUser.m; sourceTree = "<group>"; };
+ D89A6A99162D384100954BC4 /* DOUEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOUEvent.h; sourceTree = "<group>"; };
+ D89A6A9A162D384100954BC4 /* DOUEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOUEvent.m; sourceTree = "<group>"; };
+ D89A6A9B162D384100954BC4 /* DOUEventArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOUEventArray.h; sourceTree = "<group>"; };
+ D89A6A9C162D384100954BC4 /* DOUEventArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOUEventArray.m; sourceTree = "<group>"; };
+ D89A6A9D162D384100954BC4 /* DOULoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOULoc.h; sourceTree = "<group>"; };
+ D89A6A9E162D384100954BC4 /* DOULoc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOULoc.m; sourceTree = "<group>"; };
+ D89A6A9F162D384100954BC4 /* DOULocArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOULocArray.h; sourceTree = "<group>"; };
+ D89A6AA0162D384100954BC4 /* DOULocArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOULocArray.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -957,6 +975,7 @@
D87D4B0315C3EF350006FAFE /* Model2 */ = {
isa = PBXGroup;
children = (
+ D89A6A98162D384100954BC4 /* Event */,
D87D4B3215C3F00C0006FAFE /* Photo */,
D87D4B2915C3EFBF0006FAFE /* Community */,
D87D4B1115C3EF600006FAFE /* DOUObject.h */,
@@ -970,12 +989,12 @@
D87D4B2915C3EFBF0006FAFE /* Community */ = {
isa = PBXGroup;
children = (
+ D89A6A94162D37EE00954BC4 /* DOUUser.h */,
+ D89A6A95162D37EE00954BC4 /* DOUUser.m */,
D87D4C7715C3F14E0006FAFE /* DOUComment.h */,
D87D4C7815C3F14E0006FAFE /* DOUComment.m */,
D87D4C7915C3F14E0006FAFE /* DOUCommentArray.h */,
D87D4C7A15C3F14E0006FAFE /* DOUCommentArray.m */,
- D87D4C7B15C3F14E0006FAFE /* DOUPeople.h */,
- D87D4C7C15C3F14E0006FAFE /* DOUPeople.m */,
D87D4B1315C3EF600006FAFE /* DOUObject+Utils.h */,
D87D4B1415C3EF600006FAFE /* DOUObject+Utils.m */,
D87D4B2A15C3EFE70006FAFE /* DOUOnline.h */,
@@ -1325,6 +1344,7 @@
isa = PBXGroup;
children = (
D87D4CB715C3F5580006FAFE /* Album.json */,
+ D89A2A5515ECA3360027C0B0 /* Event.json */,
D87D4CB815C3F5580006FAFE /* CommentArray.json */,
D87D4CB915C3F5580006FAFE /* Online.json */,
D87D4CBA15C3F5580006FAFE /* OnlineArray.json */,
@@ -1352,6 +1372,21 @@
path = Resources;
sourceTree = "<group>";
};
+ D89A6A98162D384100954BC4 /* Event */ = {
+ isa = PBXGroup;
+ children = (
+ D89A6A99162D384100954BC4 /* DOUEvent.h */,
+ D89A6A9A162D384100954BC4 /* DOUEvent.m */,
+ D89A6A9B162D384100954BC4 /* DOUEventArray.h */,
+ D89A6A9C162D384100954BC4 /* DOUEventArray.m */,
+ D89A6A9D162D384100954BC4 /* DOULoc.h */,
+ D89A6A9E162D384100954BC4 /* DOULoc.m */,
+ D89A6A9F162D384100954BC4 /* DOULocArray.h */,
+ D89A6AA0162D384100954BC4 /* DOULocArray.m */,
+ );
+ path = Event;
+ sourceTree = "<group>";
+ };
D8CFD43C151C742700CCC311 /* Base64 */ = {
isa = PBXGroup;
children = (
@@ -1502,7 +1537,11 @@
D87D4C7515C3F11C0006FAFE /* NSData+Base64.h in Headers */,
D87D4C7D15C3F14E0006FAFE /* DOUComment.h in Headers */,
D87D4C7F15C3F14E0006FAFE /* DOUCommentArray.h in Headers */,
- D87D4C8115C3F14E0006FAFE /* DOUPeople.h in Headers */,
+ D89A6A96162D37EE00954BC4 /* DOUUser.h in Headers */,
+ D89A6AA1162D384100954BC4 /* DOUEvent.h in Headers */,
+ D89A6AA3162D384100954BC4 /* DOUEventArray.h in Headers */,
+ D89A6AA5162D384100954BC4 /* DOULoc.h in Headers */,
+ D89A6AA7162D384100954BC4 /* DOULocArray.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1600,6 +1639,7 @@
D87D4CC015C3F5580006FAFE /* OnlineArray.json in Resources */,
D87D4CC115C3F5580006FAFE /* Photo.json in Resources */,
D87D4CC215C3F5580006FAFE /* PhotoArray.json in Resources */,
+ D89A2A5615ECA3360027C0B0 /* Event.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1750,7 +1790,11 @@
D87D4C7615C3F11C0006FAFE /* NSData+Base64.m in Sources */,
D87D4C7E15C3F14E0006FAFE /* DOUComment.m in Sources */,
D87D4C8015C3F14E0006FAFE /* DOUCommentArray.m in Sources */,
- D87D4C8215C3F14E0006FAFE /* DOUPeople.m in Sources */,
+ D89A6A97162D37EE00954BC4 /* DOUUser.m in Sources */,
+ D89A6AA2162D384100954BC4 /* DOUEvent.m in Sources */,
+ D89A6AA4162D384100954BC4 /* DOUEventArray.m in Sources */,
+ D89A6AA6162D384100954BC4 /* DOULoc.m in Sources */,
+ D89A6AA8162D384100954BC4 /* DOULocArray.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -11,14 +11,13 @@
//
// Douban parameters:
//
-
+//
NSString * const kHttpsApiBaseUrl = @"https://api.douban.com";
NSString * const kHttpApiBaseUrl = @"http://api.douban.com";
//NSString * const kHttpApiBaseUrl = @"http://loc-zeta.douban.com/service/api";
//NSString * const kHttpsApiBaseUrl = @"https://loc-zeta.douban.com/service/api";
-
NSString * const kAuthUrl = @"https://www.douban.com/service/auth2/auth";
NSString * const kTokenUrl = @"https://www.douban.com/service/auth2/token";
@@ -3,7 +3,7 @@
// douban-objective-c
//
// Created by py on 3/19/10.
-// Copyright 2010 __MyCompanyName__. All rights reserved.
+// Copyright 2010 Douban.inc All rights reserved.
//
#import "GDataExtendedProperty.h"
@@ -14,6 +14,10 @@
- (void)setIdentity:(NSString *)str;
+- (NSString *)uid;
+
+- (void)setUid:(NSString *)str;
+
- (NSString *)content;
- (void)setContent:(NSString *)str;
@@ -10,7 +10,7 @@
#import "DoubanLocation.h"
static NSString* const kIdentityAttr = @"id";
-static NSString* const kContentAttr = @"content";
+static NSString* const kNIdentifyAttr = @"n_id";
@implementation DoubanLocation
@@ -21,7 +21,7 @@ + (NSString *)extensionElementLocalName { return @"location"; }
- (void)addParseDeclarations {
NSArray *attrs = [NSArray arrayWithObjects:
- kIdentityAttr, kContentAttr, nil];
+ kIdentityAttr, kNIdentifyAttr, nil];
[self addLocalAttributeDeclarations:attrs];
[self addContentValueDeclaration];
@@ -38,6 +38,15 @@ - (void)setIdentity:(NSString *)str {
}
+- (NSString *)uid {
+ return [self stringValueForAttribute:kIdentityAttr];
+}
+
+
+- (void)setUid:(NSString *)str {
+ [self setStringValue:str forAttribute:kIdentityAttr];
+}
+
- (NSString *)content {
return [self contentStringValue];
}
@@ -8,7 +8,7 @@
#import "DOUObject.h"
-@class DOUPeople;
+@class DOUUser;
@interface DOUComment : DOUObject
@@ -18,6 +18,6 @@
@property (nonatomic, copy) NSString *createTimeStr;
@property (nonatomic, retain) NSDate *createTime;
-@property (nonatomic, retain) DOUPeople *author;
+@property (nonatomic, retain) DOUUser *author;
@end
@@ -7,7 +7,7 @@
//
#import "DOUComment.h"
-#import "DOUPeople.h"
+#import "DOUUser.h"
#import "DOUObject+Utils.h"
@@ -40,10 +40,10 @@ - (NSDate *)createTime {
}
-- (DOUPeople *)author {
+- (DOUUser *)author {
NSDictionary *dic = [self.dictionary objectForKey:@"author"];
- DOUPeople *people = [DOUPeople objectWithDictionary:dic];
- return people;
+ DOUUser *user = [DOUUser objectWithDictionary:dic];
+ return user;
}
@@ -8,7 +8,7 @@
#import "DOUObject.h"
-@class DOUPeople;
+@class DOUUser;
@interface DOUOnline : DOUObject
@property (nonatomic, copy) NSString *identifier;
@@ -45,7 +45,7 @@
@property (nonatomic, copy) NSString *image;
-@property (nonatomic, retain) DOUPeople *owner;
+@property (nonatomic, retain) DOUUser *owner;
@property (nonatomic, assign) BOOL liked;
@property (nonatomic, assign) BOOL participated;
@@ -7,7 +7,7 @@
//
#import "DOUOnline.h"
-#import "DOUPeople.h"
+#import "DOUUser.h"
#import "DOUObject+Utils.h"
@@ -166,10 +166,10 @@ - (NSString *)image {
}
-- (DOUPeople *)owner {
+- (DOUUser *)owner {
NSDictionary *dic = [self.dictionary objectForKey:@"owner"];
- DOUPeople *people = [DOUPeople objectWithDictionary:dic];
- return people;
+ DOUUser *user = [DOUUser objectWithDictionary:dic];
+ return user;
}
@@ -1,5 +1,5 @@
//
-// DOUPeople.h
+// DOUUser.h
// DoubanApiClient
//
// Created by Lin GUO on 4/25/12.
@@ -8,12 +8,16 @@
#import "DOUObject.h"
-@interface DOUPeople : DOUObject
+@interface DOUUser : DOUObject
@property (nonatomic, copy) NSString *identifier;
@property (nonatomic, copy) NSString *avatar;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *alt;
@property (nonatomic, copy) NSString *uid;
+@property (nonatomic, copy) NSString *desc;
+
+@property (nonatomic, copy) NSString *locId;
+@property (nonatomic, copy) NSString *locName;
@end
@@ -1,20 +1,23 @@
//
-// DOUPeople.m
+// DOUUser.m
// DoubanApiClient
//
// Created by Lin GUO on 4/25/12.
// Copyright (c) 2012 Douban Inc. All rights reserved.
//
-#import "DOUPeople.h"
+#import "DOUUser.h"
-@implementation DOUPeople
+@implementation DOUUser
@dynamic identifier;
@dynamic avatar;
@dynamic alt;
@dynamic name;
@dynamic uid;
+@dynamic desc;
+@dynamic locId;
+@dynamic locName;
- (NSString *)identifier {
@@ -41,4 +44,20 @@ - (NSString *)uid {
return [self.dictionary objectForKey:@"uid"];
}
+
+- (NSString *)desc {
+ return [self.dictionary objectForKey:@"desc"];
+}
+
+
+- (NSString *)locId {
+ return [self.dictionary objectForKey:@"loc_id"];
+}
+
+
+- (NSString *)locName {
+ return [self.dictionary objectForKey:@"loc_name"];
+}
+
+
@end
@@ -12,7 +12,7 @@ @implementation DOUObject (Utils)
+ (NSDate *)dateOfString:(NSString *)dateString {
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
- [dateFormat setDateFormat:@"YYYY-MM-dd HH:mm:SS"];
+ [dateFormat setDateFormat:@"yyyy-MM-dd HH:mm:SS"];
NSDate *date = [dateFormat dateFromString:dateString];
[dateFormat release];
return date;
Oops, something went wrong.

0 comments on commit 3702c0c

Please sign in to comment.