code: def vote(self, direction=0):
          
          url = self.reddit_session.config['vote']
          data = {'id': self.fullname,
                  'dir': six.text_type(direction)}
          if self.reddit_session.user:
              # pylint: disable=W0212
              urls = [urljoin(self.reddit_session.user._url, 'disliked'),
                      urljoin(self.reddit_session.user._url, 'liked')]
              # pylint: enable=W0212
              self.reddit_session.evict(urls)
          return self.reddit_session.request_json(url, data=data)
docs: Vote for the given item in the direction specified.
  
          Note: votes must be cast by humans. That is, API clients proxying a
          human's action one-for-one are OK, but bots deciding how to vote on
          content or amplifying a human's vote are not. See the reddit rules for
          more details on what constitutes vote cheating.
  
          Source for note: http://www.reddit.com/dev/api#POST_api_vote
  
          :returns: The json response from the server.