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 AddFavorite(string objectId, FavoriteType type, string tags = null) { if (!string.IsNullOrEmpty(objectId)) { var param = new Dictionary <string, object>() { ["type"] = type.ToString().ToLower(), ["favoriteId"] = objectId }; if (!string.IsNullOrEmpty(tags)) { param["tags"] = tags; } VRCApi.Request <ApiFavorite>(MainForm.Instance.OnAddFavorite, "favorites", ApiMethod.POST, param); } }