1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
##################################################
# CampaignService_services.py
# generated by ZSI.generate.wsdl2python
##################################################
from CampaignService_services_types import *
import urlparse, types
from ZSI.TCcompound import ComplexType, Struct
from ZSI import client
import ZSI
# Locator
class CampaignServiceLocator:
CampaignServiceInterface_address = "https://adwords.google.com:443/api/adwords/cm/v200909/CampaignService"
def getCampaignServiceInterfaceAddress(self):
return CampaignServiceLocator.CampaignServiceInterface_address
def getCampaignServiceInterface(self, url=None, **kw):
return CampaignServiceSoapBindingSOAP(url or CampaignServiceLocator.CampaignServiceInterface_address, **kw)
# Methods
class CampaignServiceSoapBindingSOAP:
def __init__(self, url, **kw):
kw.setdefault("readerclass", None)
kw.setdefault("writerclass", None)
# no resource properties
self.binding = client.Binding(url=url, **kw)
# no ws-addressing
# get: getCampaign
def getCampaign(self, request):
if isinstance(request, getCampaignRequest) is False:
raise TypeError, "%s incorrect request type" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction="", **kw)
# no output wsaction
response = self.binding.Receive(getCampaignResponse.typecode)
return response
# mutate: getCampaign
def mutateCampaign(self, request):
if isinstance(request, mutateCampaignRequest) is False:
raise TypeError, "%s incorrect request type" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction="", **kw)
# no output wsaction
response = self.binding.Receive(mutateCampaignResponse.typecode)
return response
getCampaignRequest = ns0.getCampaign_Dec().pyclass
getCampaignResponse = ns0.getCampaignResponse_Dec().pyclass
mutateCampaignRequest = ns0.mutateCampaign_Dec().pyclass
mutateCampaignResponse = ns0.mutateCampaignResponse_Dec().pyclass
|