Youtube analytics sample request iOS

So I've sent a request to the youtube data api and it works like a charm, absolutely no problem there. I copied and pasted the same text and then modified to what I believe to be a satisfactory analytics request, but when I NSLog the result of this request, nothing is logged. Does anyone know what is going on here? I thought it meant the request was unsuccessful. Here is my code:

NSMutableURLRequest *analyticsRequest = [[NSMutableURLRequest alloc]initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"", [userIDs objectAtIndex:k - 1], [array objectAtIndex:[array indexOfObject:@"videoId"] + 1]]]];
[GETRequest setHTTPMethod:@"GET"];
[GETRequest setValue:@"" forHTTPHeaderField:@"Host"];
[GETRequest setValue:[NSString stringWithFormat:@"Bearer %@", [self.defaults objectForKey:[NSString stringWithFormat:@"access_token %i", k]]] forHTTPHeaderField:@"Authorization"];
NSURLConnection *newConnection = [NSURLConnection sendSynchronousRequest:analyticsRequest returningResponse:&response error:&error];
NSString *analyticsResponseString = [[NSString alloc]initWithData:newConnection encoding:NSUTF8StringEncoding];
NSLog(@"%@", analyticsResponseString);

If anyone could point me in the direction of a working analytics request example I would be very grateful as I can't seem to put together one from the api google docs.

Thanks in advance


The sendSynchronousRequest:returningResponse:error: returns NSData, not NSURLConnection as it is in your code. Change it to:

NSData *data = [NSURLConnection sendSynchronousRequest:analyticsRequest

NSString *analyticsResponseString = [[NSString alloc]initWithData:data 
NSLog(@"%@", analyticsResponseString);

Need Your Help

Type hinting in pydev for several parameters

python python-2.7 pydev type-hinting

So I am in need of some type hinting in pydev and have found this :