Permalink
Browse files

Adding a few comments to the ObjectiveResource interface

  • Loading branch information...
1 parent 03f8180 commit 8bbaf127a77f9793da0ec216325dbe27cec41110 @ciaran ciaran committed Nov 6, 2008
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/Base.h
View
@@ -18,14 +18,22 @@ enum ORAttributeType
+ (NSString*)baseURL; // NO trailing slash!
+ (NSString*)user;
+ (NSString*)password;
+
+// The singular name for the resource in lowercase. Defaults to the class name.
+ (NSString*)elementName;
+
+// The plural name for the resource. Defaults to the plural form of +elementName
+ (NSString*)collectionName;
+ (id)find:(int)recordId;
+ (id)findAll:(id)options;
+- (void)reload;
+
+// The title for the record.
+// Checks for a 'title' attribute first, and then tries a 'name' attribute.
- (NSString*)title;
-- (ORAttributeType)typeForAttribute:(NSString*)attributeName;
-- (void)reload;
+// Subclass to override the type for attributes.
+- (ORAttributeType)typeForAttribute:(NSString*)attributeName;
@end

0 comments on commit 8bbaf12

Please sign in to comment.