• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Bynder / bynder-java-sdk / 7053396997

30 Nov 2023 11:13PM UTC coverage: 41.549% (-3.8%) from 45.356%
7053396997

push

github

ahongbynder
API-1822 resolve package name

708 of 1704 relevant lines covered (41.55%)

0.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/bynder/sdk/sample/TagsSample.java
1
package com.bynder.sdk.sample;
2

3
import com.bynder.sdk.configuration.Configuration;
4
import com.bynder.sdk.model.Tag;
5
import com.bynder.sdk.service.BynderClient;
6
import com.bynder.sdk.service.asset.AssetService;
7
import com.bynder.sdk.util.Utils;
8

9
import java.io.IOException;
10
import java.net.URISyntaxException;
11
import java.net.URL;
12

13
import java.util.List;
14
import java.util.Map;
15
import java.util.Properties;
16

17
import org.slf4j.Logger;
18
import org.slf4j.LoggerFactory;
19

20
public class TagsSample {
×
21
    private static final Logger LOG = LoggerFactory.getLogger(TagsSample.class);
×
22

23
    public static void main(final String[] args) throws URISyntaxException, IOException {
24
        /**
25
         * Loads app.properties file under src/main/resources
26
         */
27
        Properties appProperties = Utils.loadConfig("app");
×
28

29
        // Initialize BynderClient with a permanent token
30
        BynderClient client = BynderClient.Builder.create(
×
31
                new Configuration.Builder(new URL(appProperties.getProperty("BASE_URL")))
×
32
                        .setPermanentToken(appProperties.getProperty("PERMANENT_TOKEN")).build());
×
33

34
        AssetService assetService = client.getAssetService();
×
35

36
        // get tags and media count for each tag
37
        List<Tag> assetTags = assetService.getTags().blockingSingle().body();
×
38
        if (assetTags != null && !assetTags.isEmpty()) {
×
39
            for (Tag assetTag : assetTags) {
×
40
                LOG.info("Asset Tag ID: " + assetTag.getId());
×
41
                LOG.info("Asset Tag: " + assetTag.getTag());
×
42
                LOG.info("Asset Tag Media Count: " + assetTag.getMediaCount());
×
43
            }
×
44
        }
45
    }
×
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc