Permalink
Browse files

fixed build error in fetchProfileLocation, d'oh

  • Loading branch information...
1 parent b632a3c commit 8722785411feca174660f216fdbb8b062b4b17bd @zagraves zagraves committed Aug 21, 2009
Showing with 8 additions and 7 deletions.
  1. +8 −7 Source/YOSSocial/YQLQueryRequest.m
View
15 Source/YOSSocial/YQLQueryRequest.m
@@ -11,6 +11,7 @@
#import "YQLQueryRequest.h"
static NSString *const kYQLBaseUrl = @"http://query.yahooapis.com";
+static NSString *const kYQLOpenTables = @"http://datatables.org/alltables.env";
@implementation YQLQueryRequest
@@ -81,23 +82,23 @@ - (BOOL)updateQuery:(NSString *)aQuery
- (YOSRequestClient *)generateRequest:(NSString *)aQuery
{
+ if(!self.environmentFile) [self setEnvironmentFile:kYQLOpenTables];
+
// If a consumer is not available, we can assume public tables are being used
// and we'll use the public yql endpoint.
NSString *requestUrl = ([self consumerForRequest] != nil)
- ?[NSString stringWithFormat:@"%@/%@/%@",kYQLBaseUrl,self.apiVersion,@"yql"]
- :[NSString stringWithFormat:@"%@/%@/%@/%@",kYQLBaseUrl,self.apiVersion,@"public",@"yql"];
+ ? [NSString stringWithFormat:@"%@/%@/%@",kYQLBaseUrl,self.apiVersion,@"yql"]
+ : [NSString stringWithFormat:@"%@/%@/%@/%@",kYQLBaseUrl,self.apiVersion,@"public",@"yql"];
NSURL *url = [NSURL URLWithString:requestUrl];
- NSString *useDiagnostics = (self.diagnostics) ? @"true" : @"false";
-
NSMutableDictionary *requestParameters = [NSMutableDictionary dictionary];
[requestParameters setObject:aQuery forKey:@"q"];
[requestParameters setObject:self.format forKey:@"format"];
- [requestParameters setObject:useDiagnostics forKey:@"diagnostics"];
- if(self.environmentFile != nil)
- [requestParameters setObject:self.environmentFile forKey:@"env"];
+ NSString *useDiagnostics = (self.diagnostics) ? @"true" : @"false";
+ [requestParameters setObject:useDiagnostics forKey:@"diagnostics"];
+ [requestParameters setObject:self.environmentFile forKey:@"env"];
YOSRequestClient *client = [[YOSRequestClient alloc] initWithConsumer:[self consumerForRequest]
andToken:[self tokenForRequest]];

0 comments on commit 8722785

Please sign in to comment.