Metadata-Version: 2.4
Name: rogers-api
Version: 0.1.1
Summary: Unofficial Python wrapper for Rogers Bank credit card data
Home-page: https://github.com/diogobas/rogers-api
Author: Diogo Bastos
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: playwright>=1.40.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Rogers API (Unofficial)

Unofficial Python wrapper for Rogers Bank credit card data retrieval.

## Disclaimer

This project is not affiliated with, maintained by, or endorsed by Rogers Bank.
Automating access to banking portals may violate terms of service. Use at your own risk and only for your own account.

## MVP Goals

- HTTP-first authentication and session handling.
- Account summary retrieval.
- Credit card transaction retrieval.
- Normalized transaction output for future Lunch Money integration.

## Installation

```bash
pip install -r requirements.txt
pip install -e .
```

## Quick Start

```bash
python run.py login
python run.py discover-endpoints --capture-seconds 120
python run.py balance
python run.py transactions --start-date 2026-01-01
```

## Notes

- Credentials are requested interactively.
- Session state is stored locally and reused.
- Browser fallback is used only when direct HTTP auth cannot complete.

## Endpoint Discovery (Authenticated)

Use this command after login to capture real authenticated network calls and lock the endpoint mapping used by the client:

```bash
python run.py discover-endpoints --capture-seconds 120
```

If the sign-in button is disabled (for example due to captcha/challenge), run manual mode:

```bash
python run.py discover-endpoints --manual-login --capture-seconds 120
```

To prefer email verification and keep the browser hidden when possible:

```bash
python run.py discover-endpoints --headless --prefer-email --capture-seconds 120
```

Artifacts are written under your local session folder (`~/.rogers-api/` by default):

- `endpoint_map.json`: selected summary/transactions endpoint + HTTP method
- `endpoint-discovery-YYYYMMDD-HHMMSS.json`: raw captured XHR/fetch event metadata
