<commit_before>
package com.podio.sdk.provider;

import com.podio.sdk.Filter;
import com.podio.sdk.Provider;
import com.podio.sdk.Request;
import com.podio.sdk.domain.Rating;
import com.podio.sdk.domain.ReferenceType;

/**
 * Enables access to the Ratings API end point.
 *
 */
public class RatingProvider extends Provider {

    static class RatingFilter extends Filter {

        protected RatingFilter() {
            super("rating");
        }

        public RatingFilter withReference(ReferenceType type, long id) {
            this.addPathSegment(type.name());
            this.addPathSegment(Long.toString(id, 10));

            return this;
        }

        public RatingFilter withRatingType(Rating.RatingType ratingType){
            this.addPathSegment(ratingType.name());

            return this;
        }
    }

    /**
     *
     * Create a like on a reference type with the given id. The request result will deliver a rating
     * object with only rating_id set.
     *
     * @param type
     *         The reference type of what you are liking.
     * @param id
     *         The id of the reference type your are liking.
     *
     * @return A ticket which the caller can use to identify this request with.
     */
    public Request<Rating> createLike(ReferenceType type, long id) {
        RatingFilter filter = new RatingFilter();
        filter.withReference(type,id);
        filter.withRatingType(Rating.RatingType.like);
        Rating.Create create = new Rating.Create(1);

        return post(filter, create, Rating.class);
    }

    /**
     *
     * Create an unlike on a reference type with the given id. The request result will deliver a rating
     * object with only rating_id set.
     *
     * @param type
     *         The reference type of what you are unliking.
     * @param id
     *         The id of the reference type your are unliking.
     *
     * @return A ticket which the caller can use to identify this request with.
     */
    public Request<Void> createUnlike(ReferenceType type, long id) {
        RatingFilter filter = new RatingFilter();
        filter.withReference(type,id);
        filter.withRatingType(Rating.RatingType.like);

        return delete(filter);
    }
}
<commit_msg>added support for "Get who liked an object" API call<commit_after>
package com.podio.sdk.provider;

import com.podio.sdk.Filter;
import com.podio.sdk.Provider;
import com.podio.sdk.Request;
import com.podio.sdk.domain.Profile;
import com.podio.sdk.domain.Rating;
import com.podio.sdk.domain.ReferenceType;

/**
 * Enables access to the Ratings API end point.
 */
public class RatingProvider extends Provider {

    static class RatingFilter extends Filter {

        protected RatingFilter() {
            super("rating");
        }

        public RatingFilter withReference(ReferenceType type, long id) {
            this.addPathSegment(type.name());
            this.addPathSegment(Long.toString(id, 10));

            return this;
        }

        public RatingFilter withRatingType(Rating.RatingType ratingType) {
            this.addPathSegment(ratingType.name());

            return this;
        }

        public RatingFilter likedBy() {
            this.addPathSegment("liked_by");
            return this;
        }
    }

    /**
     * Create a like on a reference type with the given id. The request result will deliver a rating
     * object with only rating_id set.
     *
     * @param type
     *         The reference type of what you are liking.
     * @param id
     *         The id of the reference type your are liking.
     *
     * @return A ticket which the caller can use to identify this request with.
     */
    public Request<Rating> createLike(ReferenceType type, long id) {
        RatingFilter filter = new RatingFilter();
        filter.withReference(type, id);
        filter.withRatingType(Rating.RatingType.like);
        Rating.Create create = new Rating.Create(1);

        return post(filter, create, Rating.class);
    }

    /**
     * Create an unlike on a reference type with the given id. The request result will deliver a
     * rating object with only rating_id set.
     *
     * @param type
     *         The reference type of what you are unliking.
     * @param id
     *         The id of the reference type your are unliking.
     *
     * @return A ticket which the caller can use to identify this request with.
     */
    public Request<Void> createUnlike(ReferenceType type, long id) {
        RatingFilter filter = new RatingFilter();
        filter.withReference(type, id);
        filter.withRatingType(Rating.RatingType.like);

        return delete(filter);
    }

    /**
     * get a list of profiles of everyone that liked the given object.
     *
     * @param type
     *         The reference type of what of the object.
     * @param id
     *         The id of the reference type of the object.
     *
     * @return A ticket which the caller can use to identify this request with.
     */
    public Request<Profile[]> getWhoLikedAnObject(ReferenceType type, long id) {
        RatingFilter filter = new RatingFilter();
        filter.withReference(type, id);
        filter.likedBy();

        return get(filter, Profile[].class);
    }
}

{'fraction_non_alphanumeric': 0.08390280941533788, 'fraction_numerical': 0.0011389521640091116, 'mean_word_length': 2.280821917808219, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3954252', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1379, 'n_words': 481}