forked from activepieces/activepieces
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6f9818
commit 2e5844e
Showing
6 changed files
with
74 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"name": "@activepieces/piece-apify", | ||
"version": "0.0.1" | ||
"version": "0.0.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,43 @@ | ||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework'; | ||
import { PieceCategory } from '@activepieces/shared'; | ||
import { getDatasetItems } from './lib/actions/get-dataset-items'; | ||
import { getActors } from './lib/actions/get-actors'; | ||
import { getLastRun } from './lib/actions/get-last-run'; | ||
import { startActor } from './lib/actions/start-actor'; | ||
|
||
import { createPiece, PieceAuth } from "@activepieces/pieces-framework"; | ||
import { PieceCategory } from '@activepieces/shared'; | ||
import { getDatasetItems } from './lib/actions/get-dataset-items'; | ||
import { getActors } from './lib/actions/get-actors'; | ||
import { getLastRun } from './lib/actions/get-last-run'; | ||
import { startActor } from './lib/actions/start-actor'; | ||
export const apifyAuth = PieceAuth.CustomAuth({ | ||
description: 'Enter API key authentication details', | ||
props: { | ||
apikey: PieceAuth.SecretText({ | ||
displayName: 'API Key', | ||
required: true, | ||
description: | ||
'Find your API key on Apify in the settings, API & Integrations section.', | ||
}), | ||
}, | ||
// Optional Validation | ||
validate: async ({ auth }) => { | ||
if (auth) { | ||
return { | ||
valid: true, | ||
}; | ||
} | ||
return { | ||
valid: false, | ||
error: 'Invalid Api Key', | ||
}; | ||
}, | ||
required: true, | ||
}); | ||
|
||
export const apifyAuth = PieceAuth.CustomAuth({ | ||
description: 'Enter API key authentication details', | ||
props: { | ||
apikey: PieceAuth.SecretText({ | ||
displayName: 'API Key', | ||
required: true, | ||
description: 'Find your API key on Apify in the settings, API & Integrations section.' | ||
}) | ||
}, | ||
// Optional Validation | ||
validate: async ({auth}) => { | ||
if(auth){ | ||
return { | ||
valid: true, | ||
} | ||
} | ||
return { | ||
valid: false, | ||
error: 'Invalid Api Key' | ||
} | ||
}, | ||
required: true | ||
}); | ||
|
||
|
||
export const apify = createPiece({ | ||
displayName: "Apify", | ||
description: "Your full‑stack platform for web scraping", | ||
auth: apifyAuth, | ||
minimumSupportedRelease: '0.20.0', | ||
logoUrl: "https://cdn.activepieces.com/pieces/apify.png", | ||
categories: [PieceCategory.BUSINESS_INTELLIGENCE], | ||
authors: ["buttonsbond"], | ||
actions: [ | ||
getDatasetItems, getActors, getLastRun, startActor | ||
], | ||
triggers: [], | ||
}); | ||
|
||
export const apify = createPiece({ | ||
displayName: 'Apify', | ||
description: 'Your full‑stack platform for web scraping', | ||
auth: apifyAuth, | ||
minimumSupportedRelease: '0.20.0', | ||
logoUrl: 'https://cdn.activepieces.com/pieces/apify.png', | ||
categories: [PieceCategory.BUSINESS_INTELLIGENCE], | ||
authors: ['buttonsbond'], | ||
actions: [getDatasetItems, getActors, getLastRun, startActor], | ||
triggers: [], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters