Git Product home page Git Product logo

imboclient-js's Introduction

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 [email protected]

Licensed under the MIT License

imboclient-js's People

Contributors

rexxars avatar kbrabrand avatar andreasrs avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.