Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added info on synchronous yql queries

  • Loading branch information...
commit cf70640d7010e3875f7c347bff10a9aef8060d62 1 parent 3f9b232
Zach Graves zachgraves authored
Showing with 20 additions and 4 deletions.
  1. +20 −4 README.markdown
24 README.markdown
View
@@ -72,6 +72,7 @@ Then, include the YOSSocial.h header into your code.
#import "YOSSocial.h"
+
Creating A New Application
========
@@ -81,6 +82,7 @@ Sign up for a new application ID to get your OAuth consumer key & secret.
* YDN Developer Dashboard - [https://developer.yahoo.com/dashboard/](https://developer.yahoo.com/dashboard/)
* New Application Form - [https://developer.yahoo.com/dashboard/createKey.html](https://developer.yahoo.com/dashboard/)
+
Examples
========
@@ -115,7 +117,6 @@ will automatically fetch a new access token to renew the session.
[self sendRequests];
}
-
## Fetching Social Data:
Now that we have a ready session, we can now access social information for
@@ -185,9 +186,24 @@ Updates:
## Using YQL
+Synchronous :
+
+ YQLQueryRequest *request = [YQLQueryRequest requestWithSession:self.session];
+
+ NSString *structuredLocationQuery = [NSString
+ stringWithFormat:@"select * from geo.places where text=\"sfo\""];
+
+ YOSResponseData *data = [request query:structuredLocationQuery];
+ NSDictionary *rspData = [data.responseText JSONValue];
+ NSDictionary *queryData = [rspData objectForKey:@"query"];
+ NSDictionary *results = [queryData objectForKey:@"results"];
+
+ NSLog(@"%@", [results description]);
+
+Asynchronous:
+
- (void)sendRequests {
- YQLQueryRequest *request = [YQLQueryRequest
- requestWithSession:self.session];
+ YQLQueryRequest *request = [YQLQueryRequest requestWithSession:self.session];
NSString *structuredLocationQuery = [NSString
stringWithFormat:@"select * from geo.places where text=\"sfo\""];
@@ -202,7 +218,7 @@ Updates:
NSLog(@"%@", [results description]);
}
-
+
## Terms of Use
Use of the Yahoo! Social APIs is governed by the [Yahoo! APIs Terms of Use](http://developer.yahoo.com/terms/).
Please sign in to comment.
Something went wrong with that request. Please try again.