<commit_before>class Pupil
  # @return [Array] Timeline
  # @param [Hash] param
  # @option param [Fixnum] :count Number of tweets
  # @option param [Fixnum] :since_id
  # @option param [Fixnum] :max_id
  # @option param [Fixnum] :page
  # @option param [Symbol] :trim_user
  # @option param [Symbol] :include #=> [:rts]
  # @option param [Symbol] :exclude #=> [:replies]
  # @option param [Symbol] :contributor_details
  def timeline(param={})
    response = self.get("/1/statuses/home_timeline.json", param)
    return false unless response
    statuses = []
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  alias_method :home_timeline, :timeline
  
  # @return [Array] Mention
  # @param [Hash] param
  def mentions(param={})
    response = self.get("/1/statuses/mentions.json", param)
    return false unless response
    statuses = []
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  # Returning user timeline
  # @return [Array] timeline
  # @param [Hash] param
  # @option param [Fixnum] :user_id The ID of user
  # @option param [String] :screen_name The Screen name of user
  # @option param [Fixnum] :since_id
  # @option param [Fixnum] :max_id
  # @option param [Fixnum] :count
  # @option param [Fixnum] :page Specifies
  # @option param [Symbol] :trim_user
  # @option param [Symbol] :include #=> [:rts]
  # @option param [Symbol] :exclude #=> [:replies]
  # @option param [Symbol] :contributor_details
  # @example
  #   twitter = Pupil.new PUPIL_KEY
  #   twitter.user_timeline(:screen_name => 'o_ame', :exclude => :replies).each do |status|
  #     puts "#{status.user.screen_name}: #{status.text}"
  #   end
  def user_timeline(target, option={})
    response = self.get("/1/statuses/user_timeline.json", {guess_parameter(target) => target}.update(option))
    return false unless response
    statuses = []
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  alias_method :timeline_for, :user_timeline
  
  # Returning public timeline
  # @return [Array] Timeline
  # @param [Hash] param
  def public_timeline(param={})
    response = self.get("/1/statuses/public_timeline.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweeted_by_me(param={})
    response = self.get("/1/statuses/retweeted_by_me.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweeted_to_me(param={})
    response = self.get("/1/statuses/retweeted_to_me.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweets_of_me(param={})
    response = self.get("/1/statuses/retweets_of_me.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweeted_to_user(param={})
    response = self.get("/1/statuses/retweeted_to_user.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweeted_by_user(param={})
    response = self.get("/1/statuses/retweeted_by_user.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def oembed(param={})
    response = self.get("/1/statuses/oembed.json", param)
    return response
  end
  
  def status(status_id)
    response = self.get("/statuses/show/#{status_id}.json")
    return false unless response
    status = Status.new(response, @access_token)
    return status
  end
  
  def update(status, irt='')
    response = self.post(<commit_msg>Include parameters<commit_after>class Pupil
  # @return [Array] Timeline
  # @param [Hash] param
  # @option param [Fixnum] :count Number of tweets
  # @option param [Fixnum] :since_id
  # @option param [Fixnum] :max_id
  # @option param [Fixnum] :page
  # @option param [Symbol] :trim_user
  # @option param [Symbol] :include #=> [:rts]
  # @option param [Symbol] :exclude #=> [:replies]
  # @option param [Symbol] :contributor_details
  def timeline(param={})
    response = self.get("/1/statuses/home_timeline.json", param)
    return false unless response
    statuses = []
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  alias_method :home_timeline, :timeline
  
  # @return [Array] Mention
  # @param [Hash] param
  def mentions(param={})
    response = self.get("/1/statuses/mentions.json", param)
    return false unless response
    statuses = []
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  # Returning user timeline
  # @return [Array] timeline
  # @param [Hash] param
  # @option param [Fixnum] :user_id The ID of user
  # @option param [String] :screen_name The Screen name of user
  # @option param [Fixnum] :since_id
  # @option param [Fixnum] :max_id
  # @option param [Fixnum] :count
  # @option param [Fixnum] :page Specifies
  # @option param [Symbol] :trim_user
  # @option param [Symbol] :include #=> [:rts]
  # @option param [Symbol] :exclude #=> [:replies]
  # @option param [Symbol] :contributor_details
  # @example
  #   twitter = Pupil.new PUPIL_KEY
  #   twitter.user_timeline(:screen_name => 'o_ame', :exclude => :replies).each do |status|
  #     puts "#{status.user.screen_name}: #{status.text}"
  #   end
  def user_timeline(target, option={})
    response = self.get("/1/statuses/user_timeline.json", {guess_parameter(target) => target}.update(option))
    return false unless response
    statuses = []
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  alias_method :timeline_for, :user_timeline
  
  # Returning public timeline
  # @return [Array] Timeline
  # @param [Hash] param
  def public_timeline(param={})
    response = self.get("/1/statuses/public_timeline.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweeted_by_me(param={})
    response = self.get("/1/statuses/retweeted_by_me.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweeted_to_me(param={})
    response = self.get("/1/statuses/retweeted_to_me.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweets_of_me(param={})
    response = self.get("/1/statuses/retweets_of_me.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweeted_to_user(param={})
    response = self.get("/1/statuses/retweeted_to_user.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def retweeted_by_user(param={})
    response = self.get("/1/statuses/retweeted_by_user.json", param)
    return false unless response
    statuses = Array.new
    response.each do |element|
      status = Status.new(element, @access_token)
      statuses << status
    end
    return statuses
  end
  
  def oembed(param={})
    response = self.get("/1/statuses/oembed.json", param)
    return response
  end
  
  def status(status_id, param={})
    response = self.get("/statuses/show/#{status_id}.json", param)
    return false unless response
    status = Status.new(response, @access_token)
    return status
  end
  
  def update(status, irt='')
    response = self.post(
{'fraction_non_alphanumeric': 0.11514406968952423, 'fraction_numerical': 0.002233638597274961, 'mean_word_length': 3.2081766917293235, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 17, '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': '6573517', 'n_tokens_mistral': 2915, 'n_tokens_neox': 2895, 'n_words': 750}