示例#1
0
    /// <inheritdoc />
    public async Task <IListingResponseModel <LanguageVariantModel> > ListLanguageVariantsByTypeAsync(Reference identifier)
    {
        if (identifier == null)
        {
            throw new ArgumentNullException(nameof(identifier));
        }

        var endpointUrl = _urlBuilder.BuildListVariantsByTypeUrl(identifier);
        var response    = await _actionInvoker.InvokeReadOnlyMethodAsync <LanguageVariantsListingResponseServerModel>(endpointUrl, HttpMethod.Get);

        return(new ListingResponseModel <LanguageVariantModel>(
                   (token, url) => GetNextListingPageAsync <LanguageVariantsListingResponseServerModel, LanguageVariantModel>(token, url),
                   response.Pagination?.Token,
                   endpointUrl,
                   response.Variants));
    }