Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom file endpoint #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Custom file endpoint #47

wants to merge 2 commits into from

Conversation

soaska
Copy link

@soaska soaska commented Nov 30, 2024

Now it should work like this:

bot, err := tgbotapi.NewBotAPIWithClient("YOUR_TOKEN", "https://your-custom-api.example.com/bot%s/%s", "https://your-custom-file-api.example.com/file/bot%s/%s", &http.Client{})
file, err := bot.GetFile(tgbotapi.FileConfig{FileID: "fileID"}, "https://your-custom-file-api.example.com/file/bot%s/%s")

I'm not sure if this work, I didn't edit tests. Pls check.

Now it should work like this:
```golang
bot, err := tgbotapi.NewBotAPIWithClient("YOUR_TOKEN", "https://your-custom-api.example.com/bot%s/%s", "https://your-custom-file-api.example.com/file/bot%s/%s", &http.Client{})
file, err := bot.GetFile(tgbotapi.FileConfig{FileID: "fileID"}, "https://your-custom-file-api.example.com/file/bot%s/%s")
```
@soaska soaska changed the title Custom file Custom file endpoint Nov 30, 2024
bot.go Outdated Show resolved Hide resolved
Co-authored-by: Valeriy Selitskiy <[email protected]>
@soaska soaska marked this pull request as ready for review December 2, 2024 11:39
@soaska soaska requested a review from zhuk-kk as a code owner December 2, 2024 11:39
@soaska soaska requested a review from iamwavecut December 4, 2024 11:19
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.

3 participants