Beispiel #1
0
  /** 获取用户的新粉丝、新回复、新赞事件列表 */
  public List<ActivityVO> listNewActivities() {
    super.requireAuthorization();

    return Arrays.asList(
        context
            .getRestTemplate()
            .getForObject(
                ApiContext.API_SERVER_BASE + URI_LIST_NEW_ACTIVITIES, ActivityVO[].class));
  }
Beispiel #2
0
  /** 获取某人相关的事件流 */
  public List<ActivityVO> listRelatedActivities(int pageNumber, int pageSize) {
    super.requireAuthorization();

    LinkedMultiValueMap<String, String> request = new LinkedMultiValueMap<String, String>();
    request.add("pageNumber", String.valueOf(pageNumber));
    request.add("pageSize", String.valueOf(pageSize));
    URI uri = buildUri(URI_LIST_RELATED_ACTIVITIES, request);
    return Arrays.asList(context.getRestTemplate().getForObject(uri, ActivityVO[].class));
  }