Skip to content

Commit 779711a

Browse files
Generate line bot modules (#53)
Co-authored-by: nanato12 <[email protected]>
1 parent 6081116 commit 779711a

18 files changed

+692
-0
lines changed

core/line_messaging_api/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Class | Method | HTTP request | Description
4242
*MessagingApiApi* | [**get_group_member_profile**](docs/MessagingApiApi.md#get_group_member_profile) | **Get** /v2/bot/group/{groupId}/member/{userId} |
4343
*MessagingApiApi* | [**get_group_members_ids**](docs/MessagingApiApi.md#get_group_members_ids) | **Get** /v2/bot/group/{groupId}/members/ids |
4444
*MessagingApiApi* | [**get_group_summary**](docs/MessagingApiApi.md#get_group_summary) | **Get** /v2/bot/group/{groupId}/summary |
45+
*MessagingApiApi* | [**get_membership_list**](docs/MessagingApiApi.md#get_membership_list) | **Get** /v2/bot/membership/list |
46+
*MessagingApiApi* | [**get_membership_subscription**](docs/MessagingApiApi.md#get_membership_subscription) | **Get** /v2/bot/membership/subscription/{userId} |
4547
*MessagingApiApi* | [**get_message_quota**](docs/MessagingApiApi.md#get_message_quota) | **Get** /v2/bot/message/quota |
4648
*MessagingApiApi* | [**get_message_quota_consumption**](docs/MessagingApiApi.md#get_message_quota_consumption) | **Get** /v2/bot/message/quota/consumption |
4749
*MessagingApiApi* | [**get_narrowcast_progress**](docs/MessagingApiApi.md#get_narrowcast_progress) | **Get** /v2/bot/message/progress/narrowcast |
@@ -75,6 +77,7 @@ Class | Method | HTTP request | Description
7577
*MessagingApiApi* | [**rich_menu_batch**](docs/MessagingApiApi.md#rich_menu_batch) | **Post** /v2/bot/richmenu/batch |
7678
*MessagingApiApi* | [**set_default_rich_menu**](docs/MessagingApiApi.md#set_default_rich_menu) | **Post** /v2/bot/user/all/richmenu/{richMenuId} |
7779
*MessagingApiApi* | [**set_webhook_endpoint**](docs/MessagingApiApi.md#set_webhook_endpoint) | **Put** /v2/bot/channel/webhook/endpoint |
80+
*MessagingApiApi* | [**show_loading_animation**](docs/MessagingApiApi.md#show_loading_animation) | **Post** /v2/bot/chat/loading/start |
7881
*MessagingApiApi* | [**test_webhook_endpoint**](docs/MessagingApiApi.md#test_webhook_endpoint) | **Post** /v2/bot/channel/webhook/test |
7982
*MessagingApiApi* | [**unlink_rich_menu_id_from_user**](docs/MessagingApiApi.md#unlink_rich_menu_id_from_user) | **Delete** /v2/bot/user/{userId}/richmenu |
8083
*MessagingApiApi* | [**unlink_rich_menu_id_from_users**](docs/MessagingApiApi.md#unlink_rich_menu_id_from_users) | **Post** /v2/bot/richmenu/bulk/unlink |
@@ -157,6 +160,7 @@ Class | Method | HTTP request | Description
157160
- [GetAggregationUnitNameListResponse](docs/GetAggregationUnitNameListResponse.md)
158161
- [GetAggregationUnitUsageResponse](docs/GetAggregationUnitUsageResponse.md)
159162
- [GetFollowersResponse](docs/GetFollowersResponse.md)
163+
- [GetMembershipSubscriptionResponse](docs/GetMembershipSubscriptionResponse.md)
160164
- [GetMessageContentTranscodingResponse](docs/GetMessageContentTranscodingResponse.md)
161165
- [GetWebhookEndpointResponse](docs/GetWebhookEndpointResponse.md)
162166
- [GroupMemberCountResponse](docs/GroupMemberCountResponse.md)
@@ -177,6 +181,8 @@ Class | Method | HTTP request | Description
177181
- [LocationMessage](docs/LocationMessage.md)
178182
- [MarkMessagesAsReadRequest](docs/MarkMessagesAsReadRequest.md)
179183
- [MembersIdsResponse](docs/MembersIdsResponse.md)
184+
- [Membership](docs/Membership.md)
185+
- [MembershipListResponse](docs/MembershipListResponse.md)
180186
- [Message](docs/Message.md)
181187
- [MessageAction](docs/MessageAction.md)
182188
- [MessageImagemapAction](docs/MessageImagemapAction.md)
@@ -223,7 +229,11 @@ Class | Method | HTTP request | Description
223229
- [Sender](docs/Sender.md)
224230
- [SentMessage](docs/SentMessage.md)
225231
- [SetWebhookEndpointRequest](docs/SetWebhookEndpointRequest.md)
232+
- [ShowLoadingAnimationRequest](docs/ShowLoadingAnimationRequest.md)
226233
- [StickerMessage](docs/StickerMessage.md)
234+
- [SubscribedMembershipPlan](docs/SubscribedMembershipPlan.md)
235+
- [SubscribedMembershipUser](docs/SubscribedMembershipUser.md)
236+
- [Subscription](docs/Subscription.md)
227237
- [SubscriptionPeriodDemographic](docs/SubscriptionPeriodDemographic.md)
228238
- [SubscriptionPeriodDemographicFilter](docs/SubscriptionPeriodDemographicFilter.md)
229239
- [Template](docs/Template.md)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# GetMembershipSubscriptionResponse
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**subscriptions** | [**Vec<crate::models::Subscription>**](Subscription.md) | List of subscription information |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Membership
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**membership_id** | **i32** | Membership plan ID. |
8+
**title** | **String** | Membership plan name. |
9+
**description** | **String** | Membership plan description. |
10+
**benefits** | **Vec<String>** | List of membership plan perks. |
11+
**price** | **f64** | Monthly fee for membership plan. (e.g. 1500.00) |
12+
**currency** | **String** | The currency of membership.price. |
13+
**member_count** | **i32** | Number of members subscribed to the membership plan. |
14+
**member_limit** | Option<**i32**> | The upper limit of members who can subscribe. If no upper limit is set, it will be null. |
15+
**is_in_app_purchase** | **bool** | Payment method for users who subscribe to a membership plan. |
16+
**is_published** | **bool** | Membership plan status. |
17+
18+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
19+
20+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# MembershipListResponse
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**memberships** | [**Vec<crate::models::Membership>**](Membership.md) | List of membership information |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

core/line_messaging_api/docs/MessagingApiApi.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Method | HTTP request | Description
2121
[**get_group_member_profile**](MessagingApiApi.md#get_group_member_profile) | **Get** /v2/bot/group/{groupId}/member/{userId} |
2222
[**get_group_members_ids**](MessagingApiApi.md#get_group_members_ids) | **Get** /v2/bot/group/{groupId}/members/ids |
2323
[**get_group_summary**](MessagingApiApi.md#get_group_summary) | **Get** /v2/bot/group/{groupId}/summary |
24+
[**get_membership_list**](MessagingApiApi.md#get_membership_list) | **Get** /v2/bot/membership/list |
25+
[**get_membership_subscription**](MessagingApiApi.md#get_membership_subscription) | **Get** /v2/bot/membership/subscription/{userId} |
2426
[**get_message_quota**](MessagingApiApi.md#get_message_quota) | **Get** /v2/bot/message/quota |
2527
[**get_message_quota_consumption**](MessagingApiApi.md#get_message_quota_consumption) | **Get** /v2/bot/message/quota/consumption |
2628
[**get_narrowcast_progress**](MessagingApiApi.md#get_narrowcast_progress) | **Get** /v2/bot/message/progress/narrowcast |
@@ -54,6 +56,7 @@ Method | HTTP request | Description
5456
[**rich_menu_batch**](MessagingApiApi.md#rich_menu_batch) | **Post** /v2/bot/richmenu/batch |
5557
[**set_default_rich_menu**](MessagingApiApi.md#set_default_rich_menu) | **Post** /v2/bot/user/all/richmenu/{richMenuId} |
5658
[**set_webhook_endpoint**](MessagingApiApi.md#set_webhook_endpoint) | **Put** /v2/bot/channel/webhook/endpoint |
59+
[**show_loading_animation**](MessagingApiApi.md#show_loading_animation) | **Post** /v2/bot/chat/loading/start |
5760
[**test_webhook_endpoint**](MessagingApiApi.md#test_webhook_endpoint) | **Post** /v2/bot/channel/webhook/test |
5861
[**unlink_rich_menu_id_from_user**](MessagingApiApi.md#unlink_rich_menu_id_from_user) | **Delete** /v2/bot/user/{userId}/richmenu |
5962
[**unlink_rich_menu_id_from_users**](MessagingApiApi.md#unlink_rich_menu_id_from_users) | **Post** /v2/bot/richmenu/bulk/unlink |
@@ -571,6 +574,63 @@ Name | Type | Description | Required | Notes
571574
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
572575

573576

577+
## get_membership_list
578+
579+
> crate::models::MembershipListResponse get_membership_list()
580+
581+
582+
Get a list of memberships.
583+
584+
### Parameters
585+
586+
This endpoint does not need any parameter.
587+
588+
### Return type
589+
590+
[**crate::models::MembershipListResponse**](MembershipListResponse.md)
591+
592+
### Authorization
593+
594+
[Bearer](../README.md#Bearer)
595+
596+
### HTTP request headers
597+
598+
- **Content-Type**: Not defined
599+
- **Accept**: application/json
600+
601+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
602+
603+
604+
## get_membership_subscription
605+
606+
> crate::models::GetMembershipSubscriptionResponse get_membership_subscription(user_id)
607+
608+
609+
Get a user's membership subscription.
610+
611+
### Parameters
612+
613+
614+
Name | Type | Description | Required | Notes
615+
------------- | ------------- | ------------- | ------------- | -------------
616+
**user_id** | **String** | User ID | [required] |
617+
618+
### Return type
619+
620+
[**crate::models::GetMembershipSubscriptionResponse**](GetMembershipSubscriptionResponse.md)
621+
622+
### Authorization
623+
624+
[Bearer](../README.md#Bearer)
625+
626+
### HTTP request headers
627+
628+
- **Content-Type**: Not defined
629+
- **Accept**: application/json
630+
631+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
632+
633+
574634
## get_message_quota
575635

576636
> crate::models::MessageQuotaResponse get_message_quota()
@@ -1553,6 +1613,36 @@ Name | Type | Description | Required | Notes
15531613
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
15541614

15551615

1616+
## show_loading_animation
1617+
1618+
> serde_json::Value show_loading_animation(show_loading_animation_request)
1619+
1620+
1621+
Display a loading animation in one-on-one chats between users and LINE Official Accounts.
1622+
1623+
### Parameters
1624+
1625+
1626+
Name | Type | Description | Required | Notes
1627+
------------- | ------------- | ------------- | ------------- | -------------
1628+
**show_loading_animation_request** | [**ShowLoadingAnimationRequest**](ShowLoadingAnimationRequest.md) | | [required] |
1629+
1630+
### Return type
1631+
1632+
[**serde_json::Value**](serde_json::Value.md)
1633+
1634+
### Authorization
1635+
1636+
[Bearer](../README.md#Bearer)
1637+
1638+
### HTTP request headers
1639+
1640+
- **Content-Type**: application/json
1641+
- **Accept**: application/json
1642+
1643+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
1644+
1645+
15561646
## test_webhook_endpoint
15571647

15581648
> crate::models::TestWebhookEndpointResponse test_webhook_endpoint(test_webhook_endpoint_request)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ShowLoadingAnimationRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**chat_id** | **String** | User ID of the target user for whom the loading animation is to be displayed. |
8+
**loading_seconds** | Option<**i32**> | The number of seconds to display the loading indicator. It must be a multiple of 5. The maximum value is 60 seconds. | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SubscribedMembershipPlan
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**membership_id** | **i32** | Membership plan ID. |
8+
**title** | **String** | Membership plan name. |
9+
**description** | **String** | Membership plan description. |
10+
**benefits** | **Vec<String>** | List of membership plan perks. |
11+
**price** | **f64** | Monthly fee for membership plan. (e.g. 1500.00) |
12+
**currency** | **String** | The currency of membership.price. |
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SubscribedMembershipUser
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**membership_no** | **i32** | The user's member number in the membership plan. |
8+
**joined_time** | **i32** | UNIX timestamp at which the user subscribed to the membership. |
9+
**next_billing_date** | **String** | Next payment date for membership plan. - Format: yyyy-MM-dd (e.g. 2024-02-08) - Timezone: UTC+9 |
10+
**total_subscription_months** | **i32** | The period of time in months that the user has been subscribed to a membership plan. If a user previously canceled and then re-subscribed to the same membership plan, only the period after the re-subscription will be counted. |
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Subscription
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**membership** | [**crate::models::SubscribedMembershipPlan**](SubscribedMembershipPlan.md) | |
8+
**user** | [**crate::models::SubscribedMembershipUser**](SubscribedMembershipUser.md) | |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

core/line_messaging_api/src/apis/messaging_api_api.rs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,15 @@ pub trait MessagingApiApi {
122122
&self,
123123
group_id: &str,
124124
) -> Pin<Box<dyn Future<Output = Result<crate::models::GroupSummaryResponse, Error>>>>;
125+
fn get_membership_list(
126+
&self,
127+
) -> Pin<Box<dyn Future<Output = Result<crate::models::MembershipListResponse, Error>>>>;
128+
fn get_membership_subscription(
129+
&self,
130+
user_id: &str,
131+
) -> Pin<
132+
Box<dyn Future<Output = Result<crate::models::GetMembershipSubscriptionResponse, Error>>>,
133+
>;
125134
fn get_message_quota(
126135
&self,
127136
) -> Pin<Box<dyn Future<Output = Result<crate::models::MessageQuotaResponse, Error>>>>;
@@ -250,6 +259,10 @@ pub trait MessagingApiApi {
250259
&self,
251260
set_webhook_endpoint_request: crate::models::SetWebhookEndpointRequest,
252261
) -> Pin<Box<dyn Future<Output = Result<(), Error>>>>;
262+
fn show_loading_animation(
263+
&self,
264+
show_loading_animation_request: crate::models::ShowLoadingAnimationRequest,
265+
) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>>>>;
253266
fn test_webhook_endpoint(
254267
&self,
255268
test_webhook_endpoint_request: Option<crate::models::TestWebhookEndpointRequest>,
@@ -563,6 +576,34 @@ where
563576
req.execute(self.configuration.borrow())
564577
}
565578

579+
#[allow(unused_mut)]
580+
fn get_membership_list(
581+
&self,
582+
) -> Pin<Box<dyn Future<Output = Result<crate::models::MembershipListResponse, Error>>>> {
583+
let mut req = __internal_request::Request::new(
584+
hyper::Method::GET,
585+
"/v2/bot/membership/list".to_string(),
586+
);
587+
588+
req.execute(self.configuration.borrow())
589+
}
590+
591+
#[allow(unused_mut)]
592+
fn get_membership_subscription(
593+
&self,
594+
user_id: &str,
595+
) -> Pin<
596+
Box<dyn Future<Output = Result<crate::models::GetMembershipSubscriptionResponse, Error>>>,
597+
> {
598+
let mut req = __internal_request::Request::new(
599+
hyper::Method::GET,
600+
"/v2/bot/membership/subscription/{userId}".to_string(),
601+
);
602+
req = req.with_path_param("userId".to_string(), user_id.to_string());
603+
604+
req.execute(self.configuration.borrow())
605+
}
606+
566607
#[allow(unused_mut)]
567608
fn get_message_quota(
568609
&self,
@@ -1048,6 +1089,20 @@ where
10481089
req.execute(self.configuration.borrow())
10491090
}
10501091

1092+
#[allow(unused_mut)]
1093+
fn show_loading_animation(
1094+
&self,
1095+
show_loading_animation_request: crate::models::ShowLoadingAnimationRequest,
1096+
) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>>>> {
1097+
let mut req = __internal_request::Request::new(
1098+
hyper::Method::POST,
1099+
"/v2/bot/chat/loading/start".to_string(),
1100+
);
1101+
req = req.with_body_param(show_loading_animation_request);
1102+
1103+
req.execute(self.configuration.borrow())
1104+
}
1105+
10511106
#[allow(unused_mut)]
10521107
fn test_webhook_endpoint(
10531108
&self,
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (C) 2016 LINE Corp.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/*
18+
* LINE Messaging API
19+
*
20+
* This document describes LINE Messaging API.
21+
*
22+
* The version of the OpenAPI document: 0.0.2
23+
*
24+
* Generated by: https://openapi-generator.tech
25+
*/
26+
27+
/// GetMembershipSubscriptionResponse : A user's membership subscription status
28+
29+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
30+
pub struct GetMembershipSubscriptionResponse {
31+
/// List of subscription information
32+
#[serde(rename = "subscriptions")]
33+
pub subscriptions: Vec<crate::models::Subscription>,
34+
}
35+
36+
impl GetMembershipSubscriptionResponse {
37+
/// A user's membership subscription status
38+
pub fn new(
39+
subscriptions: Vec<crate::models::Subscription>,
40+
) -> GetMembershipSubscriptionResponse {
41+
GetMembershipSubscriptionResponse { subscriptions }
42+
}
43+
}

0 commit comments

Comments
 (0)