AdWords API Re: TargetingIdea
that worked Eric. thanks. a bit crazy though. and here was me hoping this migration would be a 5 minute job ;) On Mar 26, 10:28 pm, AdWords API Advisor wrote: > Hi Andy, > > This problem is normally seen when a client is using .NET without the > client library. The cause is that the .NET wsdl to code generator > will under certain circumstances not generate certain classes. More > information is available here: > > http://code.google.com/p/google-api-adwords-dotnet/wiki/NoClientLibra > > It appears that you are using the client library however. Did you > rebuild the classes at any point? > > Best, > - Eric Koleda, AdWords API Team > > On Mar 26, 8:25 am, Andy Precise wrote: > > > > > oh come on API experts, you must have an idea what's going on here. i > > can't progress any further until i can use this class [TargetingIdeas] > > > i've got an excel project to convert from v1.3 to v2009. it uses the > > existing getKeywordsFromSite method. > > > i'm re-writing it to use TargetingIdeaSelector. > > > It's been fine up until the point that i need to useTargetingIdea. > > and it is NOT recognised as a type. everything else is fine: > > TargetingIdeaPage, SearchParameter, Type_AttributeMapEntry, Attribute > > etc. > > > this thing is declared in the WSDL along with all the other types. so > > it's there. why isn't it recognised ? > > > this is the sample code i've been using from another posting on this > > site (see bottom of post). i've had to convert this to VB.NET, but > > everything starts going wrong with these lines: > > > TargetingIdea[] keywords = mySiteKeywordGroups.entries; > > foreach (TargetingIdeakeywordFromAPI in keywords) > > > TargetingIdeas is not recognised as a type. why i'm not doing > > anything out of the ordinary. i've added a web service, added an > > Imports statement at the top of the spreadsheet. all other types/ > > methods etc. are regonised. but not this one !!! aag !!! > > > could i be doing something wrong ? is this a bug ? > > > PLEASE PLEASE PLEASE HELP ! > > > -- CODE BEGINS > > > AdWordsUser user = new AdWordsUser(); > > > // Get the service. > > TargetingIdeaService service = > > > (TargetingIdeaService)user.GetService(AdWordsService.v200909.TargetingIdeaS > > > > ervice); > > > TargetingIdeaSelector selector = new > > TargetingIdeaSelector(); > > selector.ideaType = IdeaType.KEYWORD; > > selector.ideaTypeSpecified = true; > > selector.requestType = RequestType.IDEAS; > > selector.requestTypeSpecified = true; > > selector.requestedAttributeTypes = new AttributeType[] > > { AttributeType.KEYWORD, > > AttributeType.GLOBAL_MONTHLY_SEARCHES, > > AttributeType.COMPETITION }; > > > RelatedToUrlSearchParameter param = new > > RelatedToUrlSearchParameter(); > > param.urls = new string[] { url }; > > > selector.searchParameters = new SearchParameter[] > > { param }; > > > Paging paging = new Paging(); > > paging.startIndex = 0; > > paging.startIndexSpecified = true; > > paging.numberResults = 100; > > paging.numberResultsSpecified = true; > > > selector.paging = paging; > > > // Get a list of keywords for this site. > > TargetingIdeaPage mySiteKeywordGroups = > > service.getBulkKeywordIdeas(selector); > > > TargetingIdea[] keywords = mySiteKeywordGroups.entries; > > > foreach (TargetingIdeakeywordFromAPI in keywords) > > { > > foreach (Type_AttributeMapEntry entry in > > keywordFromAPI.data) > > { > > if (entry.key == AttributeType.KEYWORD) > > { > > //Code is entering here - and I can read the > > keyword text > > } > > else if (entry.key == AttributeType.COMPETITION) > > { > > //entry.key is never COMPETITION > > } > > else if (entry.key == > > AttributeType.GLOBAL_MONTHLY_SEARCHES) > > { > > //entry.key is never GLOBAL_MONTHLY_SEARCHES > > } > > } > > } > > > -- CODE ENDS > > > On Mar 25, 6:06 pm, Andy Precise wrote: > > > > in addition ... i checked the wsdl file for this service and > > >TargetingIdeais declared, along with other types > > > Type_AttributeMapEntry, TargetingIdeaPage. etc. the latter of all > > > which are recognised. but notTargetingIdea. > > > > would appreciate any ideas on this. > > > > thanks > > > > On Mar 25, 2:52 pm, Andy Precise wrote: > > > > > hi, > > > > > this is a strange one. i must be doing something wrong, but i can't > > > > figure out what. > > > > > i'm migrating from v1.3 to v2009 as many others ha
AdWords API Re: TargetingIdea
Hi Andy, This problem is normally seen when a client is using .NET without the client library. The cause is that the .NET wsdl to code generator will under certain circumstances not generate certain classes. More information is available here: http://code.google.com/p/google-api-adwords-dotnet/wiki/NoClientLibrary#b._wsdl.exe_doesn't_generate_some_types_properly. It appears that you are using the client library however. Did you rebuild the classes at any point? Best, - Eric Koleda, AdWords API Team On Mar 26, 8:25 am, Andy Precise wrote: > oh come on API experts, you must have an idea what's going on here. i > can't progress any further until i can use this class [TargetingIdeas] > > i've got an excel project to convert from v1.3 to v2009. it uses the > existing getKeywordsFromSite method. > > i'm re-writing it to use TargetingIdeaSelector. > > It's been fine up until the point that i need to use TargetingIdea. > and it is NOT recognised as a type. everything else is fine: > TargetingIdeaPage, SearchParameter, Type_AttributeMapEntry, Attribute > etc. > > this thing is declared in the WSDL along with all the other types. so > it's there. why isn't it recognised ? > > this is the sample code i've been using from another posting on this > site (see bottom of post). i've had to convert this to VB.NET, but > everything starts going wrong with these lines: > > TargetingIdea[] keywords = mySiteKeywordGroups.entries; > foreach (TargetingIdea keywordFromAPI in keywords) > > TargetingIdeas is not recognised as a type. why i'm not doing > anything out of the ordinary. i've added a web service, added an > Imports statement at the top of the spreadsheet. all other types/ > methods etc. are regonised. but not this one !!! aag !!! > > could i be doing something wrong ? is this a bug ? > > PLEASE PLEASE PLEASE HELP ! > > -- CODE BEGINS > > AdWordsUser user = new AdWordsUser(); > > // Get the service. > TargetingIdeaService service = > > (TargetingIdeaService)user.GetService(AdWordsService.v200909.TargetingIdeaS > ervice); > > TargetingIdeaSelector selector = new > TargetingIdeaSelector(); > selector.ideaType = IdeaType.KEYWORD; > selector.ideaTypeSpecified = true; > selector.requestType = RequestType.IDEAS; > selector.requestTypeSpecified = true; > selector.requestedAttributeTypes = new AttributeType[] > { AttributeType.KEYWORD, > AttributeType.GLOBAL_MONTHLY_SEARCHES, > AttributeType.COMPETITION }; > > RelatedToUrlSearchParameter param = new > RelatedToUrlSearchParameter(); > param.urls = new string[] { url }; > > selector.searchParameters = new SearchParameter[] > { param }; > > Paging paging = new Paging(); > paging.startIndex = 0; > paging.startIndexSpecified = true; > paging.numberResults = 100; > paging.numberResultsSpecified = true; > > selector.paging = paging; > > // Get a list of keywords for this site. > TargetingIdeaPage mySiteKeywordGroups = > service.getBulkKeywordIdeas(selector); > > TargetingIdea[] keywords = mySiteKeywordGroups.entries; > > foreach (TargetingIdea keywordFromAPI in keywords) > { > foreach (Type_AttributeMapEntry entry in > keywordFromAPI.data) > { > if (entry.key == AttributeType.KEYWORD) > { > //Code is entering here - and I can read the > keyword text > } > else if (entry.key == AttributeType.COMPETITION) > { > //entry.key is never COMPETITION > } > else if (entry.key == > AttributeType.GLOBAL_MONTHLY_SEARCHES) > { > //entry.key is never GLOBAL_MONTHLY_SEARCHES > } > } > } > > -- CODE ENDS > > On Mar 25, 6:06 pm, Andy Precise wrote: > > > > > in addition ... i checked the wsdl file for this service and > > TargetingIdea is declared, along with other types > > Type_AttributeMapEntry, TargetingIdeaPage. etc. the latter of all > > which are recognised. but not TargetingIdea. > > > would appreciate any ideas on this. > > > thanks > > > On Mar 25, 2:52 pm, Andy Precise wrote: > > > > hi, > > > > this is a strange one. i must be doing something wrong, but i can't > > > figure out what. > > > > i'm migrating from v1.3 to v2009 as many others have been. > > > > i'm using the TargetingIdeaService service to get keywords for a > > > given site. > > > > i'm updating an excel project (VB.NET) > > > > i've been looking for several code examples over the internet on how > > > to migrate from the old getKeywordsFromSite service call to the new > > > on
AdWords API Re: TargetingIdea
oh come on API experts, you must have an idea what's going on here. i can't progress any further until i can use this class [TargetingIdeas] i've got an excel project to convert from v1.3 to v2009. it uses the existing getKeywordsFromSite method. i'm re-writing it to use TargetingIdeaSelector. It's been fine up until the point that i need to use TargetingIdea. and it is NOT recognised as a type. everything else is fine: TargetingIdeaPage, SearchParameter, Type_AttributeMapEntry, Attribute etc. this thing is declared in the WSDL along with all the other types. so it's there. why isn't it recognised ? this is the sample code i've been using from another posting on this site (see bottom of post). i've had to convert this to VB.NET, but everything starts going wrong with these lines: TargetingIdea[] keywords = mySiteKeywordGroups.entries; foreach (TargetingIdea keywordFromAPI in keywords) TargetingIdeas is not recognised as a type. why i'm not doing anything out of the ordinary. i've added a web service, added an Imports statement at the top of the spreadsheet. all other types/ methods etc. are regonised. but not this one !!! aag !!! could i be doing something wrong ? is this a bug ? PLEASE PLEASE PLEASE HELP ! -- CODE BEGINS AdWordsUser user = new AdWordsUser(); // Get the service. TargetingIdeaService service = (TargetingIdeaService)user.GetService(AdWordsService.v200909.TargetingIdeaS ervice); TargetingIdeaSelector selector = new TargetingIdeaSelector(); selector.ideaType = IdeaType.KEYWORD; selector.ideaTypeSpecified = true; selector.requestType = RequestType.IDEAS; selector.requestTypeSpecified = true; selector.requestedAttributeTypes = new AttributeType[] { AttributeType.KEYWORD, AttributeType.GLOBAL_MONTHLY_SEARCHES, AttributeType.COMPETITION }; RelatedToUrlSearchParameter param = new RelatedToUrlSearchParameter(); param.urls = new string[] { url }; selector.searchParameters = new SearchParameter[] { param }; Paging paging = new Paging(); paging.startIndex = 0; paging.startIndexSpecified = true; paging.numberResults = 100; paging.numberResultsSpecified = true; selector.paging = paging; // Get a list of keywords for this site. TargetingIdeaPage mySiteKeywordGroups = service.getBulkKeywordIdeas(selector); TargetingIdea[] keywords = mySiteKeywordGroups.entries; foreach (TargetingIdea keywordFromAPI in keywords) { foreach (Type_AttributeMapEntry entry in keywordFromAPI.data) { if (entry.key == AttributeType.KEYWORD) { //Code is entering here - and I can read the keyword text } else if (entry.key == AttributeType.COMPETITION) { //entry.key is never COMPETITION } else if (entry.key == AttributeType.GLOBAL_MONTHLY_SEARCHES) { //entry.key is never GLOBAL_MONTHLY_SEARCHES } } } -- CODE ENDS On Mar 25, 6:06 pm, Andy Precise wrote: > in addition ... i checked the wsdl file for this service and > TargetingIdea is declared, along with other types > Type_AttributeMapEntry, TargetingIdeaPage. etc. the latter of all > which are recognised. but not TargetingIdea. > > would appreciate any ideas on this. > > thanks > > On Mar 25, 2:52 pm, Andy Precise wrote: > > > > > hi, > > > this is a strange one. i must be doing something wrong, but i can't > > figure out what. > > > i'm migrating from v1.3 to v2009 as many others have been. > > > i'm using the TargetingIdeaService service to get keywords for a > > given site. > > > i'm updating an excel project (VB.NET) > > > i've been looking for several code examples over the internet on how > > to migrate from the old getKeywordsFromSite service call to the new > > one and i've come across a problem. > > > the code samples i've found all reference an object called > > TargetingIdea. Here's an example (2nd line) > > > - > > TargetingIdeaPage mySiteKeywordGroups = > > service.getBulkKeywordIdeas(selector); > > TargetingIdea[] keywords = mySiteKeywordGroups.entries; > > > foreach (TargetingIdea keywordFromAPI in keywords) > > { > > - > > > the problem is my project doesn't recognise this TargetingIdea object. > > at all. it recognises all other objects for this new service, but not > > this one. > > > i've got the web service set up correctly (as far as i know). this is > > the URL > > :https://adwords.google.com/api/adwords/o/v200909/TargetingIdeaService
AdWords API Re: TargetingIdea
in addition ... i checked the wsdl file for this service and TargetingIdea is declared, along with other types Type_AttributeMapEntry, TargetingIdeaPage. etc. the latter of all which are recognised. but not TargetingIdea. would appreciate any ideas on this. thanks On Mar 25, 2:52 pm, Andy Precise wrote: > hi, > > this is a strange one. i must be doing something wrong, but i can't > figure out what. > > i'm migrating from v1.3 to v2009 as many others have been. > > i'm using the TargetingIdeaService service to get keywords for a > given site. > > i'm updating an excel project (VB.NET) > > i've been looking for several code examples over the internet on how > to migrate from the old getKeywordsFromSite service call to the new > one and i've come across a problem. > > the code samples i've found all reference an object called > TargetingIdea. Here's an example (2nd line) > > - > TargetingIdeaPage mySiteKeywordGroups = > service.getBulkKeywordIdeas(selector); > TargetingIdea[] keywords = mySiteKeywordGroups.entries; > > foreach (TargetingIdea keywordFromAPI in keywords) > { > - > > the problem is my project doesn't recognise this TargetingIdea object. > at all. it recognises all other objects for this new service, but not > this one. > > i've got the web service set up correctly (as far as i know). this is > the URL > :https://adwords.google.com/api/adwords/o/v200909/TargetingIdeaService... > > so, what gives ? any ideas ? has this object been sunsetted ? :) > > if you need any more info, please let me know > > thanks very much -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Have you migrated to v200909 yet? The v13 sunset is on April 22, 2010. Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en To unsubscribe from this group, send email to adwords-api+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.