You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**v1.30.0 includes both the v1 and v2 codebases.**
8
5
9
-
**v2 has significant breaking changes** because it's a completely new implementation with an entirely different interface.
10
-
As a result, any implementation based on the previous codebase will no longer function.
6
+
## Introduction
7
+
The LINE Messaging API SDK for Ruby makes it easy to develop bots using LINE Messaging API, and you can create a sample bot within minutes.
11
8
12
-
**New users should always use v2.**
13
-
And **we strongly recommend migrating to v2.**
9
+
## Documentation
14
10
15
-
## Why you should use v2
16
-
### Support All Messaging API Features
17
-
**v2 now supports every API endpoints and Webhook event types that were previously unimplemented.**
18
-
Future API additions will be rapidly integrated, ensuring your application always stays up-to-date with the latest features by using `line-bot-api` gem.
11
+
See the official API documentation for more information
19
12
20
-
Because v2 is automatically generated from [https://github.com/line/line-openapi](https://github.com/line/line-openapi), same with SDKs provided for other programming languages.
### RBS Support for Enhanced Development Experience
23
-
**v2 comes with [RBS (Ruby Signature)](https://github.com/ruby/rbs) support**, enabling you to leverage type checking and other type-based development features for a more robust coding experience.
16
+
Also, generated documentation by YARD is available.
24
17
25
-
# Migration Guide: From v1 to v2
18
+
-https://rubydoc.info/gems/line-bot-api
26
19
27
-
Users can perform the migration step at their own pace. Follow these steps:
20
+
## Requirements
21
+
This library requires Ruby 3.2 or later.
28
22
29
-
1. Upgrade the `line-bot-api` gem to `1.30.0`.
30
-
2. Migrate v1 code to v2 code. All v1 code issues deprecation warnings, so please migrate until they are gone. Since v1.30.0 includes all v1 and v2 code, you don't have to replace everything at once. You can switch gradually.
31
-
3. Once all code is switched, upgrade `line-bot-api` to `2.0.0` or above.
23
+
## Installation
32
24
33
-
## Change all v1 implementations to v2 implementations in v1.30.0
34
-
**v1.30.0 includes both the v1 and v2 codebases.**
25
+
Add this line to your application's Gemfile:
35
26
36
-
When you use the v1 code in v1.30.0, you will see deprecation warnings such as:
37
-
38
-
```
39
-
[DEPRECATION] Line::Bot::Client#push_message is deprecated. Please use Line::Bot::V2::MessagingApi::ApiClient#push_message instead.
27
+
```ruby
28
+
gem 'line-bot-api'
40
29
```
41
30
42
-
These warnings indicate which methods to use in the new v2 code.
43
-
44
-
Alternatively, the YARD documentation/comments also clearly indicate where to migrate.
- An example for implementing and managing rich menus as described in the [Messaging API - Using Rich Menus](https://developers.line.biz/en/docs/messaging-api/using-rich-menus/).
We welcome [feedback](https://github.com/line/line-bot-sdk-ruby/issues) and [contributions](https://github.com/line/line-bot-sdk-ruby/blob/master/CONTRIBUTING.md).
0 commit comments