n8n/packages/nodes-base/credentials/BrandfetchApi.credentials.ts
Jon 08ba9a36a4
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
feat(Brandfetch Node): Update to use new API (#10877)
2024-09-23 21:19:16 +01:00

41 lines
734 B
TypeScript

import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class BrandfetchApi implements ICredentialType {
name = 'brandfetchApi';
displayName = 'Brandfetch API';
documentationUrl = 'brandfetch';
properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.apiKey}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.brandfetch.io',
url: '/v2/brands/brandfetch.com',
},
};
}