Skip to content

Restructure API classes to match endpoint namespaces#9

Merged
antonkomarev merged 2 commits into
masterfrom
restructure-apis
Mar 22, 2026
Merged

Restructure API classes to match endpoint namespaces#9
antonkomarev merged 2 commits into
masterfrom
restructure-apis

Conversation

@antonkomarev
Copy link
Copy Markdown
Member

@antonkomarev antonkomarev commented Mar 22, 2026

  • Add SelfApi ($bot->self->get()) — new endpoint /self/get for fetching bot info
  • Extract FilesApi ($bot->files->getInfo()) — moved filesGetInfo() out of MessagesApi
  • Move pinMessage() / unpinMessage() from MessagesApi to ChatsApi where they belong (endpoints are /chats/pin|unpinMessage)
  • Each API class now strictly corresponds to its endpoint namespace: self, messages, chats, files, events

Breaking Changes

  • $bot->messages->filesGetInfo($fileId)$bot->files->getInfo($fileId)
  • $bot->messages->pinMessage(...)$bot->chats->pinMessage(...)
  • $bot->messages->unpinMessage(...)$bot->chats->unpinMessage(...)

@antonkomarev antonkomarev merged commit 54954ed into master Mar 22, 2026
12 checks passed
@antonkomarev antonkomarev deleted the restructure-apis branch March 22, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant