Gemini.Client (GeminiEx v0.0.1)
View SourceMain client module that delegates to the appropriate HTTP client implementation.
This module provides a unified interface for making HTTP requests to the Gemini API, abstracting away the specific implementation details of the underlying HTTP client.
Summary
Functions
Make a GET request using the configured authentication.
Make a POST request using the configured authentication.
Make an authenticated HTTP request.
Stream a POST request for Server-Sent Events using configured authentication.
Stream a POST request with specific authentication configuration.
Functions
Make a GET request using the configured authentication.
Parameters
path
- The API path to requestopts
- Optional keyword list of request options
Returns
{:ok, response}
- Successful response{:error, Error.t()}
- Error details
Make a POST request using the configured authentication.
Parameters
path
- The API path to requestbody
- The request body (will be JSON encoded)opts
- Optional keyword list of request options
Returns
{:ok, response}
- Successful response{:error, Error.t()}
- Error details
Make an authenticated HTTP request.
Parameters
method
- HTTP method (:get, :post, etc.)path
- The API path to requestbody
- The request body (nil for GET requests)auth_config
- Authentication configurationopts
- Optional keyword list of request options
Returns
{:ok, response}
- Successful response{:error, Error.t()}
- Error details
Stream a POST request for Server-Sent Events using configured authentication.
Parameters
path
- The API path to requestbody
- The request body (will be JSON encoded)opts
- Optional keyword list of request options
Returns
{:ok, events}
- Successful stream response with parsed events{:error, Error.t()}
- Error details
Stream a POST request with specific authentication configuration.
Parameters
path
- The API path to requestbody
- The request body (will be JSON encoded)auth_config
- Authentication configurationopts
- Optional keyword list of request options
Returns
{:ok, events}
- Successful stream response with parsed events{:error, Error.t()}
- Error details