Overview
v2.0.0 is a completely new version.
- The previous code released up to v1.29.1 will be called "v1",
- The new code released as v2.0.0 and later versions will be called "v2".
v2 has significant breaking changes because it's a completely new implementation with an entirely different interface.
As a result, any implementation based on the previous codebase will no longer function.
If you already use v1, please use the transitional version v1.30.0 and do the migration.
Migration guide: https://github.com/line/line-bot-sdk-ruby/releases/tag/v1.30.0
New users should always use v2.
And we strongly recommend migrating to v2.
Why you should use v2
Support All Messaging API Features
v2 now supports every API endpoints and Webhook event types that were previously unimplemented.
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.
Because v2 is automatically generated from https://github.com/line/line-openapi, same with SDKs provided for other programming languages.
RBS Support for Enhanced Development Experience
v2 comes with RBS (Ruby Signature) support, enabling you to leverage type checking and other type-based development features for a more robust coding experience.
Examples
There are several examples available for v2 to assist you in your implementation.
-
Simple Echo Bot
- A straightforward example demonstrating an echo bot implementation.
- https://github.com/line/line-bot-sdk-ruby/tree/master/examples/v2/echobot
-
Rich Menu
- An example for implementing and managing rich menus as described in the Messaging API - Using Rich Menus.
- https://github.com/line/line-bot-sdk-ruby/tree/master/examples/v2/rich_menu
-
Channel Access Token
- An example of issuing and revoking channel access tokens.
- https://github.com/line/line-bot-sdk-ruby/tree/master/examples/v2/channel_access_token
-
Audience
- An example of using the API of the Audience feature to group users for delivery.
- https://github.com/line/line-bot-sdk-ruby/tree/master/examples/v2/audience
-
Webhook Handling
- A comprehensive example covering Webhook handling and various API capabilities.
- https://github.com/line/line-bot-sdk-ruby/tree/master/examples/v2/kitchensink
Feedbacks & Contributions
We welcome feedback and contributions.