Hi,
Thanks for the feedback. We created that example when the LINE 2 and LINE 3
placeholder fields were added to the API and AdWords. At that time, we had users with Feeds for sitelinks that:
- did not have those attributes, hence the add of FeedItemAttributes to the Feed
- feed items without those attributes populated, hence the implementation of UpdateFeedItems()
- a FeedMapping that was missing those attributes, hence the remove and then add of the FeedMapping in UpdateFeedMappings(). Note that the REMOVE/ADD approach is required (instead of a SET) because a FeedMapping is immutable.
If you created your Feed and related objects using the AddSitelinks.php example after November 2013, then you are correct -- there's no need to run UpdateSitelinks. In fact, we may remove UpdateSitelinks in the near future since most people have probably added the LINE 2 and LINE 3 attributes to their feeds by now.
Thanks,
Josh, AdWords API Team