Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion MWManager/MWWeatherMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#import <Foundation/Foundation.h>


#define kKAWeatherBaseURL @"http://www.google.com/ig/api\?weather="
#define kKAWeatherBaseURL @"https://www.google.com/ig/api?weather="
#define kKAWeatherEndURL @"&hl=en&referrer=googlecalendar"

@interface MWWeatherMonitor : NSObject<NSXMLParserDelegate>

Expand Down
2 changes: 1 addition & 1 deletion MWManager/MWWeatherMonitor.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ - (id)init


-(NSDictionary*)currentWeather {
NSURL *url =[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kKAWeatherBaseURL,self.city]];
NSURL *url =[NSURL URLWithString:[NSString stringWithFormat:@"%@%@%@",kKAWeatherBaseURL,self.city,kKAWeatherEndURL]];
NSData *d = [NSData dataWithContentsOfURL:url];
NSString *dataString = [[NSString alloc]initWithData:d encoding:NSISOLatin1StringEncoding];
NSData *data = [dataString dataUsingEncoding:NSUTF8StringEncoding];
Expand Down