Class Beatport

    • Constructor Detail

      • Beatport

        public Beatport()
        Beatport webservice. Authorization is repeatedly attempted on initialization and on each use after authorization expired or access was denied.
        See Also:
        authorize(), isAuthorized()
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Charts
        Name of this chart provider.
        Specified by:
        getName in interface Charts
        Returns:
        chart provider name
      • lookup

        public List<AudioSong> lookup​(AudioSong song)
                               throws IOException
        Description copied from interface: UberMusic
        Looks up metadata for a song.
        Specified by:
        lookup in interface UberMusic
        Parameters:
        song - song (query by example)
        Returns:
        reference songs, empty list, if the metadata is unavailable
        Throws:
        IOException - IOException
      • getCharts

        public List<PlayList> getCharts​(Locale market)
                                 throws IOException
        Description copied from interface: Charts
        Fetch charts in the form of PlayLists for the given Locale. These lists may be specific to genre or other properties.
        Specified by:
        getCharts in interface Charts
        Parameters:
        market - locale market to use for lookup, if the implementation supports localization
        Returns:
        list of charts
        Throws:
        IOException
      • getNewReleases

        public List<PlayList> getNewReleases​(Locale market)
                                      throws IOException
        Description copied from interface: NewReleases
        Fetch new releases in the form of PlayLists for the given Locale. These lists may be specific to genre or other properties.
        Specified by:
        getNewReleases in interface NewReleases
        Parameters:
        market - locale market to use for lookup, if the implementation supports localization
        Returns:
        list of new releases
        Throws:
        IOException
      • getArtists

        public List<AudioArtist> getArtists​(AudioSong song)
                                     throws IOException
        Description copied from interface: UberMusic
        Lookup artists for a song. The default implementation returns an empty list.
        Specified by:
        getArtists in interface UberMusic
        Parameters:
        song - song
        Returns:
        list of similar artists that seem to match the given song
        Throws:
        IOException - IOException
      • getArtists

        public List<AudioArtist> getArtists​(String artist)
                                     throws IOException
        Get list of artists with a given name.
        Parameters:
        artist - artist name
        Returns:
        list of artists, or empty list of none are found
        Throws:
        IOException
      • getArtist

        public AudioArtist getArtist​(long artistId)
                              throws IOException
        Get artist with Beatport id.
        Parameters:
        artistId - id
        Returns:
        an artist object or null, if not found.
        Throws:
        IOException
      • getTracks

        public List<AudioSong> getTracks​(String name,
                                         String artist,
                                         String album)
                                  throws IOException
        Get list of tracks matching the given criteria. Any of the parameters may be null. If all parameters are null, an empty list is returned.
        Parameters:
        name - title
        artist - artist name
        album - release name
        Returns:
        a list of matching tracks.
        Throws:
        IOException
      • getTrack

        public AudioSong getTrack​(long id)
                           throws IOException
        Get track for a given Beatport id.
        Parameters:
        id - id
        Returns:
        track or null of not found
        Throws:
        IOException
      • getMostPopular

        public List<AudioSong> getMostPopular​(Long genreId,
                                              String country)
                                       throws IOException
        Get most popular tracks for a given genre and country/market.
        Parameters:
        genreId - genre id
        country - two char country code
        Returns:
        ordered list of tracks
        Throws:
        IOException
        See Also:
        getGenres()
      • deauthorize

        public void deauthorize()
        De-authorize this account.
        See Also:
        isAuthorized()
      • authorize

        public void authorize()
        Initiate authorization procedure. This method is asynchronous. You must not assume that authorization happened, once this method returns. Instead, register a listener for the authorized property.
        See Also:
        isAuthorized()
      • removePropertyChangeListener

        public void removePropertyChangeListener​(PropertyChangeListener listener)