1.0.3 • Published 7 years ago

sugarcrm-js-rest-consumer v1.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

SugarCrm JS Rest Consumer

npm version build staus

Promise based javascript client for SugarCRM Rest API v.4.1 for browser and node.js

Features/Implemented methods

  • login
  • logout
  • seamless_login
  • get_user_id
  • get_server_info
  • get_available_modules
  • get_module_fields
  • get_entry_list
  • get_entries_count
  • get_entries
  • get_entry
  • set_entries
  • set_entry
  • raw post function to send any method and data to Rest API

Installing

Using npm:

$ npm install sugarcrm-js-rest-consumer

Examples

Login

var sugar = new SugarCrmJsRestConsumer(crm_host, "v4_1");
sugar.login("admin", "password")
    .then(function()
    {
        // You are logged in
    })
    .catch(function(error)
    {
        console.error(error);
    });

Create a new record in Contacts module

    sugar.setEntry("Contacts", false, {last_name: "Lee", first_name: "Bruce"})
        .then(function(response)
        {
            console.log("SAVED WITH ID: " + response["id"]);
        })
        .catch(function(err)
        {
            console.error(error);
        });

Other

...

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago