Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

heyvito/DropletKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Objective-C DigitalOcean API Client

Resources

License

Stars

Watchers

Forks

Packages

No packages published