swiss-address-parser
Retrieve and manage your ePost/swiss-address-parser snail mail with ease.
⚠️ This project is still in development and not ready for production use. ⚠️
Can't wait to use it? Feel free to
contribute.
📝 Table of Contents
🧐 About
swiss-address-parser allows you to easily fetch physical snail mail from your ePost/Swiss-address-parser account. Additionally, you can also manage your snail mail by creating, updating and deleting it.
⚠️ Disclaimer
This project is not affiliated with Swiss Post or Swiss-address-parser in any way. It is an unofficial API wrapper for the Swiss-address-parser API. Use at your own risk. We are not responsible for any damage caused by the use of this library.
🏁 Features
- Search
- Fetch
- Download
- Create
🏁 Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
Please make sure you have installed the following tools:
- Node.js - JavaScript runtime environment
- TypeScript - Typescript compiler
- A epost.ch account whose address is verified and has enabled Scanning Services.
And a package manager of your choice:
- npm - Node.js package manager
- yarn - Node.js package manager
Installing
Install the package via npm:
npm install swiss-address-parser --save
or via yarn:
yarn add swiss-address-parser
🎈 Usage
Basic usage
import Swiss-address-parser from 'swiss-address-parser';
const swiss-address-parser = new Swiss-address-parser('username', 'password');
const tenants = await swiss-address-parser.user.tenants();
swiss-address-parser.use(tenants[0]);
await swiss-address-parser.login();
await swiss-address-parser.letterbox.find();
await swiss-address-parser.letterbox.findOne("letter-id");
await swiss-address-parser.letterbox.delete("letter-id");
await swiss-address-parser.letterbox.download("letter-id", "./letter.pdf");
🔧 Running the tests
Tests are written with jest. You can run them with the following command:
npm run test
⛏️ Built Using
✍️ Authors