feat(Brandfetch Node): Update to use new API (#10877)

This commit is contained in:
Jon
2024-09-23 21:19:16 +01:00
committed by GitHub
parent d74cff2030
commit 08ba9a36a4
4 changed files with 130 additions and 69 deletions

View File

@@ -1,4 +1,9 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class BrandfetchApi implements ICredentialType {
name = 'brandfetchApi';
@@ -16,4 +21,20 @@ export class BrandfetchApi implements ICredentialType {
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.apiKey}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.brandfetch.io',
url: '/v2/brands/brandfetch.com',
},
};
}