31 lines
678 B
TypeScript
31 lines
678 B
TypeScript
import { IGlobalVariable } from '@automatisch/types';
|
|
import getUserTweets from '../../common/get-user-tweets';
|
|
|
|
export default {
|
|
name: 'My Tweets',
|
|
key: 'myTweets',
|
|
pollInterval: 15,
|
|
description: 'Will be triggered when you tweet something new.',
|
|
substeps: [
|
|
{
|
|
key: 'chooseConnection',
|
|
name: 'Choose connection',
|
|
},
|
|
{
|
|
key: 'testStep',
|
|
name: 'Test trigger',
|
|
},
|
|
],
|
|
|
|
async run($: IGlobalVariable) {
|
|
return await getUserTweets($, {
|
|
currentUser: true,
|
|
lastInternalId: $.db.flow.lastInternalId,
|
|
});
|
|
},
|
|
|
|
async testRun($: IGlobalVariable) {
|
|
return await getUserTweets($, { currentUser: true });
|
|
},
|
|
};
|