Skip to content
Browse files

added additional entity connection functionality

  • Loading branch information...
1 parent d1e9518 commit 70f515c38f3970cb154e45a83a824226c15e79ae @rodsimpson rodsimpson committed Jan 5, 2013
Showing with 15 additions and 0 deletions.
  1. +8 −0 UGAPI/UGClient.h
  2. +7 −0 UGAPI/UGClient.m
8 UGAPI/UGClient.h
@@ -175,6 +175,14 @@ set the response limit in UGQuery as well.
// connecteeID would be the UUID of Lyons Restaurant
-(UGClientResponse *)connectEntities: (NSString *)connectorType connectorID:(NSString *)connectorID type:(NSString *)connectionType connecteeID:(NSString *)connecteeID;
+// Directionally connect two entities. For instance, user "Bob" might follow user "Mary".
+// connectorType would be "users" (because Bob is a user)
+// connectorID would be Bob's userID
+// connectionType would be "like"
+// connecteeType would be "users" (because Mary is a user)
+// connecteeID would be Mary's userID
+-(UGClientResponse *)connectEntities: (NSString *)connectorType connectorID:(NSString *)connectorID connectionType:(NSString *)connectionType connecteeType:(NSString *)connecteeType connecteeID:(NSString *)connecteeID;
// disconnect two entities. It uses the same parameters and calling rules as connectEntities
-(UGClientResponse *)disconnectEntities: (NSString *)connectorType connectorID:(NSString *)connectorID type:(NSString *)connectionType connecteeID:(NSString *)connecteeID;
7 UGAPI/UGClient.m
@@ -1006,6 +1006,13 @@ -(UGClientResponse *)removeEntity: (NSString *)type entityID:(NSString *)entityI
return [self httpTransaction:url op:kUGHTTPDelete opData:nil];
+-(UGClientResponse *)connectEntities: (NSString *)connectorType connectorID:(NSString *)connectorID connectionType:(NSString *)connectionType connecteeType:(NSString *)connecteeType connecteeID:(NSString *)connecteeID
+ NSString *url = [self createURL:connectorType append2:connectorID append3:connectionType append4:connecteeType append5:connecteeID];
+ return [self httpTransaction:url op:kUGHTTPPost opData:nil];
-(UGClientResponse *)connectEntities: (NSString *)connectorType connectorID:(NSString *)connectorID type:(NSString *)connectionType connecteeID:(NSString *)connecteeID
NSString *url = [self createURL:connectorType append2:connectorID append3:connectionType append4:connecteeID];

0 comments on commit 70f515c

Please sign in to comment.
Something went wrong with that request. Please try again.