Permalink
Browse files

added fetchProfileLocation method to get full location data for a use…

…rs location field
  • Loading branch information...
zagraves committed Aug 20, 2009
1 parent cf70640 commit b632a3c6497ef309eeef20ca626af89bf358b906
Showing with 17 additions and 0 deletions.
  1. +6 −0 Source/YOSSocial/YOSUserRequest.h
  2. +11 −0 Source/YOSSocial/YOSUserRequest.m
@@ -43,6 +43,12 @@
*/
- (void)fetchProfileWithDelegate:(id)delegate;
+/**
+ * Fetches the user's location data.
+ * @param delegate
+ */
+- (void)fetchProfileLocationWithDelegate:(id)delegate;
+
/**
* Fetches the profiles of the user's connections using an asynchronous request.
* @param start An integer specifying the index of the first connection returned.
@@ -103,6 +103,17 @@ - (void)fetchProfileWithDelegate:(id)delegate
[requestParameters release];
}
+- (void)fetchProfileLocationWithDelegate:(id)delegate
+{
+ YQLQueryRequest *yqlRequest = [[YQLQueryRequest alloc] initWithYOSUser:[self user]];
+
+ NSString *queryJoin = [NSString stringWithFormat:@"select location from social.profile where guid=\"%@\"", start, count, user.guid];
+ NSString *yqlQuery = [NSString stringWithFormat:@"select * from geo.places where text in (%@)", queryJoin];
+
+ [yqlRequest query:yqlQuery withDelegate:delegate];
+ [yqlRequest release];
+}
+
- (void)fetchConnectionProfilesWithStart:(NSInteger)start andCount:(NSInteger)count withDelegate:(id)delegate
{
YQLQueryRequest *yqlRequest = [[YQLQueryRequest alloc] initWithYOSUser:[self user]];

0 comments on commit b632a3c

Please sign in to comment.