Be a Supporter!

Browse Sections


Newgrounds Wiki: loadFilesByRating

Usage

import com.newgrounds.API;
import com.newgrounds.SaveGroup;
import com.newgrounds.SaveFile;

API.loadFilesByViews(group_name:String, rating_name:String, sort_descending:Boolean, key_name:String, key_value:*);
  • group_name - The name of the save group to search in.
  • rating_name - The name of the rating to sort on.
  • sort_descending - If true, files with higher ratings will be listed first.
  • key_name - Optional. Use this if you want to filter results with a key.
  • key_value - Optional. The value of the key you want to filter on.

This command will execute a SaveGroupQuery to get you 10 files sorted by the value of the rating you specified.

If you have configured any keys on the Save Data/Save Group page of your API setup, you can filter your results to only show results where a specific key has a specific value.

You must have a rating configured in the Save Data/Save Group page of your API setup to use this method.

This command will trigger a QUERY_COMPLETE event. Note: This feature is still in BETA, support is limited