Java calls the Google DFP API

Source: Internet
Author: User

Google DFP System (DoubleClick for publishers) is a free advertising management tool provided by Google for AD publishers. The company is currently using this system because of its frequent operations, therefore, we wanted to put operations in our own system. We called their DFP systems through APIS. We thought that Google did not publish such an API. Later, we found that there was actually a problem, it is also very detailed. After reading the Chinese introduction to this API on the internet, I wrote a blog to introduce it. Because the official API is very detailed, I will only tell you the link here. You can cut the link by yourself.

Address of 1 Google dfp api for Java: http://code.google.com/p/google-api-dfp-java/

Click the downloads tab to download the latest code,

2 API Quick Start: https://developers.google.com/doubleclick-publishers/docs/start

There are examples of calls in various languages, such as Java, as follows:

DfpUser user = new DfpUser (email, password, networkCode, applicationName);InventoryServiceInterface inventoryService = user.getService(DfpService.V201204.INVENTORY_SERVICE);// Build the statement to retrieve all ad unitsStatement statement = new Statement();statement.setQuery("LIMIT 500");// Retrieve all ad units.AdUnitPage page = inventoryService.getAdUnitsByStatement(statement);// Display all ad units.if (page.getResults() != null) {  for (AdUnit adUnit : page.getResults()) {    System.out.println("Ad unit with id \"" + adUnit.getId()        + "\" and name \"" + adUnit.getName() + "\".");  }} else {  System.out.println("No results found.");}

3 Java API calls each example: http://code.google.com/p/google-api-dfp-java/source/browse/trunk#trunk/examples

There are very detailed call examples, including the advertisement unit, display location, order, and so on. You can refer

4 detailed documentation: https://developers.google.com/doubleclick-publishers/

Here is a detailed introduction, but only in English.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.