examples/AdWords/v201809/AdvancedOperations/AddDynamicPageFeed.php
private static function createFeedItems(
        AdWordsServices $adWordsServices,
        AdWordsSession $session,
        DSAFeedDetails $feedDetails,
        $labelName
    ) {
        $feedItemService = $adWordsServices->get($session, FeedItemService::class);

        // Create operations to add feed items.
        $rentalCars = self::createDsaUrlAddOperation(
            $feedDetails,
            'http://www.example.com/discounts/rental-cars',
            $labelName
        );
        $hotelDeals = self::createDsaUrlAddOperation(
            $feedDetails,
            'http://www.example.com/discounts/hotel-deals',
            $labelName
        );
        $flightDeals = self::createDsaUrlAddOperation(
            $feedDetails,
            'http://www.example.com/discounts/flight-deals',
            $labelName
        );

        // Add feed item operations on the server and print out some information.
        $result = $feedItemService->mutate(
            [$rentalCars, $hotelDeals, $flightDeals]
        );
        foreach ($result->getValue() as $feedItem) {
            printf(
                "Feed item with feed item ID %d was added.\n",
                $feedItem->getFeedItemId()
            );
        }
    }
private static function createFeedItems(
        AdWordsServices $adWordsServices,
        AdWordsSession $session,
        DSAFeedDetails $feedDetails,
        $labelName
    ) {
        $feedItemService = $adWordsServices->get($session, FeedItemService::class);

        // Create operations to add feed items.
        $rentalCars = self::createDsaUrlAddOperation(
            $feedDetails,
            'http://www.example.com/discounts/rental-cars',
            $labelName
        );
        $hotelDeals = self::createDsaUrlAddOperation(
            $feedDetails,
            'http://www.example.com/discounts/hotel-deals',
            $labelName
        );
        $flightDeals = self::createDsaUrlAddOperation(
            $feedDetails,
            'http://www.example.com/discounts/flight-deals',
            $labelName
        );

        // Add feed item operations on the server and print out some information.
        $result = $feedItemService->mutate(
            [$rentalCars, $hotelDeals, $flightDeals]
        );
        foreach ($result->getValue() as $feedItem) {
            printf(
                "Feed item with feed item ID %d was added.\n",
                $feedItem->getFeedItemId()
            );
        }
    }
private static function createFeedItems ( AdWordsServices $ adWordsServices , AdWordsSession $ session , DSAFeedDetails $ feedDetails , $ labelName ) { $ feedItemService = $ adWordsServices -> get ( $ session , FeedItemService :: class ) ; // Create operations to add feed items. $ rentalCars = self :: createDsaUrlAddOperation ( $ feedDetails , 'http://www.example.com/discounts/rental-cars' , $ labelName ) ; $ hotelDeals = self :: createDsaUrlAddOperation ( $ feedDetails , 'http://www.example.com/discounts/hotel-deals' , $ labelName ) ; $ flightDeals = self :: createDsaUrlAddOperation ( $ feedDetails , 'http://www.example.com/discounts/flight-deals' , $ labelName ) ; // Add feed item operations on the server and print out some information. $ result = $ feedItemService -> mutate ( [ $ rentalCars , $ hotelDeals , $ flightDeals ] ) ; foreach ( $ result -> getValue ( ) as $ feedItem ) { printf ( "Feed item with feed item ID %d was added.\n" , $ feedItem -> getFeedItemId ( ) ) ; } }
Creates the page URLs in the DSA page feed.
Creates the page URLs in the DSA page feed .