尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Official Go SDK for the Linkbreakers API: create dynamic QR codes and short links, and read scan analytics.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Official Go SDK for the Linkbreakers API, auto-generated from OpenAPI specification.
go get github.com/linkbreakers-com/linkbreakers-go
package main
import (
"context"
"fmt"
"log"
linkbreakers "github.com/linkbreakers-com/linkbreakers-go"
)
func main() {
client := linkbreakers.NewAPIClient(linkbreakers.NewConfiguration())
// Every request reads the Bearer token from its context
ctx := context.WithValue(context.Background(), linkbreakers.ContextAccessToken, "your-api-token")
// Create a shortened link
request := linkbreakers.NewCreateLinkRequest("https://example.com")
request.SetName("My Link")
created, _, err := client.LinksAPI.LinksServiceCreate(ctx).CreateLinkRequest(*request).Execute()
if err != nil {
log.Fatalf("Error creating link: %v", err)
}
link := created.GetLink()
fmt.Println("Short link:", link.GetShortlink())
// List links
links, _, err := client.LinksAPI.LinksServiceList(ctx).PageSize(10).Execute()
if err != nil {
log.Fatalf("Error listing links: %v", err)
}
fmt.Printf("Found %d links\n", len(links.GetLinks()))
}
Each API is a field on the client (client.LinksAPI, client.VisitorsAPI, ...) and each operation is named after the API's operation ID (LinksServiceCreate, LinksServiceList, VisitorsServiceIdentify, ...). Path parameters are arguments; query parameters and the request body are builder methods, and Execute() sends the request.
The SDK uses Bearer token authentication. Put your workspace API token in the context passed to each call with linkbreakers.ContextAccessToken, as in the example above. Get a token from the Linkbreakers dashboard.
For detailed API documentation, visit: https://docs.linkbreakers.com
This SDK is automatically generated from the Linkbreakers OpenAPI specification and published when the API is updated. This README is written by hand: scripts/check-docs.sh compiles every Go block in it against the generated code, on pull requests and before every release.
Current API version: See OPENAPI_VERSION
Report issues at: https://github.com/linkbreakers-com/linkbreakers-go/issues
MIT License