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 crate::transport::build_query;
use reqwest::Method;
use serde_json::Value;

/// The `feed` resource — 2 operation(s).
///
/// The Following feed and the ranked For you feed.
///
/// Reached through [`crate::MisarDev::feed`].
#[derive(Debug, Clone, Copy)]
pub struct FeedResource<'a> {
    pub(crate) t: &'a Transport,
}

impl FeedResource<'_> {
    /// `GET /feed`
    ///
    /// Optional query: `cursor`, `limit`.
    ///
    /// misardev:method feed.following
    pub async fn following(self, query: Option<Value>) -> Result<Value, MisarDevError> {
        self.t.request(Method::GET, "/feed", &build_query(query.as_ref(), &[]), None).await
    }

    /// `GET /feed/for-you`
    ///
    /// Public — works without a key, but the client still sends it.
    ///
    /// Optional query: `cursor`, `limit`.
    ///
    /// misardev:method feed.forYou
    pub async fn for_you(self, query: Option<Value>) -> Result<Value, MisarDevError> {
        self.t.request(Method::GET, "/feed/for-you", &build_query(query.as_ref(), &[]), None).await
    }
}