• 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/BrandsSample.java
1
package com.bynder.sdk.sample;
2

3
import com.bynder.sdk.configuration.Configuration;
4
import com.bynder.sdk.model.Brand;
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.Properties;
15

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

19

20
public class BrandsSample {
×
21
    private static final Logger LOG = LoggerFactory.getLogger(BrandsSample.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

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

35
        // Initialize asset service
36
        AssetService assetService = client.getAssetService();
×
37

38
        // Call the API to request for brands
39
        List<Brand> brands = assetService.getBrands().blockingSingle().body();
×
40
        if (brands != null && !brands.isEmpty()) {
×
41
            for (Brand brand : brands) {
×
42
                LOG.info("Brand ID: " + brand.getId());
×
43
                LOG.info("Brand Name: " + brand.getName());
×
44
                LOG.info("Brand Description: " + brand.getDescription());
×
45
            }
×
46
        }
47
    }
×
48
}
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