Package org.apache.http.message

Examples of org.apache.http.message.BasicNameValuePair


  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)));
    params.add(new BasicNameValuePair(PARAM_LIMIT, LIMIT));

    return executeWSRequest(webserviceInvocation, params);
  }
View Full Code Here


  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()));
   
    return executeWSRequest(webserviceInvocation, params);
  }
View Full Code Here

  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()));
   
    return executeWSRequest(webserviceInvocation, params);
  }
View Full Code Here

  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()));
   
    return executeWSRequest(webserviceInvocation, params);
  }
View Full Code Here

   
    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()));
   
    return executeWSRequest(webserviceInvocation, params);
  }
View Full Code Here

   * log anything. It's OK because tag info is never updated, it's just called
   * once per tag.
   */
  public WSResponse getTagInfo(String tagName, String lang) throws ApplicationException {
    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_TAG, tagName));
    params.add(new BasicNameValuePair(PARAM_LANG, lang));
   
    return executeWSRequest(null, params);
  }
View Full Code Here

  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()));
    params.add(new BasicNameValuePair(PARAM_PAGE, Short.toString(page)));
   
    return executeWSRequest(webserviceInvocation, params);
  }
View Full Code Here

  public static final String METHOD = "track.scrobble";
 
  public WSResponse scrobble(Scrobble scrobble) throws ApplicationException {
    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_ARTIST, scrobble.getTrack().getMetaData().getArtist()));
    params.add(new BasicNameValuePair(PARAM_TRACK, scrobble.getTrack().getName()));
    params.add(new BasicNameValuePair(PARAM_TIMESTAMP, ""+(scrobble.getStartTime().getMillis()/1000)));
    params.add(new BasicNameValuePair(PARAM_ALBUM, scrobble.getTrack().getMetaData().getAlbum()));
    params.add(new BasicNameValuePair(PARAM_SK, scrobble.getLastFmUser().getSessionKey()));
   
    return executeWSRequest(params);
  }
View Full Code Here

  public WSResponse getTopArtists(Tag tag) throws ApplicationException {
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(TAG_GET_TOP_ARTISTS, tag);

    List<NameValuePair> params = getDefaultParameterList();
    params.add(new BasicNameValuePair(PARAM_METHOD, METHOD));
    params.add(new BasicNameValuePair(PARAM_TAG, tag.getName()));
   
    return executeWSRequest(webserviceInvocation, params);
  }
View Full Code Here

  public WSResponse getArtistInfo(Artist artist, String lang) throws ApplicationException {
    WebserviceInvocation webserviceInvocation =
      new WebserviceInvocation(ARTIST_GET_INFO, artist);

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

TOP

Related Classes of org.apache.http.message.BasicNameValuePair

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.