Skip to content

Commit

Permalink
🔧 refactor(colissimo.ts): move API methods to separate file for bette…
Browse files Browse the repository at this point in the history
…r modularity

📝 docs(README.md, CHANGELOG.md): update usage instructions and changelog to reflect API changes
🔧 refactor(package.json): switch from tsc to parcel for better bundling
🔧 refactor(tests): update tests to use new API methods
🔥 remove(src/index.ts): remove ColissimoAPI class, export methods directly
🔧 refactor(.gitignore): add .parcel-cache to gitignore for cleaner repo
🔧 refactor(package.json): update version to 1.2.0 to reflect new changes

🔧 refactor(tsconfig.json): simplify TypeScript configuration for better readability and maintenance

🔀 change(target): switch target from "es2016" to "es2015" for broader compatibility
🔀 change(module): switch module system from "esnext" to "commonjs" for Node.js compatibility
🔥 remove: unnecessary comments and options for cleaner configuration
📝 docs: add "$schema" and "display" for better IDE support
  • Loading branch information
bqst committed Nov 16, 2023
1 parent 4214127 commit e04e86d
Show file tree
Hide file tree
Showing 9 changed files with 3,169 additions and 594 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/package-lock.json
/?.?s
/dist
/test.mjs
/test.mjs
/.parcel-cache
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@ All notable changes to the "Colissimo API Wrapper" project will be documented in

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0]

### Added in 1.2.0

- Move to parcel bundler for smaller bundle size.

## [1.1.0]

### Added
### Added in 1.1.0

- Support for the `authenticate` method to authenticate with the Colissimo API.
- Comprehensive error handling for robust and reliable API interactions.
- Complete TypeScript definitions for all request and response interfaces.

## [1.0.0] - 2023-11-13

### Added
### Added in 1.0.0

- Initial release of the Colissimo API Wrapper.
- Support for the `findRDVPointRetraitAcheminement` method to interact with Colissimo's pickup and drop-off points.
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ yarn add colissimo-pickup-point
Here's a basic example of how to use the package:

```typescript
import ColissimoAPI from 'colissimo-pickup-point';

const api = new ColissimoAPI();
import {
authenticate,
findRDVPointRetraitAcheminement
} from 'colissimo-pickup-point';

// authenticate with your Colissimo credentials
api.authenticate({
authenticate({
login: 'YOUR_ACCOUNT_NUMBER',
password: 'YOUR_PASSWORD'
}).then(response => {
Expand All @@ -42,7 +43,7 @@ api.authenticate({
});

// find pickup points
api.findRDVPointRetraitAcheminement({
findRDVPointRetraitAcheminement({
accountNumber: 'YOUR_ACCOUNT_NUMBER',
password: 'YOUR_PASSWORD',
address: "1 rue de la paix",
Expand Down
Loading

0 comments on commit e04e86d

Please sign in to comment.