{"size": 995, "ext": "js", "max_stars_repo_path": "classes/v2/beatmap.js", "max_stars_repo_name": "NiceAesth/osuapiv2", "max_stars_repo_stars_event_min_datetime": "2021-01-20T14:35:28.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-20T14:35:28.000Z", "max_issues_repo_path": "classes/v2/beatmap.js", "max_issues_repo_name": "NiceAesth/osuapiv2", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "classes/v2/beatmap.js", "max_forks_repo_name": "NiceAesth/osuapiv2", "max_forks_repo_forks_event_min_datetime": "2021-01-20T15:12:12.000Z", "max_forks_repo_forks_event_max_datetime": "2021-01-20T15:12:12.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 19.1346153846, "max_line_length": 56, "alphanum_fraction": 0.5386934673}
const RankStatus = {
    RANKED: {
        ID: 1,
        API_NAME: "ranked"
    },
    APPROVED: {
        ID: 2,
        API_NAME: "approved"
    },
    QUALIFIED: {
        ID: 3,
        API_NAME: "qualified"
    },
    LOVED: {
        ID: 4,
        API_NAME: "loved"
    },
    PENDING: {
        ID: 0,
        API_NAME: "pending"
    },
    WIP: {
        ID: -1,
        API_NAME: "wip"
    },
    GRAVEYARD: {
        ID: -2,
        API_NAME: "graveyard"
    }
}

function getRankStatusFromID(queryID) {
    for (let status in RankStatus) {
        if (RankStatus[status].ID == queryID)
            return RankStatus[status];
    }
    return RankStatus.GRAVEYARD;
}

function getRankStatusFromAPIName(queryAPIName) {
    for (let status in RankStatus) {
        if (RankStatus[status].API_NAME == queryAPIName)
            return RankStatus[status];
    }
    return RankStatus.STANDARD;
}

module.exports = {
    RankStatus,
    getRankStatusFromID,
    getRankStatusFromAPIName
};