Friday 20 May 2016

CloudRail - Integrate Mulitple Services With Just One API

CloudRail - Integrate Mulitple Services With Just One API

CloudRail is a free software library which abstracts multiple APIs from different providers into a single and universal interface.
Full documentation can be found at https://docs.cloudrail.com/
With CloudRail, you can easily integrate external APIs into your application. CloudRail is an abstracted interface that takes several services and then gives a developer-friendly API that uses common functions between all providers. This means that, for example, upload() works in exactly the same way for Dropbox as it does for Google Drive, OneDrive, and other Cloud Storage Services.

Code Sample

// CloudStorage cs = new Box(context, "[clientIdentifier]", "[clientSecret]");
// CloudStorage cs = new OneDrive(context, "[clientIdentifier]", "[clientSecret]");
// CloudStorage cs = new GoogleDrive(context, "[clientIdentifier]", "[clientSecret]");
CloudStorage cs = new Dropbox(context, "[clientIdentifier]", "[clientSecret]");
new Thread() {
    @Override
    public void run() {
        cs.createFolder("/TestFolder"); // <---
        InputStream stream = null;
        try {
            AssetManager assetManager = getAssets();
            stream = assetManager.open("UserData.csv");
            long size = assetManager.openFd("UserData.csv").getLength();
            cs.upload("/TestFolder/Data.csv", stream, size); // <---
        } catch (Exception e) {
            // TODO: handle error
        } finally {
            // TODO: close stream
        }
    }
}.start();

Current Services

Cloud Storage:
  • Dropbox
  • Box
  • Google Drive
  • Microsoft OneDrive
More interfaces like social, payment or messaging are coming soon.

Advantages of Using CloudRail

  • Consistent Interfaces: As functions work the same across all services, you can perform tasks between services simply.
  • Easy Authentication: CloudRail includes easy ways to authentication, to remove one of the biggest hassles of coding for external APIs.
  • Switch services instantly: One line of code is needed to set up the service you are using. Changing which service is as simple as changing the name to the one you wish to use.
  • Simple Documentation: There is no searching around Stack Overflow for the answer. The CloudRail documentation athttps://docs.cloudrail.com/ is regularly updated, clean, and simple to use.
  • No Maintenance Times: The CloudRail Libraries are updated when a provider changes their API.

Maven

build.gradle
repositories {
    maven {
        url "http://maven.cloudrail.com"
    }
}

dependencies {
    compile 'com.cloudrail:cloudrail-si-android:2.0.1'
}

Get Updates

To keep updated with CloudRail, including any new providers that are added, just add your email address tohttps://cloudrail.com/updates/.

Pricing

CloudRail is free to use. For all projects; commercial and non-commercial. We want APIs to be accessible to all developers. We want APIs to be easier to manage. This is only possible if there are free, powerful tools out there to do this.

Questions?

support@cloudrail.com

No comments:

Post a Comment