blob: 3f1ab6ac8737651e10ffe5b770e02c6c08383041 (
plain)
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
|
#import "KeychainHelper.h"
#import "Constants.h"
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Enum of valid Things URL routes.
*/
typedef NSString* ThingsURLRoute NS_STRING_ENUM;
extern ThingsURLRoute const ThingsURLRouteSearch;
extern ThingsURLRoute const ThingsURLRouteShow;
extern ThingsURLRoute const ThingsURLRouteUpdate;
extern ThingsURLRoute const ThingsURLRouteUpdateProject;
extern ThingsURLRoute const ThingsURLRouteAdd;
extern ThingsURLRoute const ThingsURLRouteAddProject;
/**
Helper class to communicate with things using the URL API
*/
@interface ThingsHelper : NSObject
/**
Calls a Things URL route with the specified parameters
@param route the Things URL route to call. Use ThingsURLRoute enum.
@param parameters NSDictionary of query parameters to include in the URL. Can be nil or empty.
@returns YES if the URL was successfully opened, NO if something went wrong.
*/
+ (BOOL)callRoute:(ThingsURLRoute)route withParameters:(NSDictionary *)parameters;
@end
NS_ASSUME_NONNULL_END
|