mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
⚡ Minor improvements to Pushbullet-Node
This commit is contained in:
parent
d0fc7209bf
commit
805c89be17
|
@ -43,7 +43,7 @@ export async function pushbulletApiRequest(this: IExecuteFunctions | ILoadOption
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function pushbulletApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string ,method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
export async function pushbulletApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||||
|
|
||||||
const returnData: IDataObject[] = [];
|
const returnData: IDataObject[] = [];
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ export class Pushbullet implements INodeType {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'push',
|
default: 'push',
|
||||||
description: 'The resource to operate on.'
|
description: 'The resource to operate on.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Operation',
|
displayName: 'Operation',
|
||||||
|
@ -89,7 +89,7 @@ export class Pushbullet implements INodeType {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'create',
|
default: 'create',
|
||||||
description: 'The resource to operate on.'
|
description: 'The operation to perform.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Type',
|
displayName: 'Type',
|
||||||
|
@ -137,12 +137,12 @@ export class Pushbullet implements INodeType {
|
||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
'note',
|
'note',
|
||||||
'link'
|
'link',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: '',
|
default: '',
|
||||||
description: `Title of the push, used for all types of pushes`
|
description: `Title of the push.`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Body',
|
displayName: 'Body',
|
||||||
|
@ -165,7 +165,7 @@ export class Pushbullet implements INodeType {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: '',
|
default: '',
|
||||||
description: `Body of the push, used for all types of pushes`
|
description: `Body of the push.`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'URL',
|
displayName: 'URL',
|
||||||
|
@ -186,7 +186,7 @@ export class Pushbullet implements INodeType {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: '',
|
default: '',
|
||||||
description: `Body of the push, used for all types of pushes`
|
description: `URL of the push.`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Binary Property',
|
displayName: 'Binary Property',
|
||||||
|
@ -248,7 +248,7 @@ export class Pushbullet implements INodeType {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: 'default',
|
default: 'default',
|
||||||
description: 'Define the medium that will be used to send the push',
|
description: 'Define the medium that will be used to send the push.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Value',
|
displayName: 'Value',
|
||||||
|
@ -380,14 +380,14 @@ export class Pushbullet implements INodeType {
|
||||||
name: 'active',
|
name: 'active',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: false,
|
default: false,
|
||||||
description: `Don't return deleted pushes`,
|
description: `Don't return deleted pushes.`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Modified After',
|
displayName: 'Modified After',
|
||||||
name: 'modified_after',
|
name: 'modified_after',
|
||||||
type: 'dateTime',
|
type: 'dateTime',
|
||||||
default: '',
|
default: '',
|
||||||
description: `Request pushes modified after this timestamp`,
|
description: `Request pushes modified after this timestamp.`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -482,7 +482,7 @@ export class Pushbullet implements INodeType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'file') {
|
if (type === 'file') {
|
||||||
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string;
|
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0) as string;
|
||||||
|
|
||||||
if (items[i].binary === undefined) {
|
if (items[i].binary === undefined) {
|
||||||
|
@ -512,7 +512,7 @@ export class Pushbullet implements INodeType {
|
||||||
);
|
);
|
||||||
|
|
||||||
//upload the file
|
//upload the file
|
||||||
await pushbulletApiRequest.call(
|
await pushbulletApiRequest.call(
|
||||||
this,
|
this,
|
||||||
'POST',
|
'POST',
|
||||||
'',
|
'',
|
||||||
|
@ -534,7 +534,7 @@ export class Pushbullet implements INodeType {
|
||||||
|
|
||||||
body.file_name = file_name;
|
body.file_name = file_name;
|
||||||
body.file_type = file_type;
|
body.file_type = file_type;
|
||||||
body.file_url = file_url;
|
body.file_url = file_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
responseData = await pushbulletApiRequest.call(
|
responseData = await pushbulletApiRequest.call(
|
||||||
|
|
Loading…
Reference in a new issue