@Test public void acknowledge() throws Exception { oauthPerform(user, post("/v1/feed/acknowledge").content(q("{'assetId':'foo123'}"))).andExpect( status().isOk()); verify(feedService).acknowledge(isA(ClientAppUserAccessToken.class), eq(FlakeId.fromString("foo123"))); }
@ApiOperation(value = "[feed] Acknowledge a FeedAsset", notes = "A FeedAsset set to acknowledged will treat all assets before it as read. " + "Typically you should acknowledge the latest feedAssetId you received " + "when the user open news feed window in your app.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/acknowledge", method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE }) public void acknowledge(ClientAppUserAccessToken token, @Valid @RequestBody AcknowledgeEntry entry) { feedService.acknowledge(token, entry.assetId); }
V1FeedResource { @ApiOperation(value = "[feed] Acknowledge a FeedAsset", notes = "A FeedAsset set to acknowledged will treat all assets before it as read. " + "Typically you should acknowledge the latest feedAssetId you received " + "when the user open news feed window in your app.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/acknowledge", method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE }) public void acknowledge(ClientAppUserAccessToken token, @Valid @RequestBody AcknowledgeEntry entry) { feedService.acknowledge(token, entry.assetId); } }
V1FeedResource { @ApiOperation(value = "[feed] Acknowledge a FeedAsset", notes = "A FeedAsset set to acknowledged will treat all assets before it as read. " + "Typically you should acknowledge the latest feedAssetId you received " + "when the user open news feed window in your app.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/acknowledge", method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE }) public void acknowledge(ClientAppUserAccessToken token, @Valid @RequestBody AcknowledgeEntry entry) { feedService.acknowledge(token, entry.assetId); }  }
V1FeedResource { @ApiOperation(value = "[feed] Acknowledge a FeedAsset", notes = "A FeedAsset set to acknowledged will treat all assets before it as read. " + "Typically you should acknowledge the latest feedAssetId you received " + "when the user open news feed window in your app.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/acknowledge", method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE }) public void acknowledge(ClientAppUserAccessToken token, @Valid @RequestBody AcknowledgeEntry entry) { feedService.acknowledge(token, entry.assetId); }  @ApiOperation(value = "[feed] Latest news", notes = "List latest FeedAssets, 25 assets a page. " + "To retrieve next page, passing last asset id of previous page in parameter start-asset-id.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/news", method = RequestMethod.GET) List<V1FeedAssetDto> news(ClientAppUserAccessToken token,
      @RequestParam(value = "start-asset-id", required = false) FlakeId startAssetId); @ApiOperation(value = "[feed] Get unread count in news feed", notes = "Get unread count in news feed, max value is 11 regardless real unread count. " + "The method should not repeat invoke in short time, we recommend once per 5 minutes.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/news-unread-count", method = RequestMethod.GET) int newsUnreadCount(ClientAppUserAccessToken token); @ApiOperation(value = "[feed] Acknowledge a FeedAsset", notes = "A FeedAsset set to acknowledged will treat all assets before it as read. " + "Typically you should acknowledge the latest feedAssetId you received " + "when the user open news feed window in your app.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/acknowledge", method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE }) void acknowledge(ClientAppUserAccessToken token,
      @Valid @RequestBody AcknowledgeEntry entry); }
V1FeedResource { @ApiOperation(value = "[feed] Acknowledge a FeedAsset", notes = "A FeedAsset set to acknowledged will treat all assets before it as read. " + "Typically you should acknowledge the latest feedAssetId you received " + "when the user open news feed window in your app.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/acknowledge", method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE }) public void acknowledge(ClientAppUserAccessToken token, @Valid @RequestBody AcknowledgeEntry entry) { feedService.acknowledge(token, entry.assetId); }  @ApiOperation(value = "[feed] Latest news", notes = "List latest FeedAssets, 25 assets a page. " + "To retrieve next page, passing last asset id of previous page in parameter start-asset-id.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/news", method = RequestMethod.GET) List<V1FeedAssetDto> news(ClientAppUserAccessToken token,
      @RequestParam(value = "start-asset-id", required = false) FlakeId startAssetId); @ApiOperation(value = "[feed] Get unread count in news feed", notes = "Get unread count in news feed, max value is 11 regardless real unread count. " + "The method should not repeat invoke in short time, we recommend once per 5 minutes.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/news-unread-count", method = RequestMethod.GET) int newsUnreadCount(ClientAppUserAccessToken token); @ApiOperation(value = "[feed] Acknowledge a FeedAsset", notes = "A FeedAsset set to acknowledged will treat all assets before it as read. " + "Typically you should acknowledge the latest feedAssetId you received " + "when the user open news feed window in your app.") @RequiredScope(ClientAppScope.FEED) @RequestMapping(value = "/acknowledge", method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE }) void acknowledge(ClientAppUserAccessToken token,
      @Valid @RequestBody AcknowledgeEntry entry);  }