pub struct PrismerClient {
pub identity_did: Option<String>,
/* private fields */
}Expand description
Main Prismer SDK client.
Fields§
§identity_did: Option<String>DID:key identifier derived from signing key.
Implementations§
Source§impl PrismerClient
impl PrismerClient
Sourcepub fn new(api_key: &str, base_url: Option<&str>) -> Self
pub fn new(api_key: &str, base_url: Option<&str>) -> Self
Create a new client with API key and optional base URL override. Fallback chain: explicit → PRISMER_API_KEY env → ~/.prismer/config.toml → ‘’
Sourcepub fn new_with_identity(api_key: &str, base_url: Option<&str>) -> Self
pub fn new_with_identity(api_key: &str, base_url: Option<&str>) -> Self
Create a client with auto-signing from API key (v1.8.0 S7). Derives Ed25519 key via SHA-256(api_key). Fallback chain: explicit → PRISMER_API_KEY env → ~/.prismer/config.toml → ‘’
Sourcepub fn context(&self) -> ContextClient<'_>
pub fn context(&self) -> ContextClient<'_>
Get Context API client.
Sourcepub fn parse(&self) -> ParseClient<'_>
pub fn parse(&self) -> ParseClient<'_>
Get Parse API client.
Sourcepub fn evolution(&self) -> EvolutionClient<'_>
pub fn evolution(&self) -> EvolutionClient<'_>
Get Evolution API client.
Sourcepub fn memory(&self) -> MemoryClient<'_>
pub fn memory(&self) -> MemoryClient<'_>
Get Memory API client.
Sourcepub fn knowledge(&self) -> KnowledgeLinkClient<'_>
pub fn knowledge(&self) -> KnowledgeLinkClient<'_>
Get Knowledge Links API client (v1.8.0).
Sourcepub fn community(&self) -> CommunityClient<'_>
pub fn community(&self) -> CommunityClient<'_>
Get Community API client.
Sourcepub fn tasks(&self) -> TasksClient<'_>
pub fn tasks(&self) -> TasksClient<'_>
Get Tasks API client.
Sourcepub fn identity(&self) -> IdentityClient<'_>
pub fn identity(&self) -> IdentityClient<'_>
Get Identity API client.
Sourcepub fn files(&self) -> FilesClient<'_>
pub fn files(&self) -> FilesClient<'_>
Get Files API client.
Sourcepub async fn request<T: DeserializeOwned>(
&self,
method: Method,
path: &str,
body: Option<Value>,
) -> Result<ApiResponse<T>, PrismerError>
pub async fn request<T: DeserializeOwned>( &self, method: Method, path: &str, body: Option<Value>, ) -> Result<ApiResponse<T>, PrismerError>
Make an authenticated request. Exposed for CLI and advanced usage.
Auto Trait Implementations§
impl Freeze for PrismerClient
impl !RefUnwindSafe for PrismerClient
impl Send for PrismerClient
impl Sync for PrismerClient
impl Unpin for PrismerClient
impl UnsafeUnpin for PrismerClient
impl !UnwindSafe for PrismerClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more