Skip to content

Commit

Permalink
Generate line bot modules (#53)
Browse files Browse the repository at this point in the history
Co-authored-by: nanato12 <[email protected]>
  • Loading branch information
github-actions[bot] and nanato12 authored Apr 20, 2024
1 parent 6081116 commit 779711a
Show file tree
Hide file tree
Showing 18 changed files with 692 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/line_messaging_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Class | Method | HTTP request | Description
*MessagingApiApi* | [**get_group_member_profile**](docs/MessagingApiApi.md#get_group_member_profile) | **Get** /v2/bot/group/{groupId}/member/{userId} |
*MessagingApiApi* | [**get_group_members_ids**](docs/MessagingApiApi.md#get_group_members_ids) | **Get** /v2/bot/group/{groupId}/members/ids |
*MessagingApiApi* | [**get_group_summary**](docs/MessagingApiApi.md#get_group_summary) | **Get** /v2/bot/group/{groupId}/summary |
*MessagingApiApi* | [**get_membership_list**](docs/MessagingApiApi.md#get_membership_list) | **Get** /v2/bot/membership/list |
*MessagingApiApi* | [**get_membership_subscription**](docs/MessagingApiApi.md#get_membership_subscription) | **Get** /v2/bot/membership/subscription/{userId} |
*MessagingApiApi* | [**get_message_quota**](docs/MessagingApiApi.md#get_message_quota) | **Get** /v2/bot/message/quota |
*MessagingApiApi* | [**get_message_quota_consumption**](docs/MessagingApiApi.md#get_message_quota_consumption) | **Get** /v2/bot/message/quota/consumption |
*MessagingApiApi* | [**get_narrowcast_progress**](docs/MessagingApiApi.md#get_narrowcast_progress) | **Get** /v2/bot/message/progress/narrowcast |
Expand Down Expand Up @@ -75,6 +77,7 @@ Class | Method | HTTP request | Description
*MessagingApiApi* | [**rich_menu_batch**](docs/MessagingApiApi.md#rich_menu_batch) | **Post** /v2/bot/richmenu/batch |
*MessagingApiApi* | [**set_default_rich_menu**](docs/MessagingApiApi.md#set_default_rich_menu) | **Post** /v2/bot/user/all/richmenu/{richMenuId} |
*MessagingApiApi* | [**set_webhook_endpoint**](docs/MessagingApiApi.md#set_webhook_endpoint) | **Put** /v2/bot/channel/webhook/endpoint |
*MessagingApiApi* | [**show_loading_animation**](docs/MessagingApiApi.md#show_loading_animation) | **Post** /v2/bot/chat/loading/start |
*MessagingApiApi* | [**test_webhook_endpoint**](docs/MessagingApiApi.md#test_webhook_endpoint) | **Post** /v2/bot/channel/webhook/test |
*MessagingApiApi* | [**unlink_rich_menu_id_from_user**](docs/MessagingApiApi.md#unlink_rich_menu_id_from_user) | **Delete** /v2/bot/user/{userId}/richmenu |
*MessagingApiApi* | [**unlink_rich_menu_id_from_users**](docs/MessagingApiApi.md#unlink_rich_menu_id_from_users) | **Post** /v2/bot/richmenu/bulk/unlink |
Expand Down Expand Up @@ -157,6 +160,7 @@ Class | Method | HTTP request | Description
- [GetAggregationUnitNameListResponse](docs/GetAggregationUnitNameListResponse.md)
- [GetAggregationUnitUsageResponse](docs/GetAggregationUnitUsageResponse.md)
- [GetFollowersResponse](docs/GetFollowersResponse.md)
- [GetMembershipSubscriptionResponse](docs/GetMembershipSubscriptionResponse.md)
- [GetMessageContentTranscodingResponse](docs/GetMessageContentTranscodingResponse.md)
- [GetWebhookEndpointResponse](docs/GetWebhookEndpointResponse.md)
- [GroupMemberCountResponse](docs/GroupMemberCountResponse.md)
Expand All @@ -177,6 +181,8 @@ Class | Method | HTTP request | Description
- [LocationMessage](docs/LocationMessage.md)
- [MarkMessagesAsReadRequest](docs/MarkMessagesAsReadRequest.md)
- [MembersIdsResponse](docs/MembersIdsResponse.md)
- [Membership](docs/Membership.md)
- [MembershipListResponse](docs/MembershipListResponse.md)
- [Message](docs/Message.md)
- [MessageAction](docs/MessageAction.md)
- [MessageImagemapAction](docs/MessageImagemapAction.md)
Expand Down Expand Up @@ -223,7 +229,11 @@ Class | Method | HTTP request | Description
- [Sender](docs/Sender.md)
- [SentMessage](docs/SentMessage.md)
- [SetWebhookEndpointRequest](docs/SetWebhookEndpointRequest.md)
- [ShowLoadingAnimationRequest](docs/ShowLoadingAnimationRequest.md)
- [StickerMessage](docs/StickerMessage.md)
- [SubscribedMembershipPlan](docs/SubscribedMembershipPlan.md)
- [SubscribedMembershipUser](docs/SubscribedMembershipUser.md)
- [Subscription](docs/Subscription.md)
- [SubscriptionPeriodDemographic](docs/SubscriptionPeriodDemographic.md)
- [SubscriptionPeriodDemographicFilter](docs/SubscriptionPeriodDemographicFilter.md)
- [Template](docs/Template.md)
Expand Down
11 changes: 11 additions & 0 deletions core/line_messaging_api/docs/GetMembershipSubscriptionResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# GetMembershipSubscriptionResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**subscriptions** | [**Vec<crate::models::Subscription>**](Subscription.md) | List of subscription information |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


20 changes: 20 additions & 0 deletions core/line_messaging_api/docs/Membership.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Membership

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**membership_id** | **i32** | Membership plan ID. |
**title** | **String** | Membership plan name. |
**description** | **String** | Membership plan description. |
**benefits** | **Vec<String>** | List of membership plan perks. |
**price** | **f64** | Monthly fee for membership plan. (e.g. 1500.00) |
**currency** | **String** | The currency of membership.price. |
**member_count** | **i32** | Number of members subscribed to the membership plan. |
**member_limit** | Option<**i32**> | The upper limit of members who can subscribe. If no upper limit is set, it will be null. |
**is_in_app_purchase** | **bool** | Payment method for users who subscribe to a membership plan. |
**is_published** | **bool** | Membership plan status. |

[[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 changes: 11 additions & 0 deletions core/line_messaging_api/docs/MembershipListResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# MembershipListResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**memberships** | [**Vec<crate::models::Membership>**](Membership.md) | List of membership information |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


90 changes: 90 additions & 0 deletions core/line_messaging_api/docs/MessagingApiApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Method | HTTP request | Description
[**get_group_member_profile**](MessagingApiApi.md#get_group_member_profile) | **Get** /v2/bot/group/{groupId}/member/{userId} |
[**get_group_members_ids**](MessagingApiApi.md#get_group_members_ids) | **Get** /v2/bot/group/{groupId}/members/ids |
[**get_group_summary**](MessagingApiApi.md#get_group_summary) | **Get** /v2/bot/group/{groupId}/summary |
[**get_membership_list**](MessagingApiApi.md#get_membership_list) | **Get** /v2/bot/membership/list |
[**get_membership_subscription**](MessagingApiApi.md#get_membership_subscription) | **Get** /v2/bot/membership/subscription/{userId} |
[**get_message_quota**](MessagingApiApi.md#get_message_quota) | **Get** /v2/bot/message/quota |
[**get_message_quota_consumption**](MessagingApiApi.md#get_message_quota_consumption) | **Get** /v2/bot/message/quota/consumption |
[**get_narrowcast_progress**](MessagingApiApi.md#get_narrowcast_progress) | **Get** /v2/bot/message/progress/narrowcast |
Expand Down Expand Up @@ -54,6 +56,7 @@ Method | HTTP request | Description
[**rich_menu_batch**](MessagingApiApi.md#rich_menu_batch) | **Post** /v2/bot/richmenu/batch |
[**set_default_rich_menu**](MessagingApiApi.md#set_default_rich_menu) | **Post** /v2/bot/user/all/richmenu/{richMenuId} |
[**set_webhook_endpoint**](MessagingApiApi.md#set_webhook_endpoint) | **Put** /v2/bot/channel/webhook/endpoint |
[**show_loading_animation**](MessagingApiApi.md#show_loading_animation) | **Post** /v2/bot/chat/loading/start |
[**test_webhook_endpoint**](MessagingApiApi.md#test_webhook_endpoint) | **Post** /v2/bot/channel/webhook/test |
[**unlink_rich_menu_id_from_user**](MessagingApiApi.md#unlink_rich_menu_id_from_user) | **Delete** /v2/bot/user/{userId}/richmenu |
[**unlink_rich_menu_id_from_users**](MessagingApiApi.md#unlink_rich_menu_id_from_users) | **Post** /v2/bot/richmenu/bulk/unlink |
Expand Down Expand Up @@ -571,6 +574,63 @@ Name | Type | Description | Required | Notes
[[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)


## get_membership_list

> crate::models::MembershipListResponse get_membership_list()

Get a list of memberships.

### Parameters

This endpoint does not need any parameter.

### Return type

[**crate::models::MembershipListResponse**](MembershipListResponse.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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)


## get_membership_subscription

> crate::models::GetMembershipSubscriptionResponse get_membership_subscription(user_id)

Get a user's membership subscription.

### Parameters


Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**user_id** | **String** | User ID | [required] |

### Return type

[**crate::models::GetMembershipSubscriptionResponse**](GetMembershipSubscriptionResponse.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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)


## get_message_quota

> crate::models::MessageQuotaResponse get_message_quota()
Expand Down Expand Up @@ -1553,6 +1613,36 @@ Name | Type | Description | Required | Notes
[[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)


## show_loading_animation

> serde_json::Value show_loading_animation(show_loading_animation_request)

Display a loading animation in one-on-one chats between users and LINE Official Accounts.

### Parameters


Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**show_loading_animation_request** | [**ShowLoadingAnimationRequest**](ShowLoadingAnimationRequest.md) | | [required] |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)


## test_webhook_endpoint

> crate::models::TestWebhookEndpointResponse test_webhook_endpoint(test_webhook_endpoint_request)
Expand Down
12 changes: 12 additions & 0 deletions core/line_messaging_api/docs/ShowLoadingAnimationRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ShowLoadingAnimationRequest

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**chat_id** | **String** | User ID of the target user for whom the loading animation is to be displayed. |
**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]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


16 changes: 16 additions & 0 deletions core/line_messaging_api/docs/SubscribedMembershipPlan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SubscribedMembershipPlan

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**membership_id** | **i32** | Membership plan ID. |
**title** | **String** | Membership plan name. |
**description** | **String** | Membership plan description. |
**benefits** | **Vec<String>** | List of membership plan perks. |
**price** | **f64** | Monthly fee for membership plan. (e.g. 1500.00) |
**currency** | **String** | The currency of membership.price. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


14 changes: 14 additions & 0 deletions core/line_messaging_api/docs/SubscribedMembershipUser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SubscribedMembershipUser

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**membership_no** | **i32** | The user's member number in the membership plan. |
**joined_time** | **i32** | UNIX timestamp at which the user subscribed to the membership. |
**next_billing_date** | **String** | Next payment date for membership plan. - Format: yyyy-MM-dd (e.g. 2024-02-08) - Timezone: UTC+9 |
**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. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions core/line_messaging_api/docs/Subscription.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Subscription

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**membership** | [**crate::models::SubscribedMembershipPlan**](SubscribedMembershipPlan.md) | |
**user** | [**crate::models::SubscribedMembershipUser**](SubscribedMembershipUser.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


55 changes: 55 additions & 0 deletions core/line_messaging_api/src/apis/messaging_api_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ pub trait MessagingApiApi {
&self,
group_id: &str,
) -> Pin<Box<dyn Future<Output = Result<crate::models::GroupSummaryResponse, Error>>>>;
fn get_membership_list(
&self,
) -> Pin<Box<dyn Future<Output = Result<crate::models::MembershipListResponse, Error>>>>;
fn get_membership_subscription(
&self,
user_id: &str,
) -> Pin<
Box<dyn Future<Output = Result<crate::models::GetMembershipSubscriptionResponse, Error>>>,
>;
fn get_message_quota(
&self,
) -> Pin<Box<dyn Future<Output = Result<crate::models::MessageQuotaResponse, Error>>>>;
Expand Down Expand Up @@ -250,6 +259,10 @@ pub trait MessagingApiApi {
&self,
set_webhook_endpoint_request: crate::models::SetWebhookEndpointRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Error>>>>;
fn show_loading_animation(
&self,
show_loading_animation_request: crate::models::ShowLoadingAnimationRequest,
) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>>>>;
fn test_webhook_endpoint(
&self,
test_webhook_endpoint_request: Option<crate::models::TestWebhookEndpointRequest>,
Expand Down Expand Up @@ -563,6 +576,34 @@ where
req.execute(self.configuration.borrow())
}

#[allow(unused_mut)]
fn get_membership_list(
&self,
) -> Pin<Box<dyn Future<Output = Result<crate::models::MembershipListResponse, Error>>>> {
let mut req = __internal_request::Request::new(
hyper::Method::GET,
"/v2/bot/membership/list".to_string(),
);

req.execute(self.configuration.borrow())
}

#[allow(unused_mut)]
fn get_membership_subscription(
&self,
user_id: &str,
) -> Pin<
Box<dyn Future<Output = Result<crate::models::GetMembershipSubscriptionResponse, Error>>>,
> {
let mut req = __internal_request::Request::new(
hyper::Method::GET,
"/v2/bot/membership/subscription/{userId}".to_string(),
);
req = req.with_path_param("userId".to_string(), user_id.to_string());

req.execute(self.configuration.borrow())
}

#[allow(unused_mut)]
fn get_message_quota(
&self,
Expand Down Expand Up @@ -1048,6 +1089,20 @@ where
req.execute(self.configuration.borrow())
}

#[allow(unused_mut)]
fn show_loading_animation(
&self,
show_loading_animation_request: crate::models::ShowLoadingAnimationRequest,
) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>>>> {
let mut req = __internal_request::Request::new(
hyper::Method::POST,
"/v2/bot/chat/loading/start".to_string(),
);
req = req.with_body_param(show_loading_animation_request);

req.execute(self.configuration.borrow())
}

#[allow(unused_mut)]
fn test_webhook_endpoint(
&self,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (C) 2016 LINE Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* LINE Messaging API
*
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.2
*
* Generated by: https://openapi-generator.tech
*/

/// GetMembershipSubscriptionResponse : A user's membership subscription status
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetMembershipSubscriptionResponse {
/// List of subscription information
#[serde(rename = "subscriptions")]
pub subscriptions: Vec<crate::models::Subscription>,
}

impl GetMembershipSubscriptionResponse {
/// A user's membership subscription status
pub fn new(
subscriptions: Vec<crate::models::Subscription>,
) -> GetMembershipSubscriptionResponse {
GetMembershipSubscriptionResponse { subscriptions }
}
}
Loading

0 comments on commit 779711a

Please sign in to comment.