SuccessWhale.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:Onosendai 作者:
public TweetList getFeed (final SuccessWhaleFeed feed, final String sinceId, final Collection<Meta> extraMetas) throws SuccessWhaleException {
        return authenticated(new SwCall<TweetList>() {
            private String url;

            @Override
            public TweetList invoke (final HttpClient client) throws IOException {
                this.url = makeAuthedUrl(API_FEED, "&sources=", URLEncoder.encode(feed.getSources(), "UTF-8"));

                // FIXME disabling this until SW finds a way to accept it on mixed feeds [issue 89].
//              if (sinceId != null) this.url += "&since_id=" + sinceId;

                final HttpGet req = new HttpGet(this.url);
                AndroidHttpClient.modifyRequestToAcceptGzipResponse(req);
                return client.execute(req, new FeedHandler(getAccount(), extraMetas));
            }

            @Override
            public String describeFailure (final Exception e) {
                return "Failed to fetch feed '" + feed + "' from '" + this.url + "': " + e.toString();
            }
        });
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号