function Service() {
    this.baseurl = '/api';

    this.deleteRating = function (ratingId) {
        return $.ajax({
            url: this.baseurl + '/rating/' + ratingId,
            type: 'DELETE'
        })
    };
    this.saveNewRating = function (competitorID, judgeID, rating) {
        return $.post(this.baseurl + '/rating', {
            CompetitorID: competitorID,
            JudgeID: judgeID,
            Rating1: rating
        })
    };

    this.getPersonRatings = function (personID) {
        return $.getJSON(this.baseurl + '/judging/personratings/' + personID);
    };

    this.getAvailableJudgesForPerson = function (personID) {
        return $.getJSON(this.baseurl + '/judging/availablejudges/' + personID);
    };

    this.getCompetitors = function () {
        return $.getJSON(this.baseurl + '/judging/competitors');
    };

    this.getOutcome = function (personID) {
        return $.getJSON(this.baseurl + '/judging/outcome/' + personID);
    };

    this.getOutcomes = function () {
        return $.getJSON(this.baseurl + '/judging/outcomes');
    };
}