com.google.api.services.adsense.model.AdClients

Here are the examples of the java api class com.google.api.services.adsense.model.AdClients taken from open source projects.

1. AdSenseClient#getClientId()

Project: andlytics
File: AdSenseClient.java
private static String getClientId(AdSense adsense, Account account) throws IOException {
    AdClients adClients = adsense.accounts().adclients().list(account.getId()).setMaxResults(MAX_LIST_PAGE_SIZE).setPageToken(null).execute();
    if (adClients.getItems() == null || adClients.getItems().isEmpty()) {
        return null;
    }
    // we assume there is only one(?)
    return adClients.getItems().get(0).getId();
}