Neverending Plethora of Modules
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    hapi.app.avatarspublic

    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:
           [
               {
                   ...
               }
           ]
       }
    }

    Keywords

    none

    install

    npm i hapi.app.avatars

    Downloadslast 7 days

    1

    version

    0.0.4

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar