mirror of
https://github.com/recroom2016/OpenRec.git
synced 2026-04-22 13:25:51 +00:00
ITS WORKING
This commit is contained in:
28
APIServer.cs
28
APIServer.cs
@@ -242,6 +242,31 @@ namespace server
|
||||
{
|
||||
s = JsonConvert.SerializeObject(new Objective2018());
|
||||
}
|
||||
|
||||
if (Url == "rooms/v1/myrooms")
|
||||
{
|
||||
s = BracketResponse;
|
||||
}
|
||||
if (Url == "rooms/v1/mybookmarkedrooms")
|
||||
{
|
||||
s = BracketResponse;
|
||||
}
|
||||
if (Url == "rooms/v1/myRecent?skip=0&take=10")
|
||||
{
|
||||
s = BracketResponse;
|
||||
}
|
||||
if (Url == "events/v3/list")
|
||||
{
|
||||
s = Events.list();
|
||||
}
|
||||
if (Url == "playerevents/v1/all")
|
||||
{
|
||||
s = PlayerEventsResponse;
|
||||
}
|
||||
if (Url == "gamesessions/v2/joinrandom")
|
||||
{
|
||||
s = gamesessions2018.GameSessions.JoinRandom(text);
|
||||
}
|
||||
Console.WriteLine("API Response: " + s);
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
||||
response.ContentLength64 = (long)bytes.Length;
|
||||
@@ -265,7 +290,8 @@ namespace server
|
||||
public static string BlankResponse = "";
|
||||
public static string BracketResponse = "[]";
|
||||
|
||||
public static string VersionCheckResponse = "{\"ValidVersion\":true}";
|
||||
public static string PlayerEventsResponse = "{\"Created\":[],\"Responses\":[]}";
|
||||
public static string VersionCheckResponse = "{\"ValidVersion\":true}";
|
||||
public static string ModerationBlockDetails = "{\"ReportCategory\":0,\"Duration\":0,\"GameSessionId\":0,\"Message\":\"\"}";
|
||||
public static string ImagesV2Named = "[{\"FriendlyImageName\":\"DormRoomBucket\",\"ImageName\":\"OpenRec\",\"StartTime\":\"2021-12-27T21:27:38.1880175-08:00\",\"EndTime\":\"2043-12-27T21:27:38.1880399-08:00\"}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user