mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
049e4544d9
* refactor todoist implementation and break code into separate classes * add move item between sections functionality * add todoist sync integration * rebase with master * Fixed get task returning only true * Fix empty response bug * Fixed bug which prevented sections from being loaded * Removed crendentials from node and injected directly in credentials file * Remove console.logs * Changed parameter name for coherence * Fixed error * 🐛 Fix merge issues * ⚡ Improvements * 🔥 Remove unnecessary code * 👕 Fix linting issue * 👕 Fix linting issue * 🐛 Fix ts issue * 👕 Fix linting issue Co-authored-by: Rahim Rahimli <ragim95@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
35 lines
623 B
TypeScript
35 lines
623 B
TypeScript
import {
|
|
IAuthenticateBearer,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
export class TodoistApi implements ICredentialType {
|
|
name = 'todoistApi';
|
|
displayName = 'Todoist API';
|
|
documentationUrl = 'todoist';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'API Key',
|
|
name: 'apiKey',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
|
|
];
|
|
|
|
authenticate = {
|
|
type: 'bearer',
|
|
properties: {
|
|
tokenPropertyName: 'apiKey',
|
|
},
|
|
} as IAuthenticateBearer;
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://api.todoist.com/rest/v1',
|
|
url: '/labels',
|
|
},
|
|
};
|
|
}
|