<commit_before>module Checkdin
  module WonRewards

    # Retrieve information about a won reward
    #
    # param [Integer] id The ID of the reward

    def won_reward(id)
      response = connection.get("won_rewards/#{id}")
      return_error_or_body(response)
    end

    # Get a list of all won rewards for the authenticating client.
    #
    # @param [Hash]  options
    # @option options Integer :campaign_id - Only return won rewards for this campaign.
    # @option options Integer :user_id - Only return won rewards for this user.
    # @option options Integer :limit - The maximum number of records to return.

    def won_rewards(options={})
      response = connection.get do |req|<commit_msg>Updating options for won rewards endpoint.<commit_after>module Checkdin
  module WonRewards

    # Retrieve information about a won reward
    #
    # param [Integer] id The ID of the reward

    def won_reward(id)
      response = connection.get("won_rewards/#{id}")
      return_error_or_body(response)
    end

    # Get a list of all won rewards for the authenticating client.
    #
    # @param [Hash]  options
    # @option options Integer :campaign_id - Only return won rewards for this campaign.
    # @option options Integer :user_id - Only return won rewards for this user.
    # @option options Integer :promotion_id - Only return won rewards for this promotion.
    # @option options Integer :limit - The maximum number of records to return.

    def won_rewards(options={})
      response = connection.get do |req|
{'fraction_non_alphanumeric': 0.07296416938110749, 'fraction_numerical': 0.0, 'mean_word_length': 3.129032258064516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2615862', 'n_tokens_mistral': 428, 'n_tokens_neox': 414, 'n_words': 169}