public async Task should_get_place_comments() { var request = new PlaceListRequest(); request.Lang = "ru"; var res = await request.ExecuteAsync(); Assert.IsNotNull(res); Assert.IsTrue(res.Count > 0); var first = res.Results.First(); var commentsRequest = new PlaceCommentsRequest(); commentsRequest.PlaceId = first.Id; var fieldBuilder = new FieldsBuilder(); commentsRequest.Fields = fieldBuilder.WithField(CommentFields.USER) .WithField(CommentFields.ID) .WithField(CommentFields.IS_DELETED) .WithField(CommentFields.DATE_POSTED) .WithField(CommentFields.REPLIES_COUNT) .WithField(CommentFields.REPLY_TO) .WithField(CommentFields.TEXT) .WithField(CommentFields.THREAD) .Build(); var commentsResponse = await commentsRequest.ExecuteAsync(); Assert.IsNotNull(commentsResponse); }
public async Task <ICommentsResponse> GetPlaceComments(long placeId) { var request = new PlaceCommentsRequest(); request.Lang = _culture; request.PlaceId = placeId; var res = await request.ExecuteAsync(); return(res); }