forked from adba/OpenWeatherMapAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOWMWeatherAPI.h
70 lines (48 loc) · 2.29 KB
/
OWMWeatherAPI.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//
// OWMWeatherAPI.h
// OpenWeatherMapAPI
//
// Created by Adrian Bak on 20/6/13.
// Copyright (c) 2013 Adrian Bak. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
typedef enum {
kOWMTempKelvin,
kOWMTempCelcius,
kOWMTempFahrenheit
} OWMTemperature;
@interface OWMWeatherAPI : NSObject
- (instancetype) initWithAPIKey:(NSString *) apiKey;
- (void) setApiVersion:(NSString *) version;
- (NSString *) apiVersion;
- (void) setTemperatureFormat:(OWMTemperature) tempFormat;
- (OWMTemperature) temperatureFormat;
- (void) setLangWithPreferedLanguage;
- (void) setLang:(NSString *) lang;
- (NSString *) lang;
#pragma mark - current weather
-(void) currentWeatherByCityName:(NSString *) name
withCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
-(void) currentWeatherByCoordinate:(CLLocationCoordinate2D) coordinate
withCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
-(void) currentWeatherByCityId:(NSString *) cityId
withCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
#pragma mark - forecast
-(void) forecastWeatherByCityName:(NSString *) name
withCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
-(void) forecastWeatherByCoordinate:(CLLocationCoordinate2D) coordinate
withCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
-(void) forecastWeatherByCityId:(NSString *) cityId
withCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
#pragma mark forcast - n days
-(void) dailyForecastWeatherByCityName:(NSString *) name
withCount:(int) count
andCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
-(void) dailyForecastWeatherByCoordinate:(CLLocationCoordinate2D) coordinate
withCount:(int) count
andCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
-(void) dailyForecastWeatherByCityId:(NSString *) cityId
withCount:(int) count
andCallback:( void (^)( NSError* error, NSDictionary *result ) )callback;
@end