Permalink
Browse files

Updates

  • Loading branch information...
1 parent f0bbd82 commit b58d3f5ba0a69be75fba7eb75a71dfae2e675af4 Khurram Ali committed Jun 22, 2012
@@ -35,5 +35,6 @@
@property (nonatomic, strong) NSString *connection;
- (id)initWithConnector:(FbObject *)fbObject objectClass:(Class)objectClass connection:(NSString *)connectionString;
+- (void)load: (NSMutableDictionary *) parametersNSString;
@end
@@ -43,10 +43,24 @@ - (id)initWithConnector:(FbObject *)fbObject objectClass:(Class)objectClass conn
/**
* All FB objects are loaded the same way, with their id.
*/
--(void)load{
+-(void)load {
if ( connector != nil ) {
- //url = [NSString stringWithFormat:@"%@/%@/%@", FB_URL, connector.xmlid, connection];
- url = [NSString stringWithFormat:@"%@/%@/%@", FB_URL, @"me", connection];
+ url = [NSString stringWithFormat:@"%@/%@/%@", FB_URL, connector.xmlid, connection];
+ [super load];
+ }
+}
+
+/**
+ * All FB objects are loaded the same way, with their id.
+ */
+-(void)load: (NSMutableDictionary *) parametersNSString{
+
+ if(parametersNSString != nil){
+ [parameters setDictionary:parametersNSString];
+ }
+
+ if ( connector != nil ) {
+ url = [NSString stringWithFormat:@"%@/%@/%@", FB_URL, connector.xmlid, connection];
[super load];
}
}
@@ -19,43 +19,89 @@
@class FbConnection;
#define FB_CONNECTION_PHOTOS @"photos"
+#define FB_CONNECTION_VIDEOS @"videos"
#define FB_CONNECTION_LIKES @"likes"
#define FB_CONNECTION_COMMENTS @"comments"
#define FB_CONNECTION_LINKS @"links"
#define FB_CONNECTION_ACCOUNTS @"accounts"
#define FB_CONNECTION_ACHIEVEMENTS @"achievements"
#define FB_CONNECTION_SCORES @"scores"
#define FB_CONNECTION_POSTS @"posts"
+#define FB_CONNECTION_STATUSES @"statuses"
+#define FB_CONNECTION_ALBUMS @"albums"
+#define FB_CONNECTION_BOOKS @"books"
+#define FB_CONNECTION_GAMES @"games"
+#define FB_CONNECTION_EVENTS @"events"
+#define FB_CONNECTION_FEEDS @"feed"
+#define FB_CONNECTION_HOME @"home"
+#define FB_CONNECTION_FRIENDLISTS @"friendlists"
+#define FB_CONNECTION_FRIENDS @"friends"
+#define FB_CONNECTION_NOTIFICATIONS @"notifications"
+#define FB_CONNECTION_NOTES @"notes"
+#define FB_CONNECTION_PICTURE @"picture"
+#define FB_CONNECTION_QUESTIONS @"questions"
+#define FB_CONNECTION_GROUPS @"groups"
@interface FbObject : FbParentModel {
NSString *xmlid;
// Connections to the object.
FbConnection *photos;
+ FbConnection *videos;
FbConnection *likes;
FbConnection *comments;
FbConnection *links;
FbConnection *accounts;
FbConnection *achievements;
FbConnection *scores;
FbConnection *posts;
+ FbConnection *statuses;
+ FbConnection *albums;
+ FbConnection *books;
+ FbConnection *feeds;
+ FbConnection *events;
+ FbConnection *home;
+ FbConnection *friendlists;
+ FbConnection *friends;
+ FbConnection *notifications;
+ FbConnection *notes;
+ FbConnection *pictures;
+ FbConnection *questions;
+ FbConnection *groups;
+ FbConnection *games;
}
@property (nonatomic, strong) NSString *xmlid;
@property (nonatomic, strong) FbConnection *photos;
+@property (nonatomic, strong) FbConnection *videos;
@property (nonatomic, strong) FbConnection *likes;
@property (nonatomic, strong) FbConnection *comments;
@property (nonatomic, strong) FbConnection *links;
@property (nonatomic, strong) FbConnection *accounts;
@property (nonatomic, strong) FbConnection *achievements;
@property (nonatomic, strong) FbConnection *scores;
@property (nonatomic, strong) FbConnection *posts;
+@property (nonatomic, strong) FbConnection *statuses;
+@property (nonatomic, strong) FbConnection *albums;
+@property (nonatomic, strong) FbConnection *books;
+@property (nonatomic, strong) FbConnection *events;
+@property (nonatomic, strong) FbConnection *feeds;
+@property (nonatomic, strong) FbConnection *home;
+@property (nonatomic, strong) FbConnection *friendlists;
+@property (nonatomic, strong) FbConnection *friends;
+@property (nonatomic, strong) FbConnection *notifications;
+@property (nonatomic, strong) FbConnection *notes;
+@property (nonatomic, strong) FbConnection *pictures;
+@property (nonatomic, strong) FbConnection *questions;
+@property (nonatomic, strong) FbConnection *groups;
+@property (nonatomic, strong) FbConnection *games;
// User to be loaded.
- (id)initWithId:(NSString *)objectId;
- (void)postToUrl:(NSString *)urlStr;
- (void)postToUrlWithNoData:(NSString *)urlStr;
- (void)newConnection:(FbObject *)obj;
+- (void)editConnection:(FbObject *)obj;
- (FbConnection *)setupConnection:(NSString *)connection;
@end
Oops, something went wrong.

0 comments on commit b58d3f5

Please sign in to comment.