Luski.Net/Luski.net/JsonRequest.cs

29 lines
771 B
C#
Raw Permalink Normal View History

2023-01-01 22:50:39 -05:00
using Luski.net.Enums;
using System;
namespace Luski.net
{
internal static class JsonRequest
{
internal static string SendCallData(byte[] Data, long channel)
{
return $"{{\"data\": \"{Convert.ToBase64String(Data)}\", \"id\": {channel}}}";
}
internal static string JoinCall(long Channel)
{
return $"{{\"id\": {Channel}}}";
}
internal static string Send(DataType Request, string Data)
{
return $"{{\"type\": {(int)Request}, \"data\": {Data}}}";
}
internal static string FriendRequestResult(long User, bool Result)
{
return $"{{\"id\": {User},\"result\": {Result.ToString().ToLower()}}}";
}
}
}