Package com.github.hakko.musiccabinet.domain.model.library

Examples of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation


  protected static final String HUNDRED = "100";
 
  protected static final String OFFSET = "offset";
 
  public String get(String artistName, String mbid, int offset) throws ApplicationException {
    WebserviceInvocation invocation = new WebserviceInvocation(
        MB_RELEASE_GROUPS, new Artist(artistName));
    List<NameValuePair> params = new ArrayList<>();
    params.add(new BasicNameValuePair(QUERY, format(PATTERN, mbid)));
    params.add(new BasicNameValuePair(LIMIT, HUNDRED));
    params.add(new BasicNameValuePair(OFFSET, valueOf(offset)));
View Full Code Here


  protected static final String HUNDRED = "100";
 
  protected static final String OFFSET = "offset";
 
  public String get(String artistName, String mbid, int offset) throws ApplicationException {
    WebserviceInvocation invocation = new WebserviceInvocation(
        MB_RELEASE_GROUPS, new Artist(artistName));
    List<NameValuePair> params = new ArrayList<>();
    params.add(new BasicNameValuePair(QUERY, format(PATTERN, mbid)));
    params.add(new BasicNameValuePair(LIMIT, HUNDRED));
    params.add(new BasicNameValuePair(OFFSET, valueOf(offset)));
View Full Code Here

public class AlbumInfoClient extends AbstractWSGetClient {

  public static final String METHOD = "album.getinfo";
 
  public WSResponse getAlbumInfo(Album album) throws ApplicationException {
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(ALBUM_GET_INFO, album);

    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_ARTIST, album.getArtist().getName()));
    params.add(new BasicNameValuePair(PARAM_ALBUM, album.getName()));
View Full Code Here

 
  protected static final String LIMIT = "limit";
  protected static final String ONE = "1";
 
  public String get(String artistName) throws ApplicationException {
    WebserviceInvocation invocation = new WebserviceInvocation(
        MB_ARTIST_QUERY, new Artist(artistName));
    List<NameValuePair> params = new ArrayList<>();
    params.add(new BasicNameValuePair(QUERY, ARTIST + escape(artistName)));
    params.add(new BasicNameValuePair(LIMIT, ONE));
    return executeWSRequest(invocation, PATH, params);
View Full Code Here

  public static final String METHOD = "library.gettracks";
 
  public static final String LIMIT = "1000";
 
  public WSResponse getLibraryTracks(short page, String user) throws ApplicationException {
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(GET_SCROBBLED_TRACKS, page);

    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_USER, user));
    params.add(new BasicNameValuePair(PARAM_PAGE, Short.toString(page)));
View Full Code Here

public class TrackSimilarityClient extends AbstractWSGetClient {

  public static final String METHOD = "track.getsimilar";
 
  public WSResponse getTrackSimilarity(Track track) throws ApplicationException {
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(TRACK_GET_SIMILAR, track);

    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_ARTIST, track.getArtist().getName()));
    params.add(new BasicNameValuePair(PARAM_TRACK, track.getName()));
View Full Code Here

public class GroupWeeklyArtistChartClient extends AbstractWSGetClient {

  public static final String METHOD = "group.getweeklyartistchart";
 
  public WSResponse getWeeklyArtistChart(LastFmGroup lastFmGroup) throws ApplicationException {
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(GROUP_WEEKLY_ARTIST_CHART, lastFmGroup);

    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_GROUP, lastFmGroup.getName()));
   
View Full Code Here

public class ArtistSimilarityClient extends AbstractWSGetClient {

  public static final String METHOD = "artist.getsimilar";
 
  public WSResponse getArtistSimilarity(Artist artist) throws ApplicationException {
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(ARTIST_GET_SIMILAR, artist);

    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_ARTIST, artist.getName()));
   
View Full Code Here

  }
 
  public WSResponse getUserRecommendedArtists(String lastFmUsername) throws ApplicationException {
    LastFmUser user = lastFmDao.getLastFmUser(lastFmUsername);
   
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(USER_GET_RECOMMENDED_ARTISTS, user);
   
    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_LIMIT, "100"));
    params.add(new BasicNameValuePair(PARAM_SK, user.getSessionKey()));
View Full Code Here

  public static final String METHOD = "user.getLovedTracks";
 
  public static final String LIMIT = "100";

  public WSResponse getUserLovedTracks(LastFmUser user, short page) throws ApplicationException {
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(USER_GET_LOVED_TRACKS, user, page);

    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_LIMIT, LIMIT));
    params.add(new BasicNameValuePair(PARAM_USER, user.getLastFmUsername()));
View Full Code Here

TOP

Related Classes of com.github.hakko.musiccabinet.domain.model.library.WebserviceInvocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.