misardev 1.1.0

Async Rust client for the Misar.Dev API: create projects, write files, build and deploy, start from templates, run OpenAI-compatible chat completions, search code and read usage. Retries, typed plan-limit errors, SSE streaming.
Documentation
// GENERATED by scripts/generate-sdk-resources.mjs from sdks/manifest.json.
// Do not edit by hand — change the route, run `pnpm sdk:sync`, and regenerate.

use crate::error::MisarDevError;
use crate::transport::Transport;
use reqwest::Method;
use serde_json::Value;

/// The `github` resource — 2 operation(s).
///
/// The linked GitHub account: read it or disconnect it.
///
/// Reached through [`crate::MisarDev::github`].
#[derive(Debug, Clone, Copy)]
pub struct GithubResource<'a> {
    pub(crate) t: &'a Transport,
}

impl GithubResource<'_> {
    /// `DELETE /github/connection`
    ///
    /// misardev:method github.disconnect
    pub async fn disconnect(self) -> Result<Value, MisarDevError> {
        self.t.request(Method::DELETE, "/github/connection", "", None).await
    }

    /// `GET /github/connection`
    ///
    /// misardev:method github.getConnection
    pub async fn get_connection(self) -> Result<Value, MisarDevError> {
        self.t.request(Method::GET, "/github/connection", "", None).await
    }
}