MaxApi.Net
1.0.0
See the version list below for details.
dotnet add package MaxApi.Net --version 1.0.0
NuGet\Install-Package MaxApi.Net -Version 1.0.0
<PackageReference Include="MaxApi.Net" Version="1.0.0" />
<PackageVersion Include="MaxApi.Net" Version="1.0.0" />
<PackageReference Include="MaxApi.Net" />
paket add MaxApi.Net --version 1.0.0
#r "nuget: MaxApi.Net, 1.0.0"
#:package MaxApi.Net@1.0.0
#addin nuget:?package=MaxApi.Net&version=1.0.0
#tool nuget:?package=MaxApi.Net&version=1.0.0
MaxApi.Net
What Is It?
MaxApi.Net is an unofficial library for .NET, which provides an API to the new Russian messenger MAX. The API is designed strictly following the official documentation and provides asynchronous methods.
The official documentation is available at the link: click
Before Starting
Before using the API, you need to register with MAX and create a bot via @masterbot to get your own access token, which will be used with each request.
Description
The entry point to the API is the MaxApiProvider
class, which requires an access token received from the official bot:
var api = new MaxApiProvider("your_access_token");
The MaxApiProvider
functionality is divided into several providers:
Bots
- Gets the provider for bot-related operations.Chats
- Gets the provider for chat-related operations.Subscriptions
- Gets the provider for subscription-related operations.Upload
- Gets the provider for file upload operations.
Example
Below is a sample code:
// Returns information about the current bot, which is identified using an access token
var botInfo = await api.Bots.GetBotInfoAsync();
// Returns information about the chat by its ID
var chatInfo = await api.Chats.GetChatAsync(chatId);
// If your bot receives data through a WebHook, this method returns a list of all subscriptions
var subs = await api.Subscriptions.GetSubscriptionsAsync();
// Requests an upload URL for a specific file type
var url = await api.Upload.GetUploadUrlAsync(Entities.UploadType.Image);
Remark
At the moment, creating your own bot and then obtaining an access token is not available in MAX for unknown reasons, so API testing has not been conducted yet! The problem is on their side.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.