Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Update Endpoints.cs #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ValorScrimSource/ValorParty/Menus/Home/Home.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
else
regionLabel.Content = $"NOT FOUND";

/*
string playercardLink = Endpoints.GetPlayerCard();
playerCardPreview.Source = new BitmapImage(new Uri(playercardLink, UriKind.Absolute));

*/
// Had to remove PlayerCard integration for it to build
}

private void joinBTN_Click(object sender, RoutedEventArgs e)
Expand Down
18 changes: 9 additions & 9 deletions ValorScrimSource/ValorParty/RumbleMike/Endpoints.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand All @@ -22,7 +22,7 @@ public static JObject GetWebsocketAPI(string endpoint)
IRestRequest GetRequest = new RestRequest(Method.GET);
GetRequest.AddHeader("Authorization", $"Basic {Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes($"riot:{RiotUser.Instance.lockfileData.password}"))}");
GetRequest.AddHeader("X-Riot-ClientPlatform", "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9");
GetRequest.AddHeader("X-Riot-ClientVersion", "release-02.05-shipping-3-531230");
GetRequest.AddHeader("X-Riot-ClientVersion", "release-03.01-shipping-9-579719");
IRestResponse getResp = GetClient.Get(GetRequest);

if (getResp.IsSuccessful)
Expand Down Expand Up @@ -60,7 +60,7 @@ public static JObject GETCurrentParty()
getRequest.AddHeader("Authorization", $"Bearer {RiotUser.Instance.riotDetails.accessToken}");
getRequest.AddHeader("X-Riot-Entitlements-JWT", RiotUser.Instance.riotDetails.entitlementToken);
getRequest.AddHeader("X-Riot-ClientPlatform", "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9");
getRequest.AddHeader("X-Riot-ClientVersion", "release-02.05-shipping-3-531230");
getRequest.AddHeader("X-Riot-ClientVersion", "release-03.01-shipping-9-579719");

IRestResponse getResp = getClient.Get(getRequest);

Expand All @@ -79,7 +79,7 @@ public static JObject POSTCustomGameSettings(string map, string server)
postRequest.AddHeader("Authorization", $"Bearer {RiotUser.Instance.riotDetails.accessToken}");
postRequest.AddHeader("X-Riot-Entitlements-JWT", RiotUser.Instance.riotDetails.entitlementToken);
postRequest.AddHeader("X-Riot-ClientPlatform", "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9");
postRequest.AddHeader("X-Riot-ClientVersion", "release-02.05-shipping-3-531230");
postRequest.AddHeader("X-Riot-ClientVersion", "release-03.01-shipping-9-579719");

Object settings = new
{
Expand Down Expand Up @@ -107,7 +107,7 @@ public static JObject POSTMakeCustomGame()
postRequest.AddHeader("Authorization", $"Bearer {RiotUser.Instance.riotDetails.accessToken}");
postRequest.AddHeader("X-Riot-Entitlements-JWT", RiotUser.Instance.riotDetails.entitlementToken);
postRequest.AddHeader("X-Riot-ClientPlatform", "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9");
postRequest.AddHeader("X-Riot-ClientVersion", "release-02.05-shipping-3-531230");
postRequest.AddHeader("X-Riot-ClientVersion", "release-03.01-shipping-9-579719");

IRestResponse postResp = postClient.Post(postRequest);

Expand All @@ -125,7 +125,7 @@ public static JObject POSTCreateparty()
postRequest.AddHeader("Authorization", $"Bearer {RiotUser.Instance.riotDetails.accessToken}");
postRequest.AddHeader("X-Riot-Entitlements-JWT", RiotUser.Instance.riotDetails.entitlementToken);
postRequest.AddHeader("X-Riot-ClientPlatform", "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9");
postRequest.AddHeader("X-Riot-ClientVersion", "release-02.05-shipping-3-531230");
postRequest.AddHeader("X-Riot-ClientVersion", "release-03.01-shipping-9-579719");

IRestResponse postResp = postClient.Post(postRequest);

Expand All @@ -144,7 +144,7 @@ public static JObject POSTOpenLobby()
postRequest.AddHeader("Authorization", $"Bearer {RiotUser.Instance.riotDetails.accessToken}");
postRequest.AddHeader("X-Riot-Entitlements-JWT", RiotUser.Instance.riotDetails.entitlementToken);
postRequest.AddHeader("X-Riot-ClientPlatform", "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9");
postRequest.AddHeader("X-Riot-ClientVersion", "release-02.05-shipping-3-531230");
postRequest.AddHeader("X-Riot-ClientVersion", "release-03.01-shipping-9-579719");

postRequest.AddParameter("application/json", "{\r\n \"Accessibility\":\"OPEN\"\r\n}", ParameterType.RequestBody);
IRestResponse postResp = postClient.Post(postRequest);
Expand All @@ -164,7 +164,7 @@ public static JObject POSTJoinparty(string code)
postRequest.AddHeader("Authorization", $"Bearer {RiotUser.Instance.riotDetails.accessToken}");
postRequest.AddHeader("X-Riot-Entitlements-JWT", RiotUser.Instance.riotDetails.entitlementToken);
postRequest.AddHeader("X-Riot-ClientPlatform", "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9");
postRequest.AddHeader("X-Riot-ClientVersion", "release-02.05-shipping-3-531230");
postRequest.AddHeader("X-Riot-ClientVersion", "release-03.01-shipping-9-579719");

IRestResponse postResp = postClient.Post(postRequest);

Expand All @@ -184,7 +184,7 @@ public static string GetPlayerCard()
getRequest.AddHeader("Authorization", $"Bearer {RiotUser.Instance.riotDetails.accessToken}");
getRequest.AddHeader("X-Riot-Entitlements-JWT", RiotUser.Instance.riotDetails.entitlementToken);
getRequest.AddHeader("X-Riot-ClientPlatform", "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9");
getRequest.AddHeader("X-Riot-ClientVersion", "release-02.05-shipping-3-531230");
getRequest.AddHeader("X-Riot-ClientVersion", "release-03.01-shipping-9-579719");

IRestResponse getResp = getClient.Get(getRequest);
if (getResp.IsSuccessful)
Expand Down