public async Task <ISelectionDetailsResponse> GetSelectionDetails(long selectionId)
        {
            var request = new SelectionDetailsRequest();

            request.Lang        = _culture;
            request.Expand      = SelectionListRequest.ExpandNames.IMAGES;
            request.SelectionId = selectionId;
            request.TextFormat  = TextFormatEnum.Text;

            var res = await request.ExecuteAsync();

            return(res);
        }
Beispiel #2
0
        public async Task should_get_selection_details()
        {
            var request = new SelectionListRequest();;

            request.Lang = "ru";

            var res = await request.ExecuteAsync();

            Assert.IsNotNull(res);
            Assert.IsTrue(res.Count > 0);

            var first          = res.Results.First();
            var detailsRequest = new SelectionDetailsRequest();

            detailsRequest.SelectionId = first.Id;

            var detailsResponse = await detailsRequest.ExecuteAsync();

            Assert.IsNotNull(detailsResponse);
        }