API Reference
This section provides detailed documentation for the PreMiD Activity Development API. It covers all the classes, interfaces, and functions available for creating activities.
Overview
The PreMiD API consists of several key components:
- Presence Class: The main class for creating activities
- PresenceData Interface: The interface for defining what data to show in Discord
- Metadata Interface: The interface for defining activity metadata
- Slideshow Class: A class for creating slideshows that alternate between different presence data
- iFrame Class: A class for interacting with iframes
- Utility Functions: Helper functions for common tasks
Getting Started
If you're new to PreMiD Activity Development, we recommend starting with the Guide section, which provides step-by-step instructions for creating your first activity.
Type Definitions
The API is fully typed with TypeScript, and the type definitions are available in the @types/premid
package. You can find the source code for the type definitions in the Activities repository.
Examples
For practical examples of how to use the API, check out the Examples section, which provides sample code for various types of activities.