Beispiel #1
0
        private async Task ListItemsAsync()
        {
            var brands = await _bynderClient.GetAssetService().GetBrandsAsync();

            Console.WriteLine($"Brands: [{string.Join(", ", brands.Select(m => m.Name))}]");

            var mediaList = await _bynderClient.GetAssetService().GetMediaListAsync(
                new MediaQuery
            {
                Type  = AssetType.Image,
                Limit = 10,
                Page  = 1,
            }
                );

            Console.WriteLine($"Assets: [{string.Join(", ", mediaList.Select(m => m.Name))}]");

            var collectionList = await _bynderClient.GetCollectionService().GetCollectionsAsync(
                new GetCollectionsQuery
            {
                Limit = 10,
                Page  = 1,
            }
                );

            Console.WriteLine($"Collections: [{string.Join(", ", mediaList.Select(m => m.Name))}]");
        }
        private static async Task QueryBynder(IBynderClient client)
        {
            var mediaList = await client.GetAssetService().GetMediaListAsync(new MediaQuery());

            foreach (var media in mediaList)
            {
                Console.WriteLine(media.Name);
            }

            var collectionList = await client.GetCollectionService().GetCollectionsAsync(new GetCollectionsQuery());

            foreach (var collection in collectionList)
            {
                Console.WriteLine(collection.Name);
            }
        }