This package has been deprecated

Author message:

see deep-jquery-http.

deep-jquery-ajax

0.3.1 • Public • Published

deep-jquery-ajax provides jquery based ajax driver (store) for deepjs.

Provided protocoles (see deep protocoles) :

- html (html::)
- json (json::)
- xml (xml::)

Required

  • deepjs >= v0.9.4
  • jquery >= 1.5

Install

    git clone https://github.com/deepjs/deep-jquery-ajax
    cd deep-jquery-ajax
    npm install

Usage

 
    require("deep-jquery-ajax/json").createDefault();
 
    deep("json::/my/file.json") // relative to root server path  e.g. http://yourdomain.com/
    .log();
 
    //...
 
    deep.store.jqueryajax.JSON.create("myprotocole","/myRESTservice/");
 
    deep.store("myprotocole")
    .post({ hello:"stored json", id:"33"})
    .log();
 
    deep("myprotocole::33")
    .log();
 
    // put is replacing the entire object
    deep.store("myprotocole")
    .put({ hello:"world" }, { id:"33" })
    .log();
 
    // patch update only the fields that are sended
    deep.store("myprotocole")
    .patch({ name:"George" }, { id:"33" })
    .log();
 
    // call rpc method named "methodName" on ressource with id = "id22234545"
    // with the object { arg1:"myValue" } passed as argument
    deep.store("myprotocole")
    .rpc("methodName", { arg1:"myValue" }, "id22234545")
    .log();
 
    // bulk call allows multiple operations with one call
    deep.store("myprotocole")
    .bulk([
        {to:"id1381690769563", method:"patch", body:{name:"updated 2"}},
        {to:"id1381690769563", method:"get"}
    ])
    .log();
    
    //...
 
 

Readme

Keywords

none

Package Sidebar

Install

npm i deep-jquery-ajax

Weekly Downloads

1

Version

0.3.1

License

none

Last publish

Collaborators

  • nomocas