lib/turntabler/song.rb
def vote(direction = :up)
      assert_current_song
      api('room.vote',
        :roomid => room.id,
        :section => room.section,
        :val => direction,
        :songid => id,
        :vh => digest("#{room.id}#{direction}#{id}"),
        :th => digest(rand),
        :ph => digest(rand)
      )
      true
    end
def vote(direction = :up)
      assert_current_song
      api('room.vote',
        :roomid => room.id,
        :section => room.section,
        :val => direction,
        :songid => id,
        :vh => digest("#{room.id}#{direction}#{id}"),
        :th => digest(rand),
        :ph => digest(rand)
      )
      true
    end
def vote ( direction = :up ) assert_current_song api ( 'room.vote' , :roomid => room . id , :section => room . section , :val => direction , :songid => id , :vh => digest ( "#{room.id}#{direction}#{id}" ) , :th => digest ( rand ) , :ph => digest ( rand ) ) true end
Vote for the song.

 @param [Symbol] direction The direction to vote the song (:up or :down)
 @return [true]
 @raise [Turntabler::Error] if the command fails
 @raise [Turntabler::Error] if the song is not playing in the current song
 @example
   song.vote         # => true
   song.vote(:down)  # => true
Vote for the song .