Skip to content

Bless-04/Roblox_Sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuget License NuGet Downloads

Issues open GitHub code size

Framework Functionality Web Integration

Endpoints Sourced From roblox-web-apis and create.roblox.com

Roblox_Sharp

Roblox_Sharp is a C#/.NET framework that serves as a unofficial asynchronouse wrapper for Roblox's Web API system. The framework is built on .NET 8.0, and depends on the standard library (no external dependencies)

Installation

Roblox_Sharp can be installed directly from NuGet through your IDE's package manager or with the following command in the command-line.

Install-Package Roblox_Sharp -Version <version>

Some Current Features

  • Users: Get information of any user on the platform, including their badges, inventory (if visible), friends, who they follow, and more.
  • Assets: Get Asset Information
  • Groups: Get Group Information
  • Badges: Get Badge Information
  • Avatar: Get information about a users avatar
  • Custom Requests: Send your own your own requests to the Roblox API using the framework's static WebAPI.Get_RequestAsync function.
  • Thumbnail: Get a users thumbnail for their head, bust or full avatar.

Code Examples

Getting Detailed User Information

using Roblox_Sharp.Models;
using Roblox_Sharp.Endpoints;

ulong id = 156; // the id to be requested
User user = await Users_v1.Get_UserAsync(id); //request the users info

DateTime created = user.Created; //get the users creation date

bool hasVerifiedBadge = user.HasVerifiedBadge; //get if the user has a verified badge

Console.WriteLine(user.ToString()); //a string representation of the user in the format {DisplayName}@{Username} (ID {UserId})"

Getting A List of A Users Friends

using Roblox_Sharp.Models;
using Roblox_Sharp.Endpoints;
using System.Collections.Generic;
using System.Linq;
using System;

List<User> friends = [];

friends.AddRange(await Friends_v1.Get_FriendsAsync(261)); //a list of 261's friends

IEnumerable<User> sorted = friends.OrderByDescending(user => user.UserId); // sorting the friends list from newest to oldest

Console.WriteLine($"oldest friend: {sorted.Last().ToString()}"); // display the oldest friend
Console.WriteLine($"youngest friend: {sorted.First().ToString()}"); // display the youngest friend