Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.41 KB

File metadata and controls

54 lines (36 loc) · 1.41 KB

API Reference

Documentation > API Reference


Overview

This section provides comprehensive API documentation for SpiritStream, including Tauri commands, events, type definitions, and error handling.

Documents

Document Description Audience
01. Commands API Complete Tauri command reference All levels
02. Events API Event system documentation Intermediate+
03. Types Reference TypeScript and Rust type definitions All levels
04. Error Handling Error codes and recovery patterns Intermediate+

Command Categories

Category Commands Purpose
Profile 7 Profile CRUD operations
Stream 8 Stream control and status
System 3 Encoder detection, FFmpeg test
Settings 5 App settings management
FFmpeg 4 Download and version check
Theme 4 Theme management

Quick Reference

Invoke a Command

import { invoke } from '@tauri-apps/api/core';

const profiles = await invoke<string[]>('get_all_profiles');

Listen to Events

import { listen } from '@tauri-apps/api/event';

await listen<StreamStats>('stream_stats', (event) => {
  console.log('Stats:', event.payload);
});

Section: 05-api-reference