-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
41 lines (29 loc) · 1.53 KB
/
README
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
hAPI-objective-C: is a hAPI objective-c class for Xcode
that can be used to develop iOS and Mac OS X applications
that can directly communicate with hAPI.
Internap Network Services Corporation http://www.internap.com
See the hAPI docs at https://docs.internap.com/developers/ for details
of hAPI.
This package includes the following:
• hAPI class to authenticate hAPI and make hAPI calls
• An example Xcode project that builds an iPhone application
that allows a user to make hAPI calls by entering a hAPI
method and method parameters.
Instantiate the hAPIClient class in your setter or viewDidLoad method:
self.hAPIClient = [[hAPIClient alloc] initWithEndPoint:@"https://api.voxel.net/version/1.5/"];
The main class methods of interest are:
- (NSDictionary *)fetchAuthTokenAndSecret:(NSString *)username
password:(NSString *)password
Given a hAPI username and password, this method will return a
dictionary containing the hAPI Key and Secret needed to make
hAPI calls.
- (NSDictionary *)makehAPICall:(NSString *)method
params:(NSDictionary *)params
withKey:(NSString *)key
withSecret:(NSString *)secret
withFormat:(NSString *)format
Given a hAPI method (IE - voxel.test.echo) and a dictionary
of parameters (key value pairs), along with hAPI Key and Secret
acquired from the fetchAuthTokenAndSecret method call, this method
will return a dictionary object representation of the json output
from a hAPI call.