Objective-C DigitalOcean API Client
Objective-C C Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
DKSpecs
DropletKit.xcodeproj
DropletKit
script
.gitignore
Cartfile
Cartfile.resolved
LICENSE
README.md

README.md

Logo

Platform Language Carthage compatible Version License

DropletKit is a Objective-C wrapper for the DigitalOcean API. More documentation can be found here.

Usage

First, you will need an access token. You can generate one by yourself through the Control Panel, or by requesting access through the OAuth endpoints.

DropletKit is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call [DKClient method]). So, after getting an access token, you must provide it to the library:

[DKClient setAuthenticationToken:@"ACCESSTOKEN"];

Now you are ready to perform requests to DigitalOcean's Endpoints:

[[DKClient sharedInstance] getAccountInfo].then(^(DKUser *user) {
    NSLog(@"Authenticated user email: %@, UUID: %@", user.email, user.uuid);
})
.catch(^(NSError *error){
    NSLog(@"Error getting account data: %@", error)
});

TODO

  • Implement Floating IP support.

License

The MIT License (MIT)

Copyright (c) 2015 Victor Gama de Oliveira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.