Package com.github.hakko.musiccabinet.parser.lastfm

Examples of com.github.hakko.musiccabinet.parser.lastfm.AuthSessionParserImpl


    LOG.debug("identifyLastFmUser(" + token + ")");
    WSResponse wsResponse = authSessionClient.getAuthSession(token);
    if (wsResponse.wasCallAllowed() && wsResponse.wasCallSuccessful()) {
      StringUtil stringUtil = new StringUtil(wsResponse.getResponseBody());
      AuthSessionParser authSessionParser =
          new AuthSessionParserImpl(stringUtil.getInputStream());
      return authSessionParser.getLastFmUser();
    } else {
      LOG.debug("wsResponse: " + wsResponse.getResponseBody());
      throw new ApplicationException("Could not get session key for user! (code "
          + wsResponse.getErrorCode() + ", " + wsResponse.getErrorMessage() + ")");
    }
View Full Code Here

TOP

Related Classes of com.github.hakko.musiccabinet.parser.lastfm.AuthSessionParserImpl

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.