Code Monkey home page Code Monkey logo

caiodangelo / cloudrail-si-java-sdk Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 612 KB

Unified API Library for: Cloud Storage, Social Profiles, Payment, Email, SMS & POIs. Included services are Dropbox, Google Drive, OneDrive, Box, Facebook, GitHub, Google+, LinkedIn, Slack, Twitter, Windows Live, Yahoo, PayPal, Stripe, Mailjet, Sendgrid, Twilio, Nexmo, Google Places, Foursquare, Yelp.

Home Page: https://cloudrail.com

License: Other

Java 100.00%

cloudrail-si-java-sdk's Introduction

# CloudRail SI for Java Integrate Multiple Services With Just One API

CloudRail is a free software library which abstracts multiple APIs from different providers into a single and universal interface.

Current Interfaces:

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, and getEmail() works similarly the same way across all social networks.

Current Interfaces:

Interface Included Services
Cloud Storage Dropbox, Google Drive, OneDrive, Box
Social Profiles Facebook, GitHub, Google+, LinkedIn, Slack, Twitter, Windows Live, Yahoo
Payment PayPal, Stripe
Email Maljet, Sendgrid
SMS Twilio, Nexmo
Point of Interest Google Places, Foursquare, Yelp

Cloud Storage Interface:

  • Dropbox
  • Box
  • Google Drive
  • Microsoft OneDrive

Features:

  • Download files from Cloud Storage.
  • Upload files to Cloud Storage.
  • Get Meta Data of files, folders and perform all standard operations (copy, move, etc) with them.
  • Retrieve user information.

Full Documentation

Code Sample

// CloudStorage cs = new Box(redirectReceiver, "[clientIdentifier]", "[clientSecret]");
// CloudStorage cs = new OneDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]");
// CloudStorage cs = new GoogleDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]");
CloudStorage cs = new Dropbox(redirectReceiver, "[clientIdentifier]", "[clientSecret]");
new Thread() {
    @Override
    public void run() {
        cs.createFolder("/TestFolder");
        InputStream stream = null;
        try {
            stream = getClass().getResourceAsStream("Data.csv");
            long size = new File(getClass().getResource("Data.csv").toURI()).length();
            cs.upload("/TestFolder/Data.csv", stream, size, false);
        } catch (Exception e) {
            // TODO: handle error
        } finally {
            // TODO: close stream
        }
    }
}.start();

Social Media Profiles Interface:

  • Facebook
  • Github
  • Google Plus
  • LinkedIn
  • Slack
  • Twitter
  • Windows Live
  • Yahoo

Features

  • Get profile information, including full names, emails, genders, date of birth, and locales.
  • Retrieve profile pictures.
  • Login using the Social Network.

Full Documentation

Code Sample

// final Profile profile = new GooglePlus(redirectReceiver, "[clientIdentifier]", "[clientSecret]");
// final Profile profile = new GitHub(redirectReceiver, "[clientIdentifier]", "[clientSecret]");
// final Profile profile = new Slack(redirectReceiver, "[clientIdentifier]", "[clientSecret]");
// ...
final Profile profile = new Facebook(redirectReceiver, "[clientIdentifier]", "[clientSecret]");
new Thread() {
    @Override
    public void run() {
        String fullName = profile.getFullName();
        String email = profile.getEmail();
        // ...
    }
}.start();

Payment Interface:

  • PayPal
  • Stripe

Features Interface

  • Perform charges
  • Refund previously made charges
  • Manage subscriptions

Full Documentation

Code Sample

// final Payment payment = new Stripe(null, "[secretKey]");
final Payment payment = new PayPal(null, true, "[clientIdentifier]", "[clientSecret]");
new Thread() {
    @Override
    public void run() {
        CreditCard source = new CreditCard(null, 6L, 2021L, "xxxxxxxxxxxxxxxx", "visa", "<FirstName>", "<LastName>", null);
        Charge charge = payment.createCharge(500L, "USD", source);
    }
}.start();

Email Interface:

  • Mailjet
  • Sendgrid

Features

  • Send Email

Full Documentation

Code Sample

// final Email email = new Mailjet(null, "[clientID]", "[clientSecret]");
final Email email = new Sendgrid(null, "[username]", "[password]");
new Thread() {
    @Override
    public void run() {
        email.sendEmail("[email protected]", "CloudRail", Arrays.asList("[email protected]", "[email protected]"), "Welcome", "Hello from CloudRail", null, null, null);
    }
}.start();

SMS Interface:

  • Twilio
  • Nexmo

Features

  • Send SMS

Full Documentation

Code Sample

// final SMS sms = new Nexmo(null, "[clientIdentifier]", "[clientSecret]");
final SMS sms = new Twilio(null, "[clientIdentifier]", "[clientSecret]");
new Thread() {
    @Override
    public void run() {
        sms.sendSMS("CloudRail", "+4912345678", "Hello from CloudRail");
    }
}.start();

Points of Interest Interface:

  • Google Places
  • Foursquare
  • Yelp

Features

  • Get a list of POIs nearby
  • Filter by categories or search term

Full Documentation

Code Example

// final PointsOfInteres poi = new Foursquare(null, "[clientID]", "[clientSecret]");
// final PointsOfInteres poi = new Yelp(null, "[consumerKey]", "[consumerSecret]", "[token]", "[tokenSecret]");
final PointsOfInteres poi = new GooglePlaces(null, "[apiKey]");
new Thread() {
    @Override
    public void run() {
        List<POI> res = poi.getNearbyPOIs(49.4557091, 8.5279138, 1000L, "restaurant", null);
        System.out.println("POIs: " + res.toString());    
    }
}.start();
```

---


More interfaces 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 authenticate, 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 at https://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.

* Direct Data: Everything happens directly in the Library. No data ever passes a CloudRail server.

## Maven
pom.xml
```
<repositories>
	<repository>
		<id>cloudrail-maven</id>
		<name>CloudRail Maven Repo.</name>
		<url>http://maven.cloudrail.com</url>
	</repository>
</repositories>

<dependencies>
	<dependency>
		<groupId>com.cloudrail</groupId>
		<artifactId>cloudrail-si-java</artifactId>
		<version>2.2.0</version>
	</dependency>
</dependencies>
```

## Get Updates

To keep updated with CloudRail, including any new providers that are added, just add your email address to https://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. The only favor we are asking for, is to spread the word about this library. Thank you!

## Other Platforms

CloudRail is also available for other platforms like iOS and Android. You can find all libraries on https://cloudrail.github.io

## Questions?

Get in touch at any time by emailing us: support@cloudrail.com

cloudrail-si-java-sdk's People

Contributors

felixkm avatar florianwendel avatar patrickstoklasa avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.