Releases: maxigo-bot/maxigo-client
Releases · maxigo-bot/maxigo-client
v0.5.0
Added
WithRetry()option — opt-in automatic retry for retryable API errors (HTTP 429 rate limit and attachment processing errors). Configurable intervals, respects context cancellation. Default intervals: 500ms, 1s, 2s, 5sDefaultRetryIntervals— exported default retry intervals forWithRetryCheckPhoneNumbers(ctx, phoneNumbers)— check which phone numbers are registered in Max (GET /notify/exists)SendMessageToPhones(ctx, phoneNumbers, body)— send messages to users by phone numbers (POST /messageswithphone_numbersquery parameter)
v0.4.0
What's New
Upload convenience methods
UploadPhotoFromFile(ctx, filePath)— upload a photo from a local fileUploadPhotoFromURL(ctx, imageURL)— fetch an image from URL and upload itUploadMediaFromFile(ctx, uploadType, filePath)— upload media from a local fileUploadMediaFromURL(ctx, uploadType, fileURL)— fetch a file from URL and upload it
New ChatAdminPermission constants
PermCanCall,PermEditLink,PermPostEditDeleteMessage,PermEditMessage,PermDeleteMessage
New ErrFetch error kind
- Separates external URL / local file failures from Max Bot API errors (
ErrAPI)
Security hardening
FromURLmethods validate URL scheme (onlyhttp/https, prevents SSRF viafile://etc.)- Downloads capped at 50 MB (
maxFetchSize) Content-Dispositionfilenames sanitized withfilepath.Base(prevents path traversal)
Godoc examples
- 8 runnable example tests for core API:
New,SendMessage,AnswerCallback,UploadPhoto, buttons,Some, keyboard
v0.3.0
Added
ContactAttachmentPayload.Phone()— extracts phone number from VCFInfo (vCard TEL field)
v0.2.2
First recommended release of maxigo-client.
Highlights
- Full Max Bot API coverage: messages, chats, members, admins, uploads, subscriptions, long polling
- Zero external dependencies — only
net/http+encoding/json - Type-safe attachment parsing for all 11 types (image, video, audio, file, sticker, contact, share, location, data, inline_keyboard, reply_keyboard)
- Type-safe button constructors: callback, link, contact, geolocation, chat, open_app
Optional[T]generics with three-state JSON semantics (unset / null / value)- Context-first API with structured errors
What's New in v0.2.2
Added
- Button type
open_app:NewOpenAppButton(text, webAppURL)for launching mini-apps - 5 new update types:
BotStoppedUpdate,DialogMutedUpdate,DialogUnmutedUpdate,DialogClearedUpdate,DialogRemovedUpdate
Changes Since v0.1.1
See full CHANGELOG for details.
Full Changelog: v0.1.1...v0.2.2