using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Runtime.InteropServices;
using SimpleJSON;

public class QueryParamsHandler : MonoBehaviour {

    [DllImport("__Internal")]
    private static extern string CheckIfCreatorCorps();

    [DllImport("__Internal")]
    private static extern string GetMoodleDetails();

    public static bool IsCreatorCorps()
    {
        string isCreatorCorps = CheckIfCreatorCorps();

        return isCreatorCorps == "true" ? true : false;
    }

    public static JSONNode GetMoodleData()
    {
        var dataString = GetMoodleDetails();
        var data = JSON.Parse(dataString);

        return data;
    }
}
