ellite / Wallos

Wallos: Open-Source Personal Subscription Tracker
GNU General Public License v3.0
2.92k stars 133 forks source link

[Feature Request] Monthly Stats filter #532

Closed Riza-Aslan closed 2 weeks ago

Riza-Aslan commented 3 weeks ago

I replaced my old Cost-Overview-Sheet with Wallos and it looks really awesome. Thank you for your hard work! But to fully replace my Google Sheet, I would need some more stats. A filtering option would be awesome, to choose only a certain month. For now, Wallos shows the average cost of a month (summary of all costs / 12). But what I need, is to chose for example the next month, to see how much of my budget will left over for this given month. A filter for every month of the year would be perfect. I'm using the scrape integration of Home Assistant to get some information from Wallos. With a filter, I could tell Home Assistant to scrape for example https://wallos/stats.php?month=9 to get the costs for september.

ellite commented 3 weeks ago

Hi. This is a bit tricky to build. Because we only have the next payment date. And we have to calculate which subscriptions should be paid on a specific month based on the next payment date and on the frequency. But I can build an endpoint for that, that would be specific to do this calculations.

Riza-Aslan commented 2 weeks ago

I don't really know what this means, but it sounds good to me 😁

I would really appreciate that!

ellite commented 2 weeks ago

Something like getmontlhycost.php?year=2024&month=11 and it would exclusively calculate and respond with the value.

Riza-Aslan commented 2 weeks ago

Yes. This would be awesome!

ellite commented 2 weeks ago

v2.27.0 released has now an endpoint for this.

Login, go to the new user profile page and copy your API Key then you can make a request to https://whatever.domain/api/subscriptions/get_monthly_cost.php?month=12&year=2024&api_key=

The response will look like:

{
  "success": true,
  "title": "December 2024",
  "monthly_cost": "28.82",
  "localized_monthly_cost": "€28.82",
  "currency_code": "EUR",
  "currency_symbol": "€",
  "notes": []
}
cipriani14 commented 1 week ago

Any chance this info can be added to the Calendar view directly within Wallos?