https://github.com/eustatos/bx24
https://github.com/eustatos/bx24
bitrix24 jest typedoc typescript webpack
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eustatos/bx24
- Owner: eustatos
- Created: 2019-07-05T07:43:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T16:12:18.000Z (over 1 year ago)
- Last Synced: 2025-06-23T23:05:52.993Z (about 1 year ago)
- Topics: bitrix24, jest, typedoc, typescript, webpack
- Language: TypeScript
- Size: 2.79 MB
- Stars: 3
- Watchers: 0
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.com/eustatos/bx24)
[](https://codeclimate.com/github/eustatos/bx24/maintainability)
[](https://codeclimate.com/github/eustatos/bx24/test_coverage)
With this package, you can use promise instead of
[bx24](https://api.bitrix24.com/api/v1/), that use a callback.
Intended for use only in applications that are hosted in the Bitrix cloud.
[Read more...](https://training.bitrix24.com/rest_help/index.php)
## Install
```
npm i -S bx24
```
or
```bash
yarn add bx24
```
## Usage
```javascript
import { BX24 } from 'bx24';
const bx24 = new BX24(window, parent);
bx24.getAuth().then(function(auth) {
console.log(auth);
});
//ACCESS_TOKEN: "f501215d003d7e84003d7e8200000001100e03dc37a458d34295efbd236acf1d3e6cc7"
//DOMAIN: "b24-gx7djf.bitrix24.ru"
//EXPIRES_IN: undefined
//MEMBER_ID: "10aa3c0406bae7b5dbba1d87164f4a8f"
//REFRESH_TOKEN: "e580485d003d7e84003d7e8200000001100e03c1685c8a1a76097df895324671373e09"
```
## CDN
```html
var bx24 = new BX24();
bx24.getAuth.then(function(auth) {
console.log(auth);
});
// ACCESS_TOKEN: "f501215d003d7e84003d7e8200000001100e03dc37a458d34295efbd236acf1d3e6cc7"
// DOMAIN: "b24-gx7djf.bitrix24.ru"
// EXPIRES_IN: undefined
// MEMBER_ID: "10aa3c0406bae7b5dbba1d87164f4a8f"
// REFRESH_TOKEN: "e580485d003d7e84003d7e8200000001100e03c1685c8a1a76097df895324671373e09"
```