UGemini 2.0.1
A C# wrapper for the Google Gemini API.
Loading...
Searching...
No Matches
Uralstech.UGemini.FileAPI.GeminiFileUploadRequest Class Reference

Uploads a file to the Gemini File API. Response type is GeminiFileUploadResponse. More...

Inheritance diagram for Uralstech.UGemini.FileAPI.GeminiFileUploadRequest:
Uralstech.UGemini.IGeminiMultiPartPostRequest Uralstech.UGemini.IGeminiRequest

Public Member Functions

string GetEndpointUri (GeminiRequestMetadata metadata)
 Gets the URI to the API endpoint.
Parameters
metadataThe metadata of the request to be carried out on the URI.
Returns
The URI.

 
 GeminiFileUploadRequest (string contentType, bool useBetaApi=true)
 Creates a new GeminiFileUploadRequest.
 
 GeminiFileUploadRequest (GeminiContentType contentType, bool useBetaApi=true)
 Creates a new GeminiFileUploadRequest.
 
string GetUtf8EncodedData (string dataSeperator)
 Converts the request object to a UTF-8 encoded multi-part string.
Parameters
dataSeperatorThe boundary to seperate each part of the data.
Returns
The string data.

 

Public Attributes

GeminiFileUploadMetaData File = null
 Optional metadata for the GeminiFile to be uploaded.
 
string MimeType
 The IANA standard MIME type of the GeminiFileUploadRequest.
 
byte[] RawData
 The raw file data to upload.
 
string ApiVersion
 The API version to use.
 

Properties

string ContentType [get]
 

Detailed Description

Uploads a file to the Gemini File API. Response type is GeminiFileUploadResponse.

Only available in the beta API.

Constructor & Destructor Documentation

◆ GeminiFileUploadRequest() [1/2]

Uralstech.UGemini.FileAPI.GeminiFileUploadRequest.GeminiFileUploadRequest ( string contentType,
bool useBetaApi = true )

Creates a new GeminiFileUploadRequest.

Only available in the beta API.

Parameters
contentTypeThe content type of the data.
useBetaApiShould the request use the Beta API?

◆ GeminiFileUploadRequest() [2/2]

Uralstech.UGemini.FileAPI.GeminiFileUploadRequest.GeminiFileUploadRequest ( GeminiContentType contentType,
bool useBetaApi = true )

Creates a new GeminiFileUploadRequest.

Only available in the beta API.

Parameters
contentTypeThe content type of the data.
useBetaApiShould the request use the Beta API?

Member Function Documentation

◆ GetEndpointUri()

string Uralstech.UGemini.FileAPI.GeminiFileUploadRequest.GetEndpointUri ( GeminiRequestMetadata metadata)

Gets the URI to the API endpoint.

Parameters
metadataThe metadata of the request to be carried out on the URI.
Returns
The URI.

Implements Uralstech.UGemini.IGeminiRequest.

◆ GetUtf8EncodedData()

string Uralstech.UGemini.FileAPI.GeminiFileUploadRequest.GetUtf8EncodedData ( string dataSeperator)

Converts the request object to a UTF-8 encoded multi-part string.

Parameters
dataSeperatorThe boundary to seperate each part of the data.
Returns
The string data.

Implements Uralstech.UGemini.IGeminiMultiPartPostRequest.


The documentation for this class was generated from the following file: