Class Scrobbler

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      ResponseStatus handshake​(Session session)
      Deprecated.
      Performs a web-service handshake.
      ResponseStatus handshake​(java.lang.String password)
      Deprecated.
      Performs a standard handshake with the user's password.
      static Scrobbler newScrobbler​(java.lang.String clientId, java.lang.String clientVersion, java.lang.String user)
      Deprecated.
      Creates a new Scrobbler instance bound to the specified user.
      ResponseStatus nowPlaying​(java.lang.String artist, java.lang.String track)
      Deprecated.
      Submits 'now playing' information.
      ResponseStatus nowPlaying​(java.lang.String artist, java.lang.String track, java.lang.String album, int length, int tracknumber)
      Deprecated.
      Submits 'now playing' information.
      void setHandshakeURL​(java.lang.String handshakeUrl)
      Deprecated.
      Sets the URL to use to perform a handshake.
      ResponseStatus submit​(SubmissionData data)
      Deprecated.
      Scrobbles a song.
      ResponseStatus submit​(java.lang.String artist, java.lang.String track, java.lang.String album, int length, int tracknumber, Source source, long startTime)
      Deprecated.
      Scrobbles a song.
      ResponseStatus submit​(java.util.Collection<SubmissionData> data)
      Deprecated.
      Scrobbles up to 50 songs at once.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setHandshakeURL

        public void setHandshakeURL​(java.lang.String handshakeUrl)
        Deprecated.
        Sets the URL to use to perform a handshake. Use this method to redirect your scrobbles to another service, like Libre.fm.
        Parameters:
        handshakeUrl - The new handshake url.
      • newScrobbler

        public static Scrobbler newScrobbler​(java.lang.String clientId,
                                             java.lang.String clientVersion,
                                             java.lang.String user)
        Deprecated.
        Creates a new Scrobbler instance bound to the specified user.
        Parameters:
        clientId - The client id (or "tst")
        clientVersion - The client version (or "1.0")
        user - The last.fm user
        Returns:
        a new Scrobbler instance
      • handshake

        public ResponseStatus handshake​(java.lang.String password)
                                 throws java.io.IOException
        Deprecated.
        Performs a standard handshake with the user's password.
        Parameters:
        password - The user's password
        Returns:
        the status of the operation
        Throws:
        java.io.IOException - on I/O errors
      • handshake

        public ResponseStatus handshake​(Session session)
                                 throws java.io.IOException
        Deprecated.
        Performs a web-service handshake.
        Parameters:
        session - An authenticated Session.
        Returns:
        the status of the operation
        Throws:
        java.io.IOException - on I/O errors
        See Also:
        Authenticator
      • nowPlaying

        public ResponseStatus nowPlaying​(java.lang.String artist,
                                         java.lang.String track)
                                  throws java.io.IOException
        Deprecated.
        Submits 'now playing' information. This does not affect the musical profile of the user.
        Parameters:
        artist - The artist's name
        track - The track's title
        Returns:
        the status of the operation
        Throws:
        java.io.IOException - on I/O errors
      • nowPlaying

        public ResponseStatus nowPlaying​(java.lang.String artist,
                                         java.lang.String track,
                                         java.lang.String album,
                                         int length,
                                         int tracknumber)
                                  throws java.io.IOException
        Deprecated.
        Submits 'now playing' information. This does not affect the musical profile of the user.
        Parameters:
        artist - The artist's name
        track - The track's title
        album - The album or null
        length - The length of the track in seconds
        tracknumber - The position of the track in the album or -1
        Returns:
        the status of the operation
        Throws:
        java.io.IOException - on I/O errors
      • submit

        public ResponseStatus submit​(java.lang.String artist,
                                     java.lang.String track,
                                     java.lang.String album,
                                     int length,
                                     int tracknumber,
                                     Source source,
                                     long startTime)
                              throws java.io.IOException
        Deprecated.
        Scrobbles a song.
        Parameters:
        artist - The artist's name
        track - The track's title
        album - The album or null
        length - The length of the track in seconds
        tracknumber - The position of the track in the album or -1
        source - The source of the track
        startTime - The time the track started playing in UNIX timestamp format and UTC time zone
        Returns:
        the status of the operation
        Throws:
        java.io.IOException - on I/O errors
      • submit

        public ResponseStatus submit​(SubmissionData data)
                              throws java.io.IOException
        Deprecated.
        Scrobbles a song.
        Parameters:
        data - Contains song information
        Returns:
        the status of the operation
        Throws:
        java.io.IOException - on I/O errors
      • submit

        public ResponseStatus submit​(java.util.Collection<SubmissionData> data)
                              throws java.io.IOException
        Deprecated.
        Scrobbles up to 50 songs at once. Song info is contained in the Collection passed. Songs must be in chronological order of their play, that means the track first in the list has been played before the track second in the list and so on.
        Parameters:
        data - A list of song infos
        Returns:
        the status of the operation
        Throws:
        java.io.IOException - on I/O errors
        java.lang.IllegalArgumentException - if data contains more than 50 entries