Back to project page ReadabilitySDK.
The source code is released under:
MIT License
If you think the Android project ReadabilitySDK listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.idemidov.readability.command; /*w w w . ja v a 2 s . c om*/ import com.idemidov.readability.command.params_builders.ParamsBuilder; import com.idemidov.readability.data.BookmarksRootResponse; import com.idemidov.readability.parser.BookmarksRootParser; import com.idemidov.readability.parser.Parser; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.client.utils.URLEncodedUtils; import org.json.JSONException; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import oauth.signpost.OAuthConsumer; import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; import oauth.signpost.exception.OAuthCommunicationException; import oauth.signpost.exception.OAuthExpectationFailedException; import oauth.signpost.exception.OAuthMessageSignerException; public class GetBookmarksCommand extends BaseCommand<BookmarksRootResponse> { private ParamsBuilder paramsBuilder; public GetBookmarksCommand(OAuthConsumer consumer, ParamsBuilder paramsBuilder) { super(consumer); this.paramsBuilder = paramsBuilder; } @Override Parser<BookmarksRootResponse> getParser() { return new BookmarksRootParser(); } @Override String getUrl() { return ROOT_URL.concat("bookmarks"); } @Override HttpUriRequest getHttpUriRequest() throws URISyntaxException { URI uri = new URI(getUrl().concat("?").concat(URLEncodedUtils.format(paramsBuilder.build(), "utf-8"))); HttpGet get = new HttpGet(uri); return get; } }