3.2.0 • Published 8 years ago

imboclient v3.2.0

Weekly downloads
186
License
MIT
Repository
github
Last release
8 years ago

npm versionBuild StatusCoverage StatusDependency status

Javascript client for Imbo

A Javascript (node/browser) client for Imbo.

Installation

imboclient-js can be installed using npm or bower:

# NPM:
npm install imboclient

# Bower:
bower install imboclient

Version note

Imbo 2.0 and up prefers imboclient-js >= 3.0.0

Imbo 1.0 and up requires imboclient-js >= 2.1.0

Imbo 0.3.3 and below requires imboclient-js <= 2.0.2

Basic usage

var Imbo = require('imboclient');
var client = new Imbo.Client({
    hosts: 'http://<hostname>',
    user: '<someUser>',
    publicKey: '<publicKey>',
    privateKey: '<privateKey>'
});

client.addImage('/path/to/image.jpg', function(err, imageIdentifier) {
    if (err) {
        return console.error('Oh no, an error occured: ' + err);
    }

    console.log('Image added! Image identifier: ' + imageIdentifier);

    // Grab a transformed URL
    var url = client.getImageUrl(imageIdentifier)
        .maxSize({ 'width': 320 })
        .sepia()
        .border({ 'color': 'BF1942', 'width': 4 });

    console.log('URL to transformed image: ' + url.toString());

    // Edit the metadata of the image
    client.editMetadata(imageIdentifier, {
        'title': 'Cat in the sun',
        'description': 'A cat relaxing in Santorini, Greece'
    });
});

See the documentation for more details on how to use the client.

Documentation

Documentation is available at http://imboclient-js.readthedocs.org/.

More examples

Check out the examples folder for a few intros on how to use the client.

License

Copyright (c) 2011-2015, Espen Hovlandsdal espen@hovlandsdal.com

Licensed under the MIT License

3.2.0

8 years ago

3.1.2

8 years ago

3.1.1

9 years ago

3.1.0

9 years ago

3.0.0

9 years ago

2.3.4

9 years ago

2.3.3

9 years ago

2.3.2

10 years ago

2.2.1

10 years ago

2.2.0

10 years ago

2.1.2

10 years ago

2.1.0

10 years ago

2.0.2

10 years ago

2.0.1

11 years ago

2.0.0

11 years ago