Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
cloudrail-si
Advanced tools
The CloudRail SI SDK for Node.JS, a simple, universal, unified API for the most popular cloud services. Supports: AmazonS3, Box, Backblaze, Dropbox, Egnyte, Facebook, FacebookPage, Foursquare, GitHub, GoogleCloudPlatform, GoogleDrive, GooglePlaces, Google
Integrate Multiple Services With Just One API
CloudRail is an API integration solution which abstracts multiple APIs from different providers into a single and universal interface.
--- ---
Learn more about CloudRail at https://cloudrail.com
Full documentation can be found here
With CloudRail, you can easily integrate external APIs into your application. CloudRail provides abstracted interfaces that take several services and then exposes 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.
npm install cloudrail-si
Interface | Included Services |
---|---|
Cloud Storage | Dropbox, Google Drive, OneDrive, OneDrive Business, Box, Egnyte |
Business Cloud Storage | Amazon S3, Microsoft Azure, Google Cloud Services, Rackspace, Backblaze |
Social Profile | Facebook, GitHub, Google+, LinkedIn, Slack, Twitter, Windows Live, Yahoo, Instagram, Heroku |
Social Interaction | Facebook, Facebook Page, Twitter |
Payment | PayPal, Stripe |
Maljet, Sendgrid | |
SMS | Twilio, Nexmo |
Point of Interest | Google Places, Foursquare, Yelp |
Video | YouTube, Twitch, Vimeo |
Messaging | Facebook Messenger, Telegram, Line, Viber |
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let cs = new cloudrail.services.Box(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
// let cs = new cloudrail.services.OneDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
// let cs = new cloudrail.services.OneDriveBusiness(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
// let cs = new cloudrail.services.GoogleDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
let cs = new cloudrail.services.Dropbox(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
cs.createFolder("/TestFolder", (err) => { // <---
if (err) throw err;
let fileStream = fs.createReadStream("UserData.csv");
let size = fs.statSync("UserData.csv").size;
cs.upload("/TestFolder/Data.csv", fileStream, size, false, (err) => { // <---
if (err) throw err;
console.log("Upload successfully finished");
});
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let bcs = new cloudrail.services.AmazonS3(null, "[accessKeyId]", "[secretAccessKey]", "[region]");
// let bcs = new cloudrail.services.MicrosoftAzure(null, "[accountName]", "[accessKey]");
// let bcs = new cloudrail.services.GoogleCloudServices(null, "[clientEmail]", "[privateKey]", "[projectId]");
// let bcs = new cloudrail.services.Rackspace(null, "[userName]", "[apiKey]", "[region]");
let bcs = new cloudrail.services.Backblaze(null, "[accountId]", "[appKey]");
bcs.createBucket("myNewBucket", (err, bucket) => {
if (err) throw err;
let fileStream = fs.createReadStream("UserData.csv");
let size = fs.statSync("UserData.csv").size;
bcs.upload(bucket, "Data.csv", fileStream, size, (err) => { // <---
if (err) throw err;
console.log("Upload successfully finished");
});
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let profile = new cloudrail.services.GooglePlus(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
// let profile = new cloudrail.services.GitHub(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
// let profile = new cloudrail.services.Slack(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
// let profile = new cloudrail.services.Instagram(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
// ...
let profile = new cloudrail.services.Facebook(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
profile.getFullName((err, fullName) => {
if (err) throw err;
console.log("User's full name is " + fullName);
});
profile.getEmail((err, email) => {
if (err) throw err;
console.log("User's email address is " + email);
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let social = new cloudrail.services.Facebook(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
// let social = new cloudrail.services.FacebookPage(redirectReceiver, "[pageName]", "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]");
let social = new cloudrail.services.Twitter(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]");
social.postUpdate("Hello from CloudRail", (err) => {
if (err) throw err;
console.log("Update posted");
});
let fileStream = fs.createReadStream("video.mp4");
let size = fs.statSync("video.mp4").size;
social.postVideo("This is a test video", fileStream, size, "video/mp4", (err) => {
if (err) throw err;
console.log("Video posted");
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let payment = new cloudrail.services.Stripe(null, "[secretKey]");
let payment = new cloudrail.services.PayPal(null, true, "[clientIdentifier]", "[clientSecret]");
let source = new cloudrail.types.CreditCard(null, 6, 2021, "xxxxxxxxxxxxxxxx", "visa", "<FirstName>", "<LastName>", null);
payment.createCharge(500, "USD", source, (err, charge) => {
if (err) throw err;
console.log("Successfully charged " + charge.amount + " " + charge.currency);
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let email = new cloudrail.services.Mailjet(null, "[clientID]", "[clientSecret]");
let email = new cloudrail.services.Sendgrid(null, "[APIKey]");
email.sendEmail("info@cloudrail.com", "CloudRail", ["foo@bar.com", "bar@foo.com"], "Welcome", "Hello from CloudRail", null, null, null, (err) => {
if (err) throw err;
console.log("Email successfully sent");
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let sms = new cloudrail.services.Nexmo(null, "[clientIdentifier]", "[clientSecret]");
let sms = new cloudrail.services.Twilio(null, "[clientIdentifier]", "[clientSecret]");
sms.sendSMS("CloudRail", "+4912345678", "Hello from CloudRail", (err) => {
if (err) throw err;
console.log("SMS successfully sent");
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let poi = new cloudrail.services.Foursquare(null, "[clientID]", "[clientSecret]");
// let poi = new cloudrail.services.Yelp(null, "[consumerKey]", "[consumerSecret]", "[token]", "[tokenSecret]");
let poi = new cloudrail.services.GooglePlaces(null, "[apiKey]");
poi.getNearbyPOIs(49.4557091, 8.5279138, 1000, "restaurant", null, (err, pois) => {
if (err) throw err;
console.log("Amount of locations called 'restaurant' in a 1 km radius around the given coordinates: " + pois.length);
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let video = new cloudrail.services.Twitch(redirectReceiver, "[clientID]", "[clientSecret]");
// let video = new cloudrail.services.Vimeo(redirectReceiver, "[clientID]", "[clientSecret]");
let video = new cloudrail.services.YouTube(redirectReceiver, "[clientID]", "", "com.cloudrail.example:/auth", "state");
video.searchVideos("CloudRail", 0, 50, (err, videos) => {
if (err) throw err;
console.log("Videos: " + videos);
});
const cloudrail = require("cloudrail-si");
cloudrail.Settings.setKey("[CloudRail License Key]");
// let messaging = new cloudrail.services.Line(null, "[BotToken]");
// let messaging = new cloudrail.services.Telegram(null, "[BotToken]", "[WebhookUrl]");
// let messaging = new cloudrail.services.Viber(null, "[BotToken]", "[WebhookUrl]", "[BotName]");
let messaging = new cloudrail.services.FacebookMessenger(null, "[BotToken]");
messaging.sendMessage("92hf2f83f9", "Greetings from CloudRail!", (err, message) => {
if (err) throw err;
console.log("Message: " + message);
});
More interfaces are coming soon.
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 Wiki 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.
npm install cloudrail-si
(this only concerns Typescript users)
The package includes an index.d.ts file. To use the typings provided, include services and types like so:
/// <reference path="node_modules/cloudrail-si/index.d.ts" />
import {PointsOfInterest} from "cloudrail-si/interfaces/PointsOfInterest";
import {Foursquare} from "cloudrail-si/services/Foursquare";
import {POI} from "cloudrail-si/types/POI";
let poi:PointsOfInterest = new Foursquare(null, "[clientID]", "[clientSecret]");
poi.getNearbyPOIs(49.4557091, 8.5279138, 1000, "restaurant", null, (err:Error, pois:POI[]) => {
if (err) console.log(err);
console.log("Amount of locations called 'restaurant' in a 1 km radius around the given coordinates: " + pois.length);
});
Check out https://github.com/CloudRail/cloudrail-si-node-sdk/tree/master/examples for examples of how to e.g. implement a redirectReceiver and more complex use cases.
CloudRail provides a developer portal which offers usage insights for the SDKs and allows you to generate license keys.
It's free to sign up and generate a key.
Head over to https://developers.cloudrail.com
Learn more about our pricing on https://cloudrail.com/cloudrail-pricing/
CloudRail is also available for other platforms like Android, iOS and Java. You can find all libraries on https://cloudrail.com
Get in touch at any time by emailing us: support@cloudrail.com
or
Tag a question with cloudrail on StackOverflow
FAQs
The CloudRail SI SDK for Node.JS, a simple, universal, unified API for the most popular cloud services. Supports: AmazonS3, Box, Backblaze, Dropbox, Egnyte, Facebook, FacebookPage, Foursquare, GitHub, GoogleCloudPlatform, GoogleDrive, GooglePlaces, Google
We found that cloudrail-si demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.