venues now have correct information on them

This commit is contained in:
Senad Uka
2014-09-05 07:27:19 +02:00
parent 0e1b3048ce
commit 7bea7f47fc
15 changed files with 475 additions and 64 deletions

View File

@@ -0,0 +1,27 @@
//
// FESDataProvider.m
// FestivalHelper
//
// Created by Hamo Hapic on 04/09/14.
// Copyright (c) 2014 Senad Uka. All rights reserved.
//
#import "FESDataProvider.h"
@implementation FESDataProvider
+(void)getDataFromServerForUrl:(NSString *)urlString andProcessThemWith:(void (^)(NSData *data))block {
NSLog(@"Getting data from: %@" , urlString);
NSURL *url = [[NSURL alloc] initWithString:urlString];
[NSURLConnection sendAsynchronousRequest:[[NSURLRequest alloc] initWithURL:url] queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
if(connectionError) {
NSLog(@"Error getting %@ data from url: - %@", urlString, [connectionError localizedDescription]);
}
else {
NSLog(@"Parsing data.");
block(data);
}
}];
}
@end