BiPRO Box API Client
Installation
pnpm i @itarius-ug/bipro-box-api-client
Example Usage
import { ApiStatus, Bipro } from "@itarius-ug/bipro-box-api-client";
const bipro = new Bipro({
token: "<my-api-token>",
});
(async () => {
try {
const response = await bipro.postbox().all();
for (const postbox of response.postbox) {
const { postboxData } = await bipro.postbox().get(postbox.postbox_id);
console.log(postboxData);
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