RepositoryGoUSUnited States
CH

ChimeraCoder/anaconda

A Go client library for the Twitter 1.1 API

1.1kstars
241forks
36issues
0views

🐍 Anaconda - Thư viện Go truy cập Twitter API 1.1 mượt mà

Thư viện Go đơn giản, trong suốt, tự động xử lý rate limit và hỗ trợ cả API REST lẫn Streaming.

Anaconda là một gói Go đơn giản và minh bạch để truy cập phiên bản 1.1 của Twitter API. Kết quả truy vấn thành công được trả về dưới dạng struct Go nguyên bản, có thể sử dụng ngay lập tức mà không cần ép kiểu.

✨ Điểm nổi bật

  • Xác thực đơn giản: Tạo client chỉ với một dòng NewTwitterApiWithCredentials.
  • Truy vấn REST: Hỗ trợ tìm kiếm, lấy dữ liệu người dùng, bài đăng, v.v. qua các phương thức như GetSearch.
  • Tham số tùy chọn: Truyền url.Values để tùy chỉnh số lượng kết quả hoặc các tham số khác.
  • Streaming API: Hỗ trợ PublicStream* và UserStream, nhận dữ liệu qua kênh chan và xử lý theo kiểu switch.
  • Tự động retry rate limit: Đợi đến khi rate limit reset bằng header X-Rate-Limit-Reset.
  • Throttling client-side: Dùng SetDelay để thiết lập thời gian chờ giữa các yêu cầu.
  • Hỗ trợ Google App Engine: Dùng urlfetch.Transport thay thế http.Transport.
  • Xử lý lỗi chi tiết: Lỗi trả về dưới dạng ApiError với thông tin bổ sung từ Twitter.

💡 Vì sao đáng chú ý

Anaconda khác biệt bằng cách tự động xử lý rate limit và throttling phía sau, giúp người dùng không cần viết boilerplate để kiểm tra lỗi này. Đặc biệt, hỗ trợ streaming qua kênh Go giúp xử lý dữ liệu thời gian thực dễ dàng. Phù hợp cho ứng dụng Go cần tích hợp Twitter mà không muốn quản lý thủ công các giới hạn API.


#Go #TwitterAPI #OpenSource #golang #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryGo
avelino/awesome-go

A curated list of awesome Go frameworks, libraries and software

190.5k
Oct 26, 2026
RepositoryGo
ollama/ollama

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

184.9k
Oct 26, 2026
RepositoryGo
golang/go

The Go programming language

139.5k
Oct 24, 2026
RepositoryGo
moby/moby

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

72.2k
Oct 20, 2026
RepositoryGo
traefik/traefik

The Cloud Native Application Proxy

65.4k
Oct 26, 2026
RepositoryGo
rclone/rclone

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

60.5k
Oct 24, 2026
RepositoryGo
go-gitea/gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD

58.7k
Oct 26, 2026
RepositoryGo
charmbracelet/bubbletea

A powerful little TUI framework 🏗

45.5k
Oct 26, 2026
RepositoryGo
gofiber/fiber

⚡️ Express inspired web framework written in Go

40.2k
Oct 20, 2026