Hi Pete,

Although the data type for a campaign ID is now a long in v2009, the
numbers returned should still be in the int range.  That is, you
should be able to convert the long to an int safely.  In the future
the IDs may be larger than ints, but not until v13 is sunset.

Best,
- Eric Koleda, AdWords API Team

On Nov 2, 3:06 pm, "Pete Lavetsky (AdWords API Guru)"
<[email protected]> wrote:
> We recently came across an issue where a Campaign created through the
> API was given an Id that needed a primitive type of long rather than
> int ( we're using the Java library ).   We're currently using the v13
> library and noticed that in the v2009 library the id field of Campaign
> is of type long rather than int.
>
> package com.google.api.adwords.v13;
>
> public class Campaign  implements java.io.Serializable{
>         private int id;
>
> package com.google.api.adwords.v200909.cm;
>
> public class Campaign  implements java.io.Serializable{
>     private java.lang.Long id;
>
> There's currently no way to use the v13 library and retrieve Campaign
> info if the id is a long:
>
> public interface CampaignInterface extends java.rmi.Remote {
>         com.google.api.adwords.v13.reseller.Campaign getCampaign(int i)
> throws java.rmi.RemoteException,
> com.google.api.adwords.v13.reseller.ApiException;
>
> Was the Id we were given a mistake?  If not, what route do I take to
> work with this Campaign.  Using v2009 at this point is not an option.
> v13 documentation still states that you get a Campaign by passing an
> int parameter
>
> http://code.google.com/apis/adwords/docs/developer/CampaignService.ht...
>
> Pete

--

You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en.


Reply via email to