Constructs Pinecone API URLs.
More...
#include <url_builder.hpp>
Constructs Pinecone API URLs.
Definition at line 20 of file url_builder.hpp.
◆ url_builder()
pinecone::net::url_builder::url_builder |
( |
std::string |
environment | ) |
|
|
inlineexplicitnoexcept |
Construct a new url builder object.
- Parameters
-
environment | the cloud environment for the URLs |
Definition at line 27 of file url_builder.hpp.
◆ build() [1/2]
template<domain::operation_type op>
auto pinecone::net::url_builder::build |
( |
| ) |
const -> std::string
|
|
inlinenoexcept |
Constructs a URL for a specific operation_type.
- Template Parameters
-
- Returns
- the URL
Definition at line 57 of file url_builder.hpp.
◆ build() [2/2]
template<domain::operation_type op>
auto pinecone::net::url_builder::build |
( |
std::string_view |
index_name | ) |
const -> std::string
|
|
inlinenoexcept |
Constructs a URL for a specific operation_type requiring an index name.
- Template Parameters
-
- Parameters
-
- Returns
- the URL
Definition at line 72 of file url_builder.hpp.
◆ prefix()
auto pinecone::net::url_builder::prefix |
( |
| ) |
const -> std::string_view |
|
inlinenoexcept |
- Returns
- the prefix for all API operations
Definition at line 48 of file url_builder.hpp.
◆ set_metadata()
Set the API metadata.
This function is required due to the construction of the Pinecone API. Some API URLs require information that can only be obtained by making an initial API call; thus, Cppinecone makes this request for the user when a new connection is created, then uses the response to populate the requisite metadata for subsequent operations.
- Parameters
-
metadata | the metadata returned by the Pinecone API server |
Definition at line 43 of file url_builder.hpp.
Referenced by pinecone::pinecone_client< Mode >::build().
The documentation for this struct was generated from the following file: