Created
September 25, 2022 23:02
-
-
Save Shelob9/ee5671f26177442df06852b452bab5e7 to your computer and use it in GitHub Desktop.
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
import { axios } from "@pipedream/platform" | |
export default defineComponent({ | |
props: { | |
twitter: { | |
type: "app", | |
app: "twitter", | |
} | |
}, | |
async run({steps, $}) { | |
let q = `${encodeURIComponent('from:@josh412 gm -filter:replies')}`; | |
if( steps.get_last_max_id ){ | |
q = `${q}&max_id=${steps.get_last_max_id}`; | |
} | |
q = `${q}&count=100&result_type=mixed`; | |
//"gm"%20(from%3Ajosh412)%20min_replies%3A1%20min_faves%3A1%20min_retweets%3A1%20-filter%3Areplies | |
const url = `https://api.twitter.com/1.1/search/tweets.json?q=${q}`; | |
return await axios($, { | |
url, | |
}, { | |
token: { | |
key: this.twitter.$auth.oauth_access_token, | |
secret: this.twitter.$auth.oauth_refresh_token, | |
}, | |
oauthSignerUri: this.twitter.$auth.oauth_signer_uri, | |
}) | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment