Giter Site home page Giter Site logo

js-sdk's Introduction

Baasbox Javascript SDK

Version 0.1

  • Login
  • Load document
  • Loadd JSON asset
  • Create new user

Version 0.2

  • Added cookie support
  • Added getImageURI()
  • Added end point validation

Version 0.3

  • Added callback to login and createUser
  • improved getImageURI

Version 0.3.5

  • Added support to save/update/delete and updateField

Version 0.3.6

  • Added support to Zepto and all permission

Version 0.8.1

  • Just a release number update to align this SDK with the other ones

Version 0.8.2

  • Added promises

Version 0.8.3

  • Added APIs to grant/revoke permissions

Version 0.8.4

  • Removed deprecated method for push notifications

js-sdk's People

Contributors

funkyboy avatar giastfader avatar iivanoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

js-sdk's Issues

logout

Hi,

is it ok in logout function to return the deferred reject?
see linenumber 165

return deferred.reject({"data" : "ok", "message" : "User already logged out"})

Add methods to manage Links

I'd like to propose the addition of a few methods for link management.
Probabily POST, GET, DELETE would be a good start

I cant display the image file retrieved through fetchfile() in HTML

I am trying to display image in html page.
I retrieved the binary data of the image but its not showing on the page.
heres my code,
BaasBox.fetchFile(item.FileID)
{
.done(function(resI)

                console.log("res ", resI);
                uri = 'data:' + resD.data.contentType + ';charset=utf-8;base64,' + resI;
                    $('#listimages').append('<p><img src="' + uri + '" alt=""></img></p>');
                    })

what could be the problem? base64 binary data could be wrong? because I compared the string with the same image's data when opened through browser and they are totally different.
can some one please show me the example?

Provide API to Call Plug-Ins

The current JS SDK does not allow to make calls to custom BaasBox Plug-Ins. We've extended the global BaasBox object with the following method (should be improved):

    callPlugin: function(httpMethod, pathWithPlugin, data) {
            var deferred = buildDeferred();
            var url = BaasBox.endPoint + '/plugin/'+pathWithPlugin;
            var req = $[httpMethod.toLowerCase()](url, data)
            .done(function (res) {
                deferred.resolve(res);
            })
            .fail(function (error) {
                deferred.reject(error)
            });
            return deferred.promise();
        },

... which allows calling any plugin via, e.g.:

    BaasBox.callPlugin('get','my.plugin/someMethod',{some:'parameter'}).done(function (result) {
        // ...
    }).fail(function (error) {
        // ...
    });

Typescript

It would be great to change the SDK to typescript?

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.