hapi.app.avatars

0.0.4 • Public • Published

hapi.app.avatars

This is a small library built on top of HAPILib, intended to be used as part of HAPI.App.

The functionality is very limited at present. It allows you to very easily access all assets available to a user, organised in a data structure intended to enable easy app development.

The library uses jQuery Deferred to handle asynchronous tasks, all of which return a promise.

To get assets available to a user:

var hav = new HapiAvatars;
hav.user.assets({ representation: "standard" })
    .then(function(assets) { doSomethingWithAssets(assets); });

The data structure returned is of the form:

{
   pack_name:
   {
       category_name:
       [
           {
               Id: "1",
               Label: "asset_label",
               Title: "Asset Title",
               Metadata: {},
               DateCreated: "2013-01-14T17:11:11.777",
               GoodId: "1",
               CategoryId: "1",
               Thumbnail: "http://thumbnail.com/thumbnail",
               Layers: [...]
           },
           {
               Id: "2",
               Label: "asset_label",
               Title: "Asset Title",
               Metadata: {},
               DateCreated: "2013-01-14T17:11:11.777",
               GoodId: "1",
               CategoryId: "1",
               Thumbnail: "http://thumbnail.com/thumbnail",
               Layers: [...]
           }, ...
       ],
       category_name:
       [
           {
               ...
           }
       ]
   }
}

/hapi.app.avatars/

    Package Sidebar

    Install

    npm i hapi.app.avatars

    Weekly Downloads

    3

    Version

    0.0.4

    License

    none

    Last publish

    Collaborators

    • huzutechtools