Socket
Socket
Sign inDemoInstall

@itarius-ug/bipro-box-api-client

Package Overview
Dependencies
21
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @itarius-ug/bipro-box-api-client

A TypeScript wrapper for the BiPRO Box API


Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Install size
801 kB
Created
Weekly downloads
 

Readme

Source

BiPRO Box API Client

Installation

pnpm i @itarius-ug/bipro-box-api-client

Example Usage

import { Bipro } from "./bipro.js";
import { ApiStatus } from "./postbox.contracts.js";

const bipro = new Bipro({
  baseUrl: "https://www.bipro-box.de/app/core/api/json/v1.0",
  token: "<my-api-token>",
});

(async () => {
  try {
    // fetch all available documents (postbox_api_status = 0)
    const response = await bipro.postbox().all();

    for (const postbox of response.postbox) {
      // fetch single document by id
      const { postboxData } = await bipro.postbox().get(postbox.postbox_id);

      console.log(postboxData);

      // mark document as processed (postbox_api_status = 1)
      await bipro
        .postbox()
        .update(postbox.postbox_id, { apiStatus: ApiStatus.Processed });
    }
  } catch (error: unknown) {
    console.error((error as Error).message);
  }
})();

Credits

This project exists thanks to all the people who contribute.

License

CC-BY-ND-4.0 © Itarius UG

Keywords

FAQs

Last updated on 15 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc