Bloxlink.Net
3.0.0
dotnet add package Bloxlink.Net --version 3.0.0
NuGet\Install-Package Bloxlink.Net -Version 3.0.0
<PackageReference Include="Bloxlink.Net" Version="3.0.0" />
paket add Bloxlink.Net --version 3.0.0
#r "nuget: Bloxlink.Net, 3.0.0"
// Install Bloxlink.Net as a Cake Addin #addin nuget:?package=Bloxlink.Net&version=3.0.0 // Install Bloxlink.Net as a Cake Tool #tool nuget:?package=Bloxlink.Net&version=3.0.0
Bloxlink.Net
Bloxlink.Net is an unofficial .NET API Wrapper for the Bloxlink API.
Surfing the Search API 🔍
The Search API allows you to determine what Robox accounts are connected to a Discord user.
Note: This is NOT the Roblox to Discord API.
using var client = new BloxlinkClient("api-key");
await client.ValidateKey(); // Make sure to validate your key!
// Get the primary account.
ulong discordUserId = 123456789101112;
var req = await client.GetUserAsync(discordUserId);
Console.WriteLine($"Fetched: {req.User.GlobalAccount}");
// Get the account linked to a guild.
ulong guildId = 372036754078826496;
req = await client.GetUserAsync(discordUserId, guildId);
Console.WriteLine($"Fetched: {req.User.GuildAccount}");
Utilizing the Built-in Cache 📦
Retrieved users are cached by default, you can access them using the
GetUser
method.Note: The cache is only cleared when the
BloxlinkClient
is disposed.
var res = await client.GetUserAsync(123456789101112, options: new() { PopulateCache = true });
Console.WriteLine($"Fetched: {res.User.GlobalAccount}");
// You may access your remaining quota in the BloxlinkResponse.
Console.WriteLine($"Quota Remaining: {res.QuotaRemaining}");
var cachedUserId = client.GetUser(123456789101112)!;
Console.WriteLine($"Cached user: {cachedUserId}");
Exception Handling 🚧
Several custom-exceptions such as
UserNotFound
andQuotaExceeded
are provided for ease-of-use!
try
{
var res = await client.GetUserAsync(69552131231221232);
}
catch (UserNotFoundException)
{
Console.WriteLine("User was not found.");
}
catch (QuotaExceededException)
{
Console.WriteLine("We have exceeded our quota!");
}
Versioning Guarantees
This library generally abides by Semantic Versioning. Packages are published in MAJOR.MINOR.PATCH version format.
An increment of the MAJOR component indicates that a new version of the Bloxlink API is supported.
All other increments of component follow what was described in the Semantic Versioning Summary.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
-
net6.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.