(token)
| 64 | |
| 65 | |
| 66 | async def get_credits(token): |
| 67 | headers = {"Authorization": f"Bearer {token}"} |
| 68 | api_url = f"{BASE_URL}/api/billing/info/" |
| 69 | respose = await fetch(api_url, headers, method="GET") |
| 70 | return { |
| 71 | "credits_left": respose['total_credits_left'], |
| 72 | "period": respose['period'], |
| 73 | "monthly_limit": respose['monthly_limit'], |
| 74 | "monthly_usage": respose['monthly_usage'] |
| 75 | } |
no test coverage detected