cttpie

0.5.1 • Public • Published

CTTPie

Simple API service wrapping CTT's HTML website.

Rational

It should make use of the regular CTT website to get tracking information, but in a more programmatic way.

The underlying code should mek use of the node-fetch and node-html-parser packages to make requests to the CTT website and parse them.

Usage

The package can be used in a simple way, by just calling the root endpoint (/) with a tracking number (tracking) as a GET parameter.

yarn dev
curl -X GET http://localhost:3000/?tracking=RR123456789PT

Configuration

Name Type Default Description
CTTPIE_KEY str None Secret key that should be passed in protected calls so that the server side "trusts" the client side (authentication).
CTTPIE_HANDLER str neo The handler that is going to be used to find and process tracking numbers (eg: neo, legacy).
API_VERSION str None Secret Base64 CTT API version to be used in API requests.
CSRF_TOKEN str None Secret CSRF token to be used for CTT API.
COOKIE str None Secret cookie to be used for CTT API authentication.

License

CTTPie is currently licensed under the Apache License, Version 2.0.

Build Automation

Build Status Build Status GitHub npm Status License

Readme

Keywords

Package Sidebar

Install

npm i cttpie

Weekly Downloads

1

Version

0.5.1

License

Apache-2.0

Unpacked Size

20.7 kB

Total Files

12

Last publish

Collaborators

  • hive_info
  • joamag
  • joamag_hive
  • hive_dev