Crates.io | twitter-flows |
lib.rs | twitter-flows |
version | 0.2.1 |
source | src |
created_at | 2023-02-02 08:29:41.018313 |
updated_at | 2023-03-03 08:22:43.778196 |
description | Twitter integration for flows.network |
homepage | |
repository | |
max_upload_size | |
id | 774623 |
size | 4,832 |
This is a library for integrating Twitter in your flow function for flows.network.
use twitter_flows::create_tweet;
use slack_flows::{channel_msg_received};
#[no_mangle]
pub fn run() {
if let Some(sm) = channel_msg_received("myworkspace", "mychannel") {
let tweet = serde_json::json!({
"text": sm.text,
});
create_tweet(tweet);
}
}
When a new message is received from mychannel
, we will create a new tweet in Twitter using create_tweet
.
The whole document is here.