Bump External dependencies.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
NSMutableDictionary *requestIDMap_;
|
||||
BOOL skipAuthorization_;
|
||||
NSDictionary *additionalHTTPHeaders_;
|
||||
NSDictionary *urlQueryParameters_;
|
||||
}
|
||||
|
||||
// Queries included in this batch. Each query should have a unique requestID.
|
||||
@@ -42,6 +43,10 @@
|
||||
// additionalHTTPHeaders.
|
||||
@property (copy) NSDictionary *additionalHTTPHeaders;
|
||||
|
||||
// Any URL query parameters to add to the query (useful for debugging with some
|
||||
// services).
|
||||
@property (copy) NSDictionary *urlQueryParameters;
|
||||
|
||||
+ (id)batchQuery;
|
||||
+ (id)batchQueryWithQueries:(NSArray *)array;
|
||||
|
||||
|
@@ -22,7 +22,8 @@
|
||||
@implementation GTLBatchQuery
|
||||
|
||||
@synthesize shouldSkipAuthorization = skipAuthorization_,
|
||||
additionalHTTPHeaders = additionalHTTPHeaders_;
|
||||
additionalHTTPHeaders = additionalHTTPHeaders_,
|
||||
urlQueryParameters = urlQueryParameters_;
|
||||
|
||||
+ (id)batchQuery {
|
||||
GTLBatchQuery *obj = [[[self alloc] init] autorelease];
|
||||
@@ -49,6 +50,7 @@
|
||||
- (void)dealloc {
|
||||
[queries_ release];
|
||||
[additionalHTTPHeaders_ release];
|
||||
[urlQueryParameters_ release];
|
||||
[requestIDMap_ release];
|
||||
|
||||
[super dealloc];
|
||||
|
@@ -28,6 +28,7 @@
|
||||
- (BOOL)shouldSkipAuthorization;
|
||||
- (void)executionDidStop;
|
||||
- (NSDictionary *)additionalHTTPHeaders;
|
||||
- (NSDictionary *)urlQueryParameters;
|
||||
- (GTLUploadParameters *)uploadParameters;
|
||||
@end
|
||||
|
||||
@@ -78,7 +79,7 @@
|
||||
// or data must be provided.
|
||||
@property (copy) GTLUploadParameters *uploadParameters;
|
||||
|
||||
// Any url query parameters to add to the query (useful for debugging with some
|
||||
// Any URL query parameters to add to the query (useful for debugging with some
|
||||
// services).
|
||||
@property (copy) NSDictionary *urlQueryParameters;
|
||||
|
||||
|
@@ -755,7 +755,7 @@ static NSString *ETagIfPresent(GTLObject *obj) {
|
||||
|
||||
// Build up the array of RPC calls.
|
||||
NSMutableArray *rpcPayloads = [NSMutableArray arrayWithCapacity:numberOfQueries];
|
||||
NSMutableSet *requestIDs = [NSMutableSet setWithCapacity:numberOfQueries];
|
||||
NSMutableArray *requestIDs = [NSMutableSet setWithCapacity:numberOfQueries];
|
||||
for (GTLQuery *query in queries) {
|
||||
NSString *methodName = query.methodName;
|
||||
NSDictionary *parameters = query.JSON;
|
||||
@@ -772,6 +772,10 @@ static NSString *ETagIfPresent(GTLObject *obj) {
|
||||
@"additionalHTTPHeaders disallowed on queries added to a batch - query %@ (%@)",
|
||||
requestID, methodName);
|
||||
|
||||
GTL_DEBUG_ASSERT(query.urlQueryParameters == nil,
|
||||
@"urlQueryParameters disallowed on queries added to a batch - query %@ (%@)",
|
||||
requestID, methodName);
|
||||
|
||||
GTL_DEBUG_ASSERT(query.uploadParameters == nil,
|
||||
@"uploadParameters disallowed on queries added to a batch - query %@ (%@)",
|
||||
requestID, methodName);
|
||||
@@ -802,10 +806,16 @@ static NSString *ETagIfPresent(GTLObject *obj) {
|
||||
|
||||
BOOL mayAuthorize = (batchCopy ? !batchCopy.shouldSkipAuthorization : YES);
|
||||
|
||||
// urlQueryParameters on the queries are currently unsupport during a batch
|
||||
// as it's not clear how to map them.
|
||||
|
||||
NSURL *rpcURL = self.rpcURL;
|
||||
|
||||
// We'll use the batch query's URL parameters, and ignore the URL parameters
|
||||
// specified on the individual queries.
|
||||
NSDictionary *urlQueryParameters = batch.urlQueryParameters;
|
||||
if ([urlQueryParameters count] > 0) {
|
||||
rpcURL = [GTLUtilities URLWithString:[rpcURL absoluteString]
|
||||
queryParameters:urlQueryParameters];
|
||||
}
|
||||
|
||||
GTLServiceTicket *resultTicket = [self fetchObjectWithURL:rpcURL
|
||||
objectClass:[GTLBatchResult class]
|
||||
bodyObject:nil
|
||||
|
Reference in New Issue
Block a user