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)
Add a rating to a video entry.
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/youtube/service.py/YouTubeService.AddRating