2using Newtonsoft.Json.Linq;
4using System.Collections;
5using System.Collections.Generic;
29 bool hasErrored =
false;
32 if (hasErrorSetup ==
false)
34 if(
Error !=
null &&
Error.Equals(
"true", StringComparison.CurrentCultureIgnoreCase))
45 public class JoinSessionResponse : FailureResponse
52 IEnumerable<JProperty> dataPropertyEnumerator =
Data.Properties();
53 foreach(JProperty property
in dataPropertyEnumerator)
55 if(property.Name.Equals(
"SessionId", StringComparison.OrdinalIgnoreCase))
57 SessionId = JsonConvert.DeserializeObject<
int>(
property.Value.ToString());
73 return (
Error.Equals(
"true", StringComparison.CurrentCultureIgnoreCase));
79 IEnumerable<JProperty> dataPropertyEnumerator =
Data.Properties();
81 foreach(JProperty currentProperty
in dataPropertyEnumerator)
85 currentUser.UserId = currentProperty.Name;
86 currentUser.AvailableModules = JsonConvert.DeserializeObject<List<int>>(currentProperty.Value.ToString());
108 [JsonProperty(PropertyName =
"userIds")]
109 public List<int>
UserIds =
new List<int>();
113 public class LoginData
144 public class UserLoginResponseContent : IPlatformErrorable
146 public LoginResponseContent
User;
188 return (
Email ==
null);
203 public class AssistedLoginCode
221 public SessionData(
float score,
float scaled,
float min,
float max,
int duration,
bool completed,
bool success)
236 public string Name =
"";
243 public List<OrgModuleDownload>
Downloads =
new List<OrgModuleDownload>();
251 ID = token.Value<
int>(
"ID");
252 Name = token.Value<
string>(
"Name");
256 Industry = token.Value<
string>(
"Industry");
257 Details = token.Value<
string>(
"Details");
258 IconURL = token.Value<
string>(
"IconURL");
260 Categories = token.Value<
string>(
"Categories");
261 externalId = token.Value<
string>(
"externalId");
262 var PlayerToken = token.Value<JObject>(
"player");
264 if(PlayerToken !=
null)
269 var DownloadTokens = token.Value<JArray>(
"Downloads");
271 if(DownloadTokens !=
null)
273 foreach(JToken DownloadToken
in DownloadTokens)
282 public class OrgModuleDownload
297 ID = token.Value<
int>(
"ID");
300 externalId = token.Value<
string>(
"externalId");
302 Version = token.Value<
string>(
"Version");
303 Platform = token.Value<
string>(
"Platform");
304 ApkName = token.Value<
string>(
"ApkName");
305 URL = token.Value<
string>(
"URL");
306 Status = token.Value<
string>(
"Status");
317 public List<PlatformPlayerDownload>
versions =
new List<PlatformPlayerDownload>();
321 id = tokenObject.Value<
int>(
"id");
323 name = tokenObject.Value<
string>(
"name");
326 var VersionTokens = tokenObject.Value<JArray>(
"versions");
328 foreach (JToken Version
in VersionTokens)
336 public class PlatformPlayerDownload
348 id = token.Value<
int>(
"id");
350 version = token.Value<
string>(
"version");
351 status = token.Value<
string>(
"status");
352 URL = token.Value<
string>(
"URL");
353 ApkName = token.Value<
string>(
"ApkName");
354 platform = token.Value<
string>(
"platform");
AssistedLoginCode AssistedLogin
List< UserModulesData > ParsedData
LoginData(string username, string password)
OrgModuleDownload(JToken token)
List< OrgModuleDownload > Downloads
SessionData(float score, float scaled, float min, float max, int duration, bool completed, bool success)
LoginResponseContent User
List< int > AvailableModules