Luski.Net/Luski.net/JsonRequest.cs
JacobTech 2eb1abe526 init
2023-01-01 22:50:39 -05:00

29 lines
771 B
C#
Executable File

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()}}}";
}
}
}