Struct line_bot_sdk_rust::bot::LineBot [−][src]
LineBot Client
Fields
channel_secret: String
channel_token: String
http_client: HttpClient
Implementations
impl LineBot
[src]
pub fn new(channel_secret: &str, channel_token: &str) -> LineBot
[src]
pub fn parse_event_request(
&self,
signature: &str,
body: &str
) -> Result<Events, &'static str>
[src]
&self,
signature: &str,
body: &str
) -> Result<Events, &'static str>
Note
Parse the HttpRequest content.
let result: Result<Events, &'static str> = bot.parse_event_request(signature, body);
pub fn update_webhook_endpoint(&self, endpoint: &str) -> Result<Response, Error>
[src]
Note
Set webhook endpoint URL. [detail]
let res: Result<Response, Error> = bot.update_webhook_endpoint("https://example.com/hoge");
pub fn get_webhook_endpoint(&self) -> Result<Response, Error>
[src]
Note
Get webhook endpoint information. [detail]
let res: Result<Response, Error> = bot.get_webhook_endpoint();
pub fn test_webhook_endpoint(&self, endpoint: &str) -> Result<Response, Error>
[src]
Note
Test webhook endpoint. [detail]
let res: Result<Response, Error> = bot.test_webhook_endpoint("https://example.com/webhook");
pub fn reply_message(
&self,
reply_token: &str,
msgs: Vec<SendMessageType>
) -> Result<Response, Error>
[src]
&self,
reply_token: &str,
msgs: Vec<SendMessageType>
) -> Result<Response, Error>
Note
Send reply message. [detail]
let res: Result<Response, Error> = bot.reply_message("xxxxxxxxx", vec![...]);
pub fn push_message(
&self,
to: &str,
msgs: Vec<SendMessageType>
) -> Result<Response, Error>
[src]
&self,
to: &str,
msgs: Vec<SendMessageType>
) -> Result<Response, Error>
Note
Send push message. [detail]
let res: Result<Response, Error> = bot.push_message("xxxxxxxxx", vec![...]);
pub fn multicast(
&self,
to: Vec<String>,
msgs: Vec<SendMessageType>
) -> Result<Response, Error>
[src]
&self,
to: Vec<String>,
msgs: Vec<SendMessageType>
) -> Result<Response, Error>
Note
Send multicast message. [detail]
let res: Result<Response, Error> = bot.multicast(vec!["xxx", "yyy"], vec![...]);
pub fn narrowcast(
&self,
msgs: Vec<SendMessageType>,
recipient: Option<Recipient>,
filter: Option<Filter>,
limit: Option<Limit>,
notification_disabled: Option<bool>
) -> Result<Response, Error>
[src]
&self,
msgs: Vec<SendMessageType>,
recipient: Option<Recipient>,
filter: Option<Filter>,
limit: Option<Limit>,
notification_disabled: Option<bool>
) -> Result<Response, Error>
Note
Send narrowcast message. [detail]
let res: Result<Response, Error> = bot.narrowcast(vec![...], Some(...), None, Some(...), Some(false));
pub fn get_narrowcast_progress(
&self,
request_id: &str
) -> Result<Response, Error>
[src]
&self,
request_id: &str
) -> Result<Response, Error>
Note
Get narrowcast message status. [detail]
let res: Result<Response, Error> = bot.get_narrowcast_progress("xxxxxxx");
pub fn broadcast(&self, msgs: Vec<SendMessageType>) -> Result<Response, Error>
[src]
pub fn get_content(&self, message_id: &str) -> Result<Response, Error>
[src]
pub fn get_number_of_limit_additional(&self) -> Result<Response, Error>
[src]
Note
Get the target limit for additional messages. [detail]
let res: Result<Response, Error> = bot.get_number_of_limit_additional();
pub fn get_number_of_sent_this_month(&self) -> Result<Response, Error>
[src]
Note
Get number of messages sent this month. [detail]
let res: Result<Response, Error> = bot.get_number_of_sent_this_month();
pub fn get_number_of_sent_reply_messages(
&self,
date: NaiveDate
) -> Result<Response, Error>
[src]
&self,
date: NaiveDate
) -> Result<Response, Error>
Note
Get number of sent reply messages. [detail]
let res: Result<Response, Error> = bot.get_number_of_sent_reply_messages(NaiveDate::from_ymd(2021, 2, 26));
pub fn get_number_of_sent_push_messages(
&self,
date: NaiveDate
) -> Result<Response, Error>
[src]
&self,
date: NaiveDate
) -> Result<Response, Error>
Note
Get number of sent push messages. [detail]
let res: Result<Response, Error> = bot.get_number_of_sent_push_messages(NaiveDate::from_ymd(2021, 2, 26));
pub fn get_number_of_sent_multicast_messages(
&self,
date: NaiveDate
) -> Result<Response, Error>
[src]
&self,
date: NaiveDate
) -> Result<Response, Error>
Note
Get number of sent multicast messages. [detail]
let res: Result<Response, Error> = bot.get_number_of_sent_multicast_messages(NaiveDate::from_ymd(2021, 2, 26));
pub fn get_number_of_sent_broadcast_messages(
&self,
date: NaiveDate
) -> Result<Response, Error>
[src]
&self,
date: NaiveDate
) -> Result<Response, Error>
Note
Get number of sent broadcast messages. [detail]
let res: Result<Response, Error> = bot.get_number_of_sent_broadcast_messages(NaiveDate::from_ymd(2021, 2, 26));
pub fn create_audience_group_for_uploading_user_ids(
&self,
description: &str
) -> Result<Response, Error>
[src]
&self,
description: &str
) -> Result<Response, Error>
Note
TODO: Unimplemented: More Request Body
You can create, update, activate, or delete an audience. Specify the audience when sending narrowcast messages. [detail]
let res: Result<Response, Error> = bot.create_audience_group_for_uploading_user_ids("audienceGroupName");
pub fn create_audience_group_for_uploading_user_ids_by_file(
&self
) -> Result<Response, Error>
[src]
&self
) -> Result<Response, Error>
Note
TODO: Unimplemented: File send
Creates an audience for uploading user IDs. [detail]
let res: Result<Response, Error> = bot.create_audience_group_for_uploading_user_ids_by_file();
pub fn update_audience_group_for_uploading_user_ids(
&self,
audience_group_id: i64,
upload_description: &str,
audiences: Vec<HashMap<String, String>>
) -> Result<Response, Error>
[src]
&self,
audience_group_id: i64,
upload_description: &str,
audiences: Vec<HashMap<String, String>>
) -> Result<Response, Error>
Note
TODO: Create Audience Object
Adds new user IDs or IFAs to an audience for uploading user IDs. [detail]
let mut audience: HashMap<String, String> = HashMap::new(); audience.insert("id".to_string(), "xxxxxxxxxx".to_string()); let res: Result<Response, Error> = bot.update_audience_group_for_uploading_user_ids("4389303728991", "fileName", vec![audience]);
pub fn update_audience_group_for_uploading_user_ids_by_file(
&self
) -> Result<Response, Error>
[src]
&self
) -> Result<Response, Error>
Note
TODO: Unimplemented: File send
Adds new user IDs or IFAs to an audience for uploading user IDs. [detail]
let res: Result<Response, Error> = bot.create_audience_group_for_uploading_user_ids_by_file();
pub fn create_audience_group_for_click(
&self,
description: &str,
request_id: &str,
click_url: Option<String>
) -> Result<Response, Error>
[src]
&self,
description: &str,
request_id: &str,
click_url: Option<String>
) -> Result<Response, Error>
Note
Creates an audience for click-based retargeting. [detail]
let res: Result<Response, Error> = bot.create_audience_group_for_click( "audienceGroupName", "12222", Some(String::from("https://line.me/en")), );
pub fn create_audience_group_for_impression(
&self,
description: &str,
request_id: &str
) -> Result<Response, Error>
[src]
&self,
description: &str,
request_id: &str
) -> Result<Response, Error>
Note
Creates an audience for impression-based retargeting. [detail]
let res: Result<Response, Error> = bot.create_audience_group_for_click("audienceGroupName", "12222");
pub fn rename_audience(
&self,
audience_group_id: &str,
description: &str
) -> Result<Response, Error>
[src]
&self,
audience_group_id: &str,
description: &str
) -> Result<Response, Error>
Note
Renames an existing audience. [detail]
let res: Result<Response, Error> = bot.rename_audience("12222", "audienceGroupName");
pub fn activate_audience(
&self,
audience_group_id: &str
) -> Result<Response, Error>
[src]
&self,
audience_group_id: &str
) -> Result<Response, Error>
Note
Activates a shared audience group.
An activated audience will be inactivated 180 days after activation.
The only audiences that need to be activated in order to use from the Messaging API are those created by LINE Ads and LINE Points Ads (Japanese only). [detail]
let res: Result<Response, Error> = bot.activate_audience("12222");
pub fn delete_audience(
&self,
audience_group_id: &str
) -> Result<Response, Error>
[src]
&self,
audience_group_id: &str
) -> Result<Response, Error>
pub fn get_audience_information(
&self,
audience_group_id: &str
) -> Result<Response, Error>
[src]
&self,
audience_group_id: &str
) -> Result<Response, Error>
Note
Gets audience data. [detail]
let res: Result<Response, Error> = bot.get_audience_information("12222");
pub fn get_many_audience_information(
&self,
page: &str,
description: Option<&str>,
status: Option<&str>,
size: Option<&str>,
includes_external_public_groups: Option<&str>,
create_route: Option<&str>
) -> Result<Response, Error>
[src]
&self,
page: &str,
description: Option<&str>,
status: Option<&str>,
size: Option<&str>,
includes_external_public_groups: Option<&str>,
create_route: Option<&str>
) -> Result<Response, Error>
Note
Gets data for more than one audience. [detail]
let res: Result<Response, Error> = bot.get_many_audience_information( "1", Some("audienceGroupName"), Some("40"), None, Some("OA_MANAGER"), );
pub fn get_audience_authority_level(&self) -> Result<Response, Error>
[src]
Note
Get the authority level of the audience. [detail]
let res: Result<Response, Error> = bot.get_audience_authority_level();
pub fn update_audience_authority_level(
&self,
authority_level: &str
) -> Result<Response, Error>
[src]
&self,
authority_level: &str
) -> Result<Response, Error>
Note
Change the authority level of all audiences created in the same channel. [detail]
let res: Result<Response, Error> = bot.update_audience_authority_level("PRIVATE");
pub fn get_number_of_message_delivery(
&self,
date: NaiveDate
) -> Result<Response, Error>
[src]
&self,
date: NaiveDate
) -> Result<Response, Error>
Note
Returns the number of messages sent from LINE Official Account on a specified day. [detail]
let res: Result<Response, Error> = bot.get_number_of_message_delivery(NaiveDate::from_ymd(2021, 2, 26));
pub fn get_number_of_followers(
&self,
date: NaiveDate
) -> Result<Response, Error>
[src]
&self,
date: NaiveDate
) -> Result<Response, Error>
Note
Returns the number of users who have added the LINE Official Account on or before a specified date. [detail]
let res: Result<Response, Error> = bot.get_number_of_followers(NaiveDate::from_ymd(2021, 2, 26));
pub fn get_friend_demographic(&self) -> Result<Response, Error>
[src]
Note
Retrieves the demographic attributes for a LINE Official Account’s friends.
You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID). [detail]
let res: Result<Response, Error> = bot.get_friend_demographic();
pub fn get_user_interaction_statistics(
&self,
request_id: &str
) -> Result<Response, Error>
[src]
&self,
request_id: &str
) -> Result<Response, Error>
Note
Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. [detail]
let res: Result<Response, Error> = bot.get_user_interaction_statistics("f70dd685-499a-4231-a441-f24b8d4fba21");
pub fn get_follower_ids(
&self,
continuation_token: Option<&str>
) -> Result<Response, Error>
[src]
&self,
continuation_token: Option<&str>
) -> Result<Response, Error>
Note
Gets the list of User IDs of users who have added your LINE Official Account as a friend. [detail]
let res: Result<Response, Error> = bot.get_follower_ids(Some("xxxxxxxxxxxx"));
pub fn get_profile(&self, user_id: &str) -> Result<Profile, &str>
[src]
Note
Get the profile information of users who have added your LINE Official Account as a friend. [detail]
let res: Result<Profile, &str> = bot.get_profile("User ID");
pub fn get_bot_info(&self) -> Result<Response, Error>
[src]
Note
Gets a bot’s basic information. [detail]
let res: Result<Response, Error> = bot.get_bot_info();
pub fn get_group_summary(&self, group_id: &str) -> Result<Response, Error>
[src]
Note
Gets the group ID, group name, and group icon URL of a group where the LINE Official Account is a member. [detail]
let res: Result<Response, Error> = bot.get_group_summary("Group ID");
pub fn get_group_member_count(&self, group_id: &str) -> Result<Response, Error>
[src]
Note
Gets the count of users in a group. You can get the user in group count even if the user hasn’t added the LINE Official Account as a friend or has blocked the LINE Official Account.
The number returned excludes the LINE Official Account. [detail]
let res: Result<Response, Error> = bot.get_group_member_count("Group ID");
pub fn get_group_member_ids(&self, group_id: &str) -> Result<Response, Error>
[src]
Note
Gets the user IDs of the members of a group that the bot is in.
This includes user IDs of users who have not added the LINE Official Account as a friend or has blocked the LINE Official Account. [detail]
let res: Result<Response, Error> = bot.get_group_member_ids("Group ID");
pub fn get_profile_from_group(
&self,
user_id: &str,
group_id: &str
) -> Result<Profile, &str>
[src]
&self,
user_id: &str,
group_id: &str
) -> Result<Profile, &str>
Note
Gets the user profile of a member of a group that the LINE Official Account is in if the user ID of the group member is known.
You can get user profiles of users who haven’t added the LINE Official Account as a friend or have blocked the LINE Official Account. [detail]
let res: Result<Profile, &str> = bot.get_profile_from_group("User ID", "Group ID");
pub fn leave_group(&self, group_id: &str) -> Result<Response, Error>
[src]
pub fn get_room_member_count(&self, room_id: &str) -> Result<Response, Error>
[src]
Note
Gets the count of users in a room. You can get the user in room count even if the user hasn’t added the LINE Official Account as a friend or has blocked the LINE Official Account.
The number returned excludes the LINE Official Account. [detail]
let res: Result<Response, Error> = bot.get_room_member_count("Room ID");
pub fn get_room_member_ids(&self, room_id: &str) -> Result<Response, Error>
[src]
Note
Gets the user IDs of the members of a room that the LINE Official Account is in.
This includes the user IDs of users who have not added the LINE Official Account as a friend or have blocked the LINE Official Account. [detail]
let res: Result<Response, Error> = bot.get_room_member_ids("Room ID");
pub fn get_profile_from_room(
&self,
user_id: &str,
room_id: &str
) -> Result<Profile, &str>
[src]
&self,
user_id: &str,
room_id: &str
) -> Result<Profile, &str>
Note
Gets the user profile of a member of a room that the LINE Official Account is in if the user ID of the room member is known.
You can get user profiles of users who have not added the LINE Official Account as a friend or have blocked the LINE Official Account. [detail]
let res: Result<Profile, &str> = bot.get_profile_from_room("User ID", "Room ID");
pub fn leave_room(&self, room_id: &str) -> Result<Response, Error>
[src]
pub fn issue_link_token(&self, user_id: &str) -> Result<Response, Error>
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for LineBot
impl Send for LineBot
impl Sync for LineBot
impl Unpin for LineBot
impl !UnwindSafe for LineBot
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,