Skip to content

Add Trucky top-km monthly and accumulated routes#33

Merged
MDCYT merged 1 commit intomainfrom
dev
Mar 2, 2026
Merged

Add Trucky top-km monthly and accumulated routes#33
MDCYT merged 1 commit intomainfrom
dev

Conversation

@MDCYT
Copy link
Copy Markdown
Owner

@MDCYT MDCYT commented Mar 2, 2026

Add API docs and two Express routes to expose Trucky top-km data: a monthly endpoint and an accumulated endpoint. Implements HTTP calls to Trucky (axios) with custom headers, a hardcoded COMPANY_IDS list, concurrent fetching (workers=5), and per-month caching (current month TTL=30min, past months TTL=24h). The accumulated route reuses monthly caches and keeps a cached full-response refreshed every 30 minutes; both endpoints return 503 when no cached payload is available. Also include docs/API_TRUCKY.md describing routes, query params, cache strategy and example responses.

Add API docs and two Express routes to expose Trucky top-km data: a monthly endpoint and an accumulated endpoint. Implements HTTP calls to Trucky (axios) with custom headers, a hardcoded COMPANY_IDS list, concurrent fetching (workers=5), and per-month caching (current month TTL=30min, past months TTL=24h). The accumulated route reuses monthly caches and keeps a cached full-response refreshed every 30 minutes; both endpoints return 503 when no cached payload is available. Also include docs/API_TRUCKY.md describing routes, query params, cache strategy and example responses.
@MDCYT MDCYT merged commit 301ca1c into main Mar 2, 2026
2 of 3 checks passed
@deepsource-io
Copy link
Copy Markdown
Contributor

deepsource-io bot commented Mar 2, 2026

DeepSource Code Review

We reviewed changes in b2ea298...9ba8b0f on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Mar 2, 2026 3:18a.m. Review ↗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant