Use a Twitter developer app you've created to send API requests
Write Python and use any of the 350k+ PyPi packages available. Refer to the Pipedream Python docs to learn more.
module.exports = defineComponent({
props: {
twitter_developer_app: {
type: "app",
app: "twitter_developer_app",
}
},
async run({steps, $}) {
const Twit = require('twit')
const { api_key, api_secret_key, access_token, access_token_secret } = this.twitter_developer_app.$auth
const T = new Twit({
consumer_key: api_key,
consumer_secret: api_secret_key,
access_token,
access_token_secret,
timeout_ms: 60 * 1000, // optional HTTP request timeout to apply to all requests.
strictSSL: true, // optional - requires SSL certificates to be valid.
})
return await T.get('account/verify_credentials', { skip_status: true })
},
})
Python API on Pipedream offers developers to build or automate a variety of
tasks from their web and cloud apps. With the Python API, users are able to
create comprehensive and flexible scripts, compose and manage environment
variables, and configure resources to perform a range of functions.
By using Pipedream, you can easily:
def handler(pd: "pipedream"):
# Reference data from previous steps
print(pd.steps["trigger"]["context"]["id"])
# Return data for use in future steps
return {"foo": {"test":True}}