1.3.1 • Published 7 years ago

amocrm-api v1.3.1

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

AmoCRM API client for nodejs

Simplified API client for AmoCRM.

Installation

npm install amocrm-api

Usage

var AmoCRM = require('amocrm-api');
var amo = new AmoCRM('https://your-domain.amocrm.ru');

amo.auth({
	USER_LOGIN: 'your-email@example.com',
	USER_HASH: 'd10532200r202eefwa9c7eab290237a6'
}).then(function createSomeTasks () {
	return amo.createTask({
		task_type: 1,
		text: 'Task text',
		responsible_user_id: 123,
		complete_till: new Date().getTime()
	});
});

Available methods

auth

auth method should be used to initiate user session. You need to auth before doing any other request.

amo.auth({
	USER_LOGIN: 'your-email@example.com',
	USER_HASH: 'd10532200r202eefwa9c7eab290237a6'
}).then(function doSomethingAuthorized () {
	//...
});

createTask

Create task and assign it to responsible user. For extended usage see official docs.

amo.createTask({
	task_type: 1,
	text: 'Task text',
	responsible_user_id: 123,
	complete_till: new Date().getTime()
});

createContact

Create contact. For extended usage see official docs

amo.createContact({
	name: 'Вася Пупкин',
	responsible_user_id: 540759
}).then(function afterContactCreated (res) {
	console.log(res.id); // created contact id
});

License

MIT

1.3.1

7 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago