Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import zenserp from "../../zenserp.app.mjs";

export default {
key: "zenserp-google-image-search",
name: "Google Image Search",
description: "Perform a Google image search using the Zenserp API. [See the documentation](https://app.zenserp.com/documentation#imageSearch)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
zenserp,
q: {
propDefinition: [
zenserp,
"q",
],
},
searchEngine: {
propDefinition: [
zenserp,
"searchEngine",
],
},
country: {
propDefinition: [
zenserp,
"country",
],
},
language: {
propDefinition: [
zenserp,
"language",
],
},
device: {
propDefinition: [
zenserp,
"device",
],
},
timeframe: {
propDefinition: [
zenserp,
"timeframe",
],
},
},
async run({ $ }) {
const response = await this.zenserp.search({
$,
params: {
q: this.q,
tbm: "isch",
search_engine: this.searchEngine,
gl: this.country,
lr: this.language,
device: this.device,
timeframe: this.timeframe,
},
});
$.export("$summary", `Successfully searched for images with query "${this.q}"`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import zenserp from "../../zenserp.app.mjs";

export default {
key: "zenserp-google-news-search",
name: "Google News Search",
description: "Perform a Google news search using the Zenserp API. [See the documentation](https://app.zenserp.com/documentation#newsSearch)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
zenserp,
q: {
propDefinition: [
zenserp,
"q",
],
},
searchEngine: {
propDefinition: [
zenserp,
"searchEngine",
],
},
country: {
propDefinition: [
zenserp,
"country",
],
},
language: {
propDefinition: [
zenserp,
"language",
],
},
num: {
propDefinition: [
zenserp,
"num",
],
},
start: {
propDefinition: [
zenserp,
"start",
],
},
device: {
propDefinition: [
zenserp,
"device",
],
},
timeframe: {
propDefinition: [
zenserp,
"timeframe",
],
},
},
async run({ $ }) {
const response = await this.zenserp.search({
$,
params: {
q: this.q,
tbm: "nws",
search_engine: this.searchEngine,
gl: this.country,
lr: this.language,
num: this.num,
start: this.start,
device: this.device,
timeframe: this.timeframe,
},
});
$.export("$summary", `Successfully searched for news with query "${this.q}"`);
return response;
},
};
82 changes: 82 additions & 0 deletions components/zenserp/actions/google-search/google-search.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import zenserp from "../../zenserp.app.mjs";

export default {
key: "zenserp-google-search",
name: "Google Search",
description: "Perform a Google search using the Zenserp API. [See the documentation](https://app.zenserp.com/documentation#search)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
zenserp,
q: {
propDefinition: [
zenserp,
"q",
],
},
searchEngine: {
propDefinition: [
zenserp,
"searchEngine",
],
},
country: {
propDefinition: [
zenserp,
"country",
],
},
language: {
propDefinition: [
zenserp,
"language",
],
},
num: {
propDefinition: [
zenserp,
"num",
],
},
start: {
propDefinition: [
zenserp,
"start",
],
},
device: {
propDefinition: [
zenserp,
"device",
],
},
timeframe: {
propDefinition: [
zenserp,
"timeframe",
],
},
},
async run({ $ }) {
const response = await this.zenserp.search({
$,
params: {
q: this.q,
search_engine: this.searchEngine,
gl: this.country,
lr: this.language,
num: this.num,
start: this.start,
device: this.device,
timeframe: this.timeframe,
},
});
$.export("$summary", `Successfully searched "${this.q}"`);
return response;
},
};
5 changes: 4 additions & 1 deletion components/zenserp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/zenserp",
"version": "0.0.1",
"version": "0.1.0",
"description": "Pipedream Zenserp Components",
"main": "zenserp.app.mjs",
"keywords": [
Expand All @@ -11,5 +11,8 @@
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.1.0"
}
}
Loading
Loading