Push Hotlist todo items to third-party todo apps using sync plugins.
Connect a plugin in the settings/sync tab.
Hotlist runs automated checks to ensure the plugin functions corretly.
A Hotlist plugin is a JavaScript file exporting a predefined set of functions.
See code interface below and inspect the WIP.co plugin code to see how it works.
/**
* getId
* @returns { string } Between 3 and 8 lowercase characters
*/
const getId = () => 'myapp';
/**
* getName
* @returns { string } Between 3 and 32 characters
*/
const getName = () => 'My app';
/**
* getProps
* @returns { { [key:string]: { label:string, value:string, type: 'text' | 'password' } } }
*/
const getProps = () => ({
apiKey: {
label: 'API Key',
type: 'password',
value: '',
},
});
/**
* Insert todo
* @param { { [prop:string]: { label: string, value: string } } } props
* @param { text: string, completed?: boolean } data
* @returns { Promise<{ id:string, url?: string } | boolean> }
*/
const insertTodo = async (props, data) => {
};
/**
* Update existing todo
* @param { { [prop:string]: { label: string, value: string } } } props
* @param { string } id
* @param { text: string, completed?: boolean } data
* @returns { Promise<boolean> }
*/
const updateTodo = async (props, id, data) => {
};
/**
* Update existing todo
* @param { { [prop:string]: { label: string, value: string } } } props
* @param { string } id
* @returns { Promise<boolean> }
*/
const deleteTodo = async (props, id) => {
};