Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

626 B
Raw Blame
use constants::INTERNAL_API_KEY_HEADER;
pub(crate) mod constants;
pub mod search_channel_name;
pub mod search_unified;

#[derive(Clone)]
pub struct SearchServiceClient {
    url: String,
    client: reqwest::Client,
}

impl SearchServiceClient {
    pub fn new(internal_auth_key: String, url: String) -> Self {
        let mut headers = reqwest::header::HeaderMap::new();
        headers.insert(INTERNAL_API_KEY_HEADER, internal_auth_key.parse().unwrap());

        let client = reqwest::Client::builder()
            .default_headers(headers)
            .build()
            .unwrap();

        Self { url, client }
    }
}