Skip to content
This repository was archived by the owner on Dec 7, 2017. It is now read-only.

Cloudinary integration library for Appcelerator Titanium

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.txt
Notifications You must be signed in to change notification settings

cloudinary/cloudinary_titanium

Repository files navigation

Cloudinary

Cloudinary is a cloud-based service that offers a solution to a web application's entire image management pipeline.

Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website’s graphics requirements. Images are seamlessly delivered through a fast CDN, and much more.

Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.

Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.

For Appcelerator Titanium, Cloudinary provides a client-side JavaScript library for simplifying the integration with Titanium supported mobile platforms (Android, iOS, BlackBerry, Tizen) even further.

Setup

Usage

Cloudinary's general documentation can be found at: http://cloudinary.com/documentation

Loading the module:

var cloudinary = require('/lib/cloudinary');

Retrieving a cloudinary URL based on your on your configuration and the given options:

var url = cloudinary.url(public_id, options);

Uploading an image (requires a backend with Cloudinary framework):

var signed_request = retreive_signed_request_from_backend()
var file = Ti.Filesystem.getFile('my_file')
function callback(result) {
    if (result.error) {
        Ti.API.error("Error: " + result.error);
    } else {
        Ti.API.info("Uploaded file with public_id: " + result.public_id);
}
cloudinary.uploader.upload(file, callback, signed_request);

Uploading an image with api_secret (Not recommended - your API secret might be exposed to users)

var file = Ti.Filesystem.getFile('my_file')
function callback(result) {
    if (result.error) {
        Ti.API.error("Error: " + result.error);
    } else {
        Ti.API.info("Uploaded file with public_id: " + result.public_id);
}
cloudinary.uploader.upload(file, callback, {api_key: "my_api_key", api_secret: "my_api_secret");

Managing resources:

cloudinary.uploader.destroy(public_id, callback, options)
cloudinary.uploader.rename(from_public_id, to_public_id, callback, options)

Manipulating tags:

cloudinary.uploader.add_tag(tag, public_ids, callback, options)
cloudinary.uploader.remove_tag(tag, public_ids, callback, options)
cloudinary.uploader.replace_tag(tag, public_ids, callback, options)

Advanced features (please see documentation for usage specifications):

cloudinary.uploader.explicit(public_id, callback, options)  // Refresh a Facebook/Twitter image
cloudinary.uploader.text(text, callback, options)           // Generate a text image
cloudinary.uploader.generate_sprite(tag, callback, options) // Generate a sprite
cloudinary.uploader.multi(tag, callback, options)           // Create an animated GIF or a multi-page PDF document
cloudinary.uploader.explode(public_id, callback, options)   // Explode a PDF into multiple separate images

Additional resources

Additional resources are available at:

Support

You can open an issue through GitHub.

Contact us http://cloudinary.com/contact

Stay tuned for updates, tips and tutorials: Blog, Twitter, Facebook.

License

Released under the MIT license.

About

Cloudinary integration library for Appcelerator Titanium

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published