Hi,
I have done this:
import Pipedrive from 'pipedrive';
const pipedriveNextID = () => {
const apiClient = new Pipedrive.ApiClient();
const api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'XXXXXXXXXXXXXXXX';
const apiInstance = new Pipedrive.DealsApi(apiClient);
const opts = {
start: 0, // Number | Pagination start
limit: 100, // Number | Items shown per page
};
apiInstance.getDeals(opts).then(
(data: string) => {
console.log('API called successfully. Returned data: ' + data);
},
(error: unknown) => {
console.error(error);
},
);
};
but i just get an error message:
Cannot read properties of undefined (reading ‘ApiClient’)
What am i doing wrong?
Thanks for the help!