-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDarkCloud.h
49 lines (31 loc) · 1.19 KB
/
DarkCloud.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// DarkCloud.h
// DarkCloud
//
// Created by Mark Peterson on 5/26/12.
// Copyright (c) 2012 Mark Peterson. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol DarkCloudDelegate <NSObject>
-(void)briefForecastReceived:(NSDictionary*)dictionary;
-(void)fullForecastReceived:(NSDictionary*)dictionary;
-(void)forecastCollectionReceived:(NSDictionary*)collection;
-(void)interestingStormsReceived:(NSDictionary*)storms;
-(void)errorOccured:(NSError*)error;
@end
@interface DarkCloud : NSObject {
id<DarkCloudDelegate>delegate;
}
//Initialize with DarkSky API Key: Found here; https://developer.darkskyapp.com/
-(id)initWithAPIKey:(NSString*)api_key;
//Helper Class method to create timestamp.
+ (NSTimeInterval)getGMTFormatDate:(NSDate*)date;
//Makes hourly forecast request, with option for brief or full.
-(void)getHourlyForcastForLatitude:(double)lat
longitude:(double)lon brief:(BOOL)yesNo;
//Takes an Array of NSDictionaries with lat,lon,time key's.
-(void)getForecastCollection:(NSArray*)collection;
//Makes request to retrieve interesting storms.
-(void)getInterestingStorms;
@property(nonatomic,assign)id<DarkCloudDelegate>delegate;
@end