public static void Fetch(string id) { if (!string.IsNullOrEmpty(id)) { VRCApi.Request <ApiWorld>(MainForm.Instance.OnWorld, $"worlds/{id}"); } }
private static void FetchFriends(Action <List <ApiUser> > callback, Dictionary <string, object> data, int count = 100, int offset = 0) { data["n"] = count; data["offset"] = offset; VRCApi.Request <List <ApiUser> >((list) => { if (list.Count == count) { FetchFriends(callback, data, count, offset + count); } callback.Invoke(list); }, "auth/user/friends", ApiMethod.GET, data); }
public static void FetchList(FavoriteType type, string tags = null) { var param = new Dictionary <string, object> { ["n"] = 100, ["type"] = type.ToString().ToLower() }; if (!string.IsNullOrEmpty(tags)) { param["tags"] = tags; } VRCApi.Request <List <ApiFavorite> >((list) => MainForm.Instance.OnFavorites(type, list), "favorites", ApiMethod.GET, param); }
public static void FetchAllAgainstMe() { VRCApi.Request <List <ApiPlayerModeration> >(MainForm.Instance.OnPlayerModerationsAgainstMe, "auth/user/playermoderated"); }
public static void FetchCurrentUser() { VRCApi.Request <ApiUser>(MainForm.Instance.OnCurrentUser, "auth/user"); }
public static void FetchConfig(Action <RemoteConfig> callback) { VRCApi.Request(callback, "config"); }