Esempio n. 1
0
        public void BuildAssetsUrlFromId_WithGivenAssetId_ReturnsExpectedUrl()
        {
            var assetId        = Guid.NewGuid();
            var expectedResult = $"https://manage.kenticocloud.com/projects/{PROJECT_ID}/assets/{assetId}";
            var actualResult   = _builder.BuildAssetsUrl(AssetIdentifier.ById(assetId));

            Assert.Equal(expectedResult, actualResult);
        }
Esempio n. 2
0
    /// <inheritdoc />
    public async Task <AssetModel> GetAssetAsync(Reference identifier)
    {
        if (identifier == null)
        {
            throw new ArgumentNullException(nameof(identifier));
        }

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

        return(response);
    }