Back to Super Productivity

API Test Plugin

packages/plugin-dev/api-test-plugin/index.html

18.4.42.1 KB
Original Source

API Test Plugin

Available API Methods

getTasks()``getArchivedTasks()``getCurrentContextTasks()``addTask(data)``updateTask(id, data)``getAllProjects()``addProject(data)``updateProject(id, data)``getAllTags()``addTag(data)``updateTag(id, data)``showSnack(config)``notify(config)``openDialog(config)``persistDataSynced(data)``loadSyncedData()``registerHook(hook, handler)``registerHeaderButton(config)``registerMenuEntry(config)``registerShortcut(config)``setCounter(key, value)``getCounter(key)``incrementCounter(key, amount)``decrementCounter(key, amount)``deleteCounter(key)``getAllCounters()


Run All API Tests


Data Persistence Tests

Test Save DataTest Load Data

Task Operations

Get All TasksGet Archived TasksGet Context TasksCreate Test TaskUpdate Last Task

Project & Tag Operations

Get All ProjectsCreate Test ProjectGet All TagsCreate Test Tag

UI Operations

Success SnackError SnackInfo SnackShow NotificationOpen Dialog

Advanced Dialog Examples

Task PlannerAnalytics Dashboard

Console output will appear here...

UI Kit Component Showcase

Headings

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Text

This is a paragraph with bold , italic, and link styles.

Inline code is styled automatically.

Buttons

DefaultPrimaryOutlineDisabled Primary Disabled Outline Disabled

Inputs

Select option 1Select option 2Select option 3 Checkbox label

Code Block

const tasks = await PluginAPI.getTasks();
console.log(tasks.length);

Table

MethodDescription
getTasks()Get all active tasks
addTask(data)Create a new task
showSnack(cfg)Show a notification

Lists

  • Unordered list item 1
  • Unordered list item 2
  • Unordered list item 3
  1. Ordered list item 1
  2. Ordered list item 2
  3. Ordered list item 3

Cards

Default Card

A static card with background, shadow, and border.

Clickable Card

Hover to see the lift effect and primary border highlight.

Horizontal Rule