parameters: (self, rating_value, video_entry)
return_statement: return self.Post(entry, uri=rating_uri)
docstring: Add a rating to a video entry.
  
      Needs authentication.
  
      Args:
        rating_value: The integer value for the rating (between 1 and 5).
        video_entry: The YouTubeVideoEntry to be rated.
  
      Returns:
        True if the rating was added successfully.
  
      Raises:
        YouTubeError: rating_value must be between 1 and 5 in AddRating().
docstring_summary: Add a rating to a video entry.
docstring_tokens: Add a rating to a video entry .
function: def AddRating(self, rating_value, video_entry):
      """Add a rating to a video entry.
  
      Needs authentication.
  
      Args:
        rating_value: The integer value for the rating (between 1 and 5).
        video_entry: The YouTubeVideoEntry to be rated.
  
      Returns:
        True if the rating was added successfully.
  
      Raises:
        YouTubeError: rating_value must be between 1 and 5 in AddRating().
      """
      if rating_value < 1 or rating_value > 5:
        raise YouTubeError('rating_value must be between 1 and 5 in AddRating()')
  
      entry = gdata.GDataEntry()
      rating = gdata.youtube.Rating(min='1', max='5')
      rating.extension_attributes['name'] = 'value'
      rating.extension_attributes['value'] = str(rating_value)
      entry.extension_elements.append(rating)
  
      for link in video_entry.link:
        if link.rel == YOUTUBE_RATING_LINK_REL:
          rating_uri = link.href
  
      return self.Post(entry, uri=rating_uri)
function_tokens: def AddRating ( self , rating_value , video_entry ) : if rating_value < 1 or rating_value > 5 : raise YouTubeError ( 'rating_value must be between 1 and 5 in AddRating()' ) entry = gdata . GDataEntry ( ) rating = gdata . youtube . Rating ( min = '1' , max = '5' ) rating . extension_attributes [ 'name' ] = 'value' rating . extension_attributes [ 'value' ] = str ( rating_value ) entry . extension_elements . append ( rating ) for link in video_entry . link : if link . rel == YOUTUBE_RATING_LINK_REL : rating_uri = link . href return self . Post ( entry , uri = rating_uri )