Skip to content

Releases: maxigo-bot/maxigo-client

v0.5.0

01 Apr 19:37

Choose a tag to compare

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, 5s
  • DefaultRetryIntervals — exported default retry intervals for WithRetry
  • CheckPhoneNumbers(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 /messages with phone_numbers query parameter)

v0.4.0

11 Mar 08:58

Choose a tag to compare

What's New

Upload convenience methods

  • UploadPhotoFromFile(ctx, filePath) — upload a photo from a local file
  • UploadPhotoFromURL(ctx, imageURL) — fetch an image from URL and upload it
  • UploadMediaFromFile(ctx, uploadType, filePath) — upload media from a local file
  • UploadMediaFromURL(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

  • FromURL methods validate URL scheme (only http/https, prevents SSRF via file:// etc.)
  • Downloads capped at 50 MB (maxFetchSize)
  • Content-Disposition filenames sanitized with filepath.Base (prevents path traversal)

Godoc examples

  • 8 runnable example tests for core API: New, SendMessage, AnswerCallback, UploadPhoto, buttons, Some, keyboard

v0.3.0

23 Feb 13:29

Choose a tag to compare

Added

  • ContactAttachmentPayload.Phone() — extracts phone number from VCFInfo (vCard TEL field)

v0.2.2

15 Feb 21:52

Choose a tag to compare

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