API Usage Models¶
- pydantic model flight_radar.models.api_usage.ApiUsage¶
Bases:
BaseModel
Show JSON schema
{ "title": "ApiUsage", "type": "object", "properties": { "endpoint": { "description": "Endpoint of the API call", "title": "Endpoint", "type": "string" }, "request_count": { "description": "Number of requests", "title": "Request Count", "type": "integer" }, "credits": { "description": "Number of credits used", "title": "Credits", "type": "integer" } }, "required": [ "endpoint", "request_count", "credits" ] }
-
field credits:
int
[Required]¶ Number of credits used
-
field endpoint:
str
[Required]¶ Endpoint of the API call
-
field request_count:
int
[Required]¶ Number of requests
-
field credits:
- pydantic model flight_radar.models.api_usage.ApiUsageRequest¶
Bases:
BaseModel
Show JSON schema
{ "title": "ApiUsageRequest", "type": "object", "properties": { "period": { "$ref": "#/$defs/TimePeriod", "default": "24h" } }, "$defs": { "TimePeriod": { "enum": [ "24h", "7d", "30d", "1y" ], "title": "TimePeriod", "type": "string" } } }
-
field period:
TimePeriod
= TimePeriod.DAY¶
- to_dto()¶
- Return type:
ApiUsageBaseRequestDto
-
field period: