Gemini Api Endpoints
The Gemini HTTP endpoints used to send prompts. It also includes the headers used and details about the HTTP API. Each Endpoint must belong to a Resource, which defines a path for specific functionalities or use-cases. version is used before the resource paths
I decided not to use Ktor's "Type-safe requests" since it requires those annotations and the "parent" property, which comes with many repetitive lines. I also didn't like how calling httpClient.get
received a generic T and didn't go well with my KtorClient. So I did this to have more customization
For the various REST Resources -> https://ai.google.dev/api/all-methods
https://ai.google.dev/api/files
https://ai.google.dev/api/generate-content
https://ai.google.dev/gemini-api/docs/api-versions#rest
Get your API key here
Functions
Util method to extract the HTTP URI path and queryParams (which will have the apiKey).