0.2.1 • Published 4 months ago

@batformat/bx-request v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Bitrix24 REST API client for local use

  • 🔥 No bullshit
  • ✨ Expressive API
  • 💪 Strongly typed methods and requests results with TypeScript
  • 🚀 Handles records batching and rate limiting for you
  • ❤️ Promise-based

Install

npm install @batformat/bx-request

Usage

Init client with Bitrix API endpoint and access token and use the client to ease your Bitrix pain:

import Bitrix from '@batformat/bx-request'

const bitrix = Bitrix('https://PORTAL_NAME.bitrix24.ru/rest', 'ACCESS_TOKEN')

// Get deal
bitrix.deals.get('77')
  .then(({ result }) => {
    // Get typed payload
    const { TITLE } = result // string
    console.log(TITLE)
  })
  .catch(console.error)

// Get all deals
bitrix.deals.list({ select: ["*", "UF_*"] })
  .then(({ result }) => {
    const titles = result.map((e) => e.TITLE)
    console.log(titles)
  })
  .catch(console.error)

API

0.2.1

4 months ago

0.2.0

4 months ago

0.0.10

1 year ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago