line/line-bot-sdk-go là một trong những repo phía máy chủ mà TopGit theo dõi, hiện có 958 sao, viết chủ yếu bằng Go. LINE Messaging API SDK for Go
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Every client application allows configuration with WithHTTPClient and WithEndpoint.
(For Blob client, configurations WithBlobHTTPClient and WithBlobEndpoint are also available.)
The LINE Messaging API primarily utilizes the JSON data format. To parse the incoming HTTP requests, the webhook.ParseRequest() method is provided. This method reads the *http.Request content and returns a slice of pointers to Event Objects.
import (
"github.com/line/line-bot-sdk-go/v8/linebot/webhook"
)
cb, err := webhook.ParseRequest(os.Getenv("LINE_CHANNEL_SECRET"), req)
if err != nil {
// Handle any errors that occur.
}
The LINE Messaging API is capable of handling various event types. The Messaging API SDK automatically unmarshals these events into respective classes like webhook.MessageEvent, webhook.FollowEvent, and so on. You can easily check the type of the event and respond accordingly using a switch statement as shown below:
for _, event := range cb.Events {
switch e := event.(type) {
case webhook.MessageEvent:
// Do Something...
case webhook.StickerMessageContent:
// Do Something...
}
}
We provide code examples.
EchoBot
a simple echo bot
KitchenSink
a bot that handles many types of events
EchoBotHandler
A simple bot that automatically verifies signatures and only handles Webhook events
DeliveryHelper
InsightHelper
RichmenuHelper
Receiver
To send a message to a user, group, or room, you need either an ID
You may need to store the x-line-request-id header obtained as a response from several APIs. In this case, please use ~WithHttpInfo. You can get headers and status codes. The x-line-accepted-request-id or content-type header can also be obtained in the same way.
However, if a feature that was publicly released is discontinued for business reasons and becomes completely unusable, we will release changes as a patch release.
Contributing
Please check CONTRIBUTING before making a contribution.
License
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/line-bot-sdk-go thuộc nhóm Backend trên TopGit, cùng 6 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về line/line-bot-sdk-go ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/line/line-bot-sdk-go là nguồn chính thức.
line/line-bot-sdk-go có bao nhiêu sao?
line/line-bot-sdk-go có 958 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/line/line-bot-sdk-go. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
line/line-bot-sdk-go có những chủ đề gì?
GitHub topics của line/line-bot-sdk-go: "bot", "go", "golang", "line", "linebot", "sdk". TopGit xếp repo vào nhóm Backend.
line/line-bot-sdk-go có phải mã nguồn mở không?
Có — line/line-bot-sdk-go phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/line/line-bot-sdk-go.
line/line-bot-sdk-go có trang demo không?
Dự án có trang chủ ở https://developers.line.biz/en/docs/messaging-api/overview/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
line/line-bot-sdk-go còn đang phát triển không?
Commit gần nhất trên line/line-bot-sdk-go là 6 ngày trước (theo timestamp GitHub). Repo có 240 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc line-bot-sdk-go có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về line-bot-sdk-go.