Skip to content

Add /ui endpoint #5

Description

@emiliano-go

Summary
Add a new GET /ui/ endpoint following the same pattern used by /dolar/.

Guide
Follow CONTRIBUTING.md, especially the section named Creating A New Indicator Route.

Expected pattern

  • add a new service in app/services/
  • add a new router in app/routers/
  • export the router from app/routers/init.py
  • register the router in app/main.py
  • inject HttpxClientDep in the route function signature
  • keep scraping logic in the service layer
  • return a JSON-friendly dict from the route

Acceptance criteria

  • GET /ui/ exists
  • the route is visible in /docs
  • the route uses the same router/service split as /dolar/
  • async helper calls are properly awaited
  • the endpoint returns structured JSON, not a coroutine and not raw HTML unless intentionally designed that way
  • the scraping selector is documented in the code if it is not obvious

Notes for contributors
Start by copying the /dolar flow and rename everything carefully. The easiest safe path is:

  1. create the service
  2. create the router
  3. export the router
  4. register the router
  5. test in Swagger UI

If the value is inside a span, prefer get_span_element(). If it is inside a div, prefer get_div_element().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions