sem4r 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gemtest +0 -0
- data/Gemfile +2 -22
- data/Gemfile.lock +43 -20
- data/Rakefile +4 -2
- data/bin/sem +2 -6
- data/lib/sem4r/adwords.rb +8 -142
- data/lib/sem4r/campaign/campaign_account_extension.rb +4 -5
- data/lib/sem4r/profile.rb +173 -0
- data/lib/sem4r/sem4r_utilities.rb +113 -0
- data/lib/sem4r/v13_report/report.rb +5 -0
- data/lib/sem4r/version.rb +27 -0
- data/lib/sem4r.rb +5 -26
- data/lib/sem4r_cli/cli_sem.rb +116 -170
- data/lib/sem4r_cli/commands/{cli_ads.rb → cmd_ads.rb} +4 -4
- data/lib/sem4r_cli/commands/{cli_campaign.rb → cmd_campaign.rb} +7 -7
- data/lib/sem4r_cli/commands/{cli_clients.rb → cmd_clients.rb} +4 -5
- data/lib/sem4r_cli/commands/{cli_ideas.rb → cmd_ideas.rb} +7 -5
- data/lib/sem4r_cli/commands/{cli_info.rb → cmd_info.rb} +6 -6
- data/lib/sem4r_cli/commands/{cli_job.rb → cmd_job.rb} +4 -2
- data/lib/sem4r_cli/commands/{cli_keywords.rb → cmd_keywords.rb} +4 -4
- data/lib/sem4r_cli/commands/{cli_profile.rb → cmd_profile.rb} +23 -19
- data/lib/sem4r_cli/commands/{cli_repdef.rb → cmd_repdef.rb} +6 -4
- data/lib/sem4r_cli/commands/{cli_report.rb → cmd_report.rb} +8 -6
- data/lib/sem4r_cli.rb +6 -4
- data/lib/sem4r_debug_client/client.rb +200 -0
- data/lib/sem4r_debug_client.rb +31 -0
- data/lib/sem4r_sinatra/cli_server.rb +45 -0
- data/lib/sem4r_sinatra/helpers.rb +60 -0
- data/lib/sem4r_sinatra/web_server.rb +46 -0
- data/lib/sem4r_sinatra.rb +13 -0
- data/lib/sem4r_soap/http_connector.rb +5 -6
- data/lib/sem4r_soap/soap_dumper.rb +3 -14
- data/lib/sem4r_soap/soap_service.rb +5 -5
- data/lib/sem4r_soap/soap_service_v2010.rb +2 -2
- data/lib/sem4r_soap.rb +24 -0
- data/sem4r.gemspec +75 -313
- data/spec/fixtures/password.example.yml +5 -3
- data/spec/helpers/rspec_matchers.rb +2 -19
- data/spec/helpers/rspec_sem4r_helper.rb +25 -9
- data/spec/rspec_helper.rb +7 -0
- data/spec/sem4r/ad_group/ad_group_spec.rb +2 -3
- data/spec/sem4r/ad_group_ad/fixtures/mutate_add_mobile_ad-req.xml +8 -11
- data/spec/sem4r/ad_group_criterion/fixtures/mutate_add_negative_keyword-req.xml +1 -3
- data/spec/sem4r/adwords_spec.rb +0 -5
- data/spec/sem4r/bulk_mutate_job/fixtures/get-list_job-req.xml +18 -33
- data/spec/sem4r/bulk_mutate_job/fixtures/get-list_job-res.xml +232 -416
- data/spec/sem4r/bulk_mutate_job/fixtures/mutate-add_job-req.xml +55 -104
- data/spec/sem4r/bulk_mutate_job/fixtures/mutate-add_job-res.xml +25 -47
- data/spec/sem4r/geo_location/fixtures/get-req.xml +23 -40
- data/spec/sem4r/geo_location/fixtures/get-res.xml +31 -59
- data/spec/sem4r/info/fixtures/get-req.xml +19 -32
- data/spec/sem4r/info/fixtures/get-res.xml +16 -26
- data/spec/sem4r/profiles_spec.rb +52 -0
- data/spec/sem4r/report_definition/fixtures/get-list-repdef-req.xml +13 -20
- data/spec/sem4r/report_definition/fixtures/get-list-repdef-res.xml +34 -72
- data/spec/sem4r/report_definition/fixtures/getReportFields-req.xml +13 -22
- data/spec/sem4r/report_definition/fixtures/getReportFields-res.xml +476 -1198
- data/spec/sem4r/report_definition/fixtures/mutate-add-report-req.xml +30 -61
- data/spec/sem4r/report_definition/fixtures/mutate-add-report-res.xml +31 -67
- data/spec/sem4r/report_definition/report_definition_spec.rb +1 -1
- data/spec/sem4r/v13_report/fixtures/schedule_report_job-req.xml +11 -33
- data/spec/sem4r_cli/cli_spec.rb +4 -22
- data/tasks/sem4r.rake +0 -3
- data/tasks/yard.rake +2 -2
- metadata +188 -177
- data/VERSION.yml +0 -5
- data/lib/sem4r_cli/cli_helpers.rb +0 -59
- data/lib/sem4r_cli/cli_mini_framework.rb +0 -147
- data/tasks/jeweler.rake +0 -66
@@ -1,106 +1,57 @@
|
|
1
1
|
<!-- Post to 'https://adwords-sandbox.google.com/api/adwords/job/v201008/BulkMutateJobService' -->
|
2
|
-
|
3
|
-
<env:
|
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
|
-
</description1>
|
58
|
-
<description2>
|
59
|
-
Low-gravity fun for everyone!
|
60
|
-
</description2>
|
61
|
-
</ad>
|
62
|
-
<status>
|
63
|
-
ENABLED
|
64
|
-
</status>
|
65
|
-
</operand>
|
66
|
-
</operations>
|
67
|
-
<operations xsi:type='AdGroupAdOperation'>
|
68
|
-
<operator>
|
69
|
-
ADD
|
70
|
-
</operator>
|
71
|
-
<operand xsi:type='AdGroupAd'>
|
72
|
-
<adGroupId>
|
73
|
-
3000128685
|
74
|
-
</adGroupId>
|
75
|
-
<ad xsi:type='TextAd'>
|
76
|
-
<url>
|
77
|
-
http://www.example.com
|
78
|
-
</url>
|
79
|
-
<displayUrl>
|
80
|
-
www.example.com
|
81
|
-
</displayUrl>
|
82
|
-
<headline>
|
83
|
-
Cruise to Mars Sector 2
|
84
|
-
</headline>
|
85
|
-
<description1>
|
86
|
-
Visit the Red Planet in style.
|
87
|
-
</description1>
|
88
|
-
<description2>
|
89
|
-
Low-gravity fun for everyone!
|
90
|
-
</description2>
|
91
|
-
</ad>
|
92
|
-
<status>
|
93
|
-
ENABLED
|
94
|
-
</status>
|
95
|
-
</operand>
|
96
|
-
</operations>
|
97
|
-
</operationStreams>
|
98
|
-
</request>
|
99
|
-
<numRequestParts>
|
100
|
-
2
|
101
|
-
</numRequestParts>
|
102
|
-
</operand>
|
103
|
-
</operation>
|
104
|
-
</mutate>
|
105
|
-
</env:Body>
|
2
|
+
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://adwords.google.com/api/adwords/cm/v201008" xmlns:s="https://adwords.google.com/api/adwords/cm/v201008">
|
3
|
+
<env:Header>
|
4
|
+
<s:RequestHeader env:mustUnderstand="0">
|
5
|
+
<authToken>***censured***</authToken>
|
6
|
+
<userAgent>Sem4r Adwords Ruby Client Library (http://github.com/sem4r/sem4r)</userAgent>
|
7
|
+
<developerToken>***censured***</developerToken>
|
8
|
+
</s:RequestHeader>
|
9
|
+
</env:Header>
|
10
|
+
<env:Body>
|
11
|
+
<mutate>
|
12
|
+
<operation xsi:type="JobOperation">
|
13
|
+
<operator>ADD</operator>
|
14
|
+
<operand xsi:type="BulkMutateJob">
|
15
|
+
<request>
|
16
|
+
<partIndex>0</partIndex>
|
17
|
+
<operationStreams>
|
18
|
+
<scopingEntityId>
|
19
|
+
<type>CAMPAIGN_ID</type>
|
20
|
+
<value>55131</value>
|
21
|
+
</scopingEntityId>
|
22
|
+
<operations xsi:type="AdGroupAdOperation">
|
23
|
+
<operator>ADD</operator>
|
24
|
+
<operand xsi:type="AdGroupAd">
|
25
|
+
<adGroupId>3000144563</adGroupId>
|
26
|
+
<ad xsi:type="TextAd">
|
27
|
+
<url>http://www.example.com</url>
|
28
|
+
<displayUrl>www.example.com</displayUrl>
|
29
|
+
<headline>Cruise to Mars Sector 1</headline>
|
30
|
+
<description1>Visit the Red Planet in style.</description1>
|
31
|
+
<description2>Low-gravity fun for everyone!</description2>
|
32
|
+
</ad>
|
33
|
+
<status>ENABLED</status>
|
34
|
+
</operand>
|
35
|
+
</operations>
|
36
|
+
<operations xsi:type="AdGroupAdOperation">
|
37
|
+
<operator>ADD</operator>
|
38
|
+
<operand xsi:type="AdGroupAd">
|
39
|
+
<adGroupId>3000144563</adGroupId>
|
40
|
+
<ad xsi:type="TextAd">
|
41
|
+
<url>http://www.example.com</url>
|
42
|
+
<displayUrl>www.example.com</displayUrl>
|
43
|
+
<headline>Cruise to Mars Sector 2</headline>
|
44
|
+
<description1>Visit the Red Planet in style.</description1>
|
45
|
+
<description2>Low-gravity fun for everyone!</description2>
|
46
|
+
</ad>
|
47
|
+
<status>ENABLED</status>
|
48
|
+
</operand>
|
49
|
+
</operations>
|
50
|
+
</operationStreams>
|
51
|
+
</request>
|
52
|
+
<numRequestParts>2</numRequestParts>
|
53
|
+
</operand>
|
54
|
+
</operation>
|
55
|
+
</mutate>
|
56
|
+
</env:Body>
|
106
57
|
</env:Envelope>
|
@@ -1,48 +1,26 @@
|
|
1
|
-
<soap:Envelope xmlns:soap=
|
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
|
-
0
|
27
|
-
</effectiveCustomerId>
|
28
|
-
</context>
|
29
|
-
<Job.Type>
|
30
|
-
BulkMutateJob
|
31
|
-
</Job.Type>
|
32
|
-
<id>
|
33
|
-
39169
|
34
|
-
</id>
|
35
|
-
<policy/>
|
36
|
-
<status>
|
37
|
-
PENDING
|
38
|
-
</status>
|
39
|
-
<numRequestParts>
|
40
|
-
2
|
41
|
-
</numRequestParts>
|
42
|
-
<numRequestPartsReceived>
|
43
|
-
1
|
44
|
-
</numRequestPartsReceived>
|
45
|
-
</rval>
|
46
|
-
</mutateResponse>
|
47
|
-
</soap:Body>
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
2
|
+
<soap:Header>
|
3
|
+
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201008">
|
4
|
+
<requestId>f7381c034cab594c1bad86dd91c2a885</requestId>
|
5
|
+
<operations>1</operations>
|
6
|
+
<responseTime>1357</responseTime>
|
7
|
+
<units>1</units>
|
8
|
+
</ResponseHeader>
|
9
|
+
</soap:Header>
|
10
|
+
<soap:Body>
|
11
|
+
<mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201008">
|
12
|
+
<rval>
|
13
|
+
<context>
|
14
|
+
<authenticatedUserEmail>sem4ruby@gmail.com</authenticatedUserEmail>
|
15
|
+
<effectiveCustomerId>0</effectiveCustomerId>
|
16
|
+
</context>
|
17
|
+
<Job.Type>BulkMutateJob</Job.Type>
|
18
|
+
<id>45550</id>
|
19
|
+
<policy/>
|
20
|
+
<status>PENDING</status>
|
21
|
+
<numRequestParts>2</numRequestParts>
|
22
|
+
<numRequestPartsReceived>1</numRequestPartsReceived>
|
23
|
+
</rval>
|
24
|
+
</mutateResponse>
|
25
|
+
</soap:Body>
|
48
26
|
</soap:Envelope>
|
@@ -1,42 +1,25 @@
|
|
1
1
|
<!-- Post to 'https://adwords-sandbox.google.com/api/adwords/cm/v201008/GeoLocationService' -->
|
2
|
-
|
3
|
-
<env:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Rome
|
26
|
-
</cityName>
|
27
|
-
<countryCode>
|
28
|
-
IT
|
29
|
-
</countryCode>
|
30
|
-
</addresses>
|
31
|
-
<addresses>
|
32
|
-
<cityName>
|
33
|
-
Pisa
|
34
|
-
</cityName>
|
35
|
-
<countryCode>
|
36
|
-
IT
|
37
|
-
</countryCode>
|
38
|
-
</addresses>
|
39
|
-
</s:selector>
|
40
|
-
</s:get>
|
41
|
-
</env:Body>
|
2
|
+
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://adwords.google.com/api/adwords/cm/v201008" xmlns:s="https://adwords.google.com/api/adwords/cm/v201008">
|
3
|
+
<env:Header>
|
4
|
+
<s:RequestHeader env:mustUnderstand="0">
|
5
|
+
<authToken>***censured***</authToken>
|
6
|
+
<userAgent>Sem4r Adwords Ruby Client Library (http://github.com/sem4r/sem4r)</userAgent>
|
7
|
+
<developerToken>***censured***</developerToken>
|
8
|
+
</s:RequestHeader>
|
9
|
+
</env:Header>
|
10
|
+
<env:Body>
|
11
|
+
<s:get>
|
12
|
+
<s:selector>
|
13
|
+
<addresses>
|
14
|
+
<streetAddress>Via Nazionale, 10</streetAddress>
|
15
|
+
<cityName>Rome</cityName>
|
16
|
+
<countryCode>IT</countryCode>
|
17
|
+
</addresses>
|
18
|
+
<addresses>
|
19
|
+
<cityName>Pisa</cityName>
|
20
|
+
<countryCode>IT</countryCode>
|
21
|
+
</addresses>
|
22
|
+
</s:selector>
|
23
|
+
</s:get>
|
24
|
+
</env:Body>
|
42
25
|
</env:Envelope>
|
@@ -1,60 +1,32 @@
|
|
1
|
-
<soap:Envelope xmlns:soap=
|
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
|
-
</streetAddress>
|
33
|
-
<cityName>
|
34
|
-
Roma
|
35
|
-
</cityName>
|
36
|
-
<provinceCode>
|
37
|
-
Lazio
|
38
|
-
</provinceCode>
|
39
|
-
<postalCode>
|
40
|
-
00184
|
41
|
-
</postalCode>
|
42
|
-
<countryCode>
|
43
|
-
IT
|
44
|
-
</countryCode>
|
45
|
-
</address>
|
46
|
-
<encodedLocation>
|
47
|
-
qrvM3QDB3iJsoW5CCm5ELDnrheCfJDpb74yQwvnJlSeV2uWWM7SqEqhwvlaHnOM383ATHFNQRP9+vLgh5ZhGfUhZ7NSmi+eP68KgvuxciuTnoDePQNB14CXChk7/x2h+p01JSnpiHBosblWjonSiBZqdRAeFcqd7jmst7t3qnwCs7PYyXBOKw47hxdiiVPHxagzknR8mvhhR1XjYzfeDS7nZDDAyRFs3x1l7Eq7VG2uNXz0T25VpFEhJfbjXee0c2YbkwcTZJnZLSRKBvyvuudu7oyw2OwSARrTNDnT1gubbhFvThThB1sXIvaHPRlirQDuKHOw9Jdn31LS/wNuxl7OZgV5w631hTdHS/dZUiPTpd2AbGDOMEoPRfdUpkrVQ1fDFXswqXlwgWPVTlrK/B3TVoFR/emc7TztipecXqA9YSc6tMQzJ5IAONn8ZpzLV2tLnpb/s2Zx0y+uEofWTfCvfS5LJ9MFtCobL+x/j99jBpG48wf/4UPGAFuN3Hsa5ZIsgP5J5n85xJmCKtmFhJM+tdnBfXFEhW9egjchy/Optt+2cJzdmAXiPfnsBY5YWGixI12WETHstsvkkZw==
|
48
|
-
</encodedLocation>
|
49
|
-
<GeoLocation.Type>
|
50
|
-
GeoLocation
|
51
|
-
</GeoLocation.Type>
|
52
|
-
</rval>
|
53
|
-
<rval xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='InvalidGeoLocation'>
|
54
|
-
<GeoLocation.Type>
|
55
|
-
InvalidGeoLocation
|
56
|
-
</GeoLocation.Type>
|
57
|
-
</rval>
|
58
|
-
</getResponse>
|
59
|
-
</soap:Body>
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
2
|
+
<soap:Header>
|
3
|
+
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201008">
|
4
|
+
<requestId>c2c29b9711c8a33172f4e89148a6e90f</requestId>
|
5
|
+
<operations>2</operations>
|
6
|
+
<responseTime>225</responseTime>
|
7
|
+
<units>2</units>
|
8
|
+
</ResponseHeader>
|
9
|
+
</soap:Header>
|
10
|
+
<soap:Body>
|
11
|
+
<getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201008">
|
12
|
+
<rval>
|
13
|
+
<geoPoint>
|
14
|
+
<latitudeInMicroDegrees>41901464</latitudeInMicroDegrees>
|
15
|
+
<longitudeInMicroDegrees>12494510</longitudeInMicroDegrees>
|
16
|
+
</geoPoint>
|
17
|
+
<address>
|
18
|
+
<streetAddress>Via Nazionale, 10</streetAddress>
|
19
|
+
<cityName>Roma</cityName>
|
20
|
+
<provinceCode>Lazio</provinceCode>
|
21
|
+
<postalCode>00184</postalCode>
|
22
|
+
<countryCode>IT</countryCode>
|
23
|
+
</address>
|
24
|
+
<encodedLocation>qrvM3QDB3iJscCTi7jtHoR0Z5O2K3dulPdCkbBJYzmhFyl8YTQj0/Pedp5jh/CsA6O13uD0opvSghZguL+8jN7hp/ofnm+yP0jt1oxtu8LiiYNvHruNIJayAotIrRjpkVYTlEeY28MWzm9MvdBmkNiy7NUFs39dl4bEsiBRFxv988rCSXi/GXYVhYdtGsZ8MW0JlevXYeOY3sZFRGu2zt7xOTQSN1rr7nK2cyK84i6m9hucEloPTNVp/pnwETjSEZfBuX/G15MZzuUte780QCMzBYPl0agEKyTEKouv7rQEMk9lzbR3w2osMjTth1KGKZVQfX+BhcTG+gPwsmgqET6Y8ws4l13b4GFPhwg/McPnDSF4ryHbcrrALn6idZt0x001HMBlcrnw57Tel6DPtb9DREnJGpSGnrYvoy3OYyz4BkMjGvw2HP8wxkGDqVMLgmd8UkO3oocaDVe8SvVd3i6+UUBNXw0/Kl+AzY0RTT1ugVHDMtHnKi2M1eMDFK67kSsghWdGKsxNzAfggD7pyT5+C5SkPq9TMKR/0Oe2mIhQOqFvAC2srk+wMtvzYxlzPEf2bnGgfy2vTBbUDVw==</encodedLocation>
|
25
|
+
<GeoLocation.Type>GeoLocation</GeoLocation.Type>
|
26
|
+
</rval>
|
27
|
+
<rval xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="InvalidGeoLocation">
|
28
|
+
<GeoLocation.Type>InvalidGeoLocation</GeoLocation.Type>
|
29
|
+
</rval>
|
30
|
+
</getResponse>
|
31
|
+
</soap:Body>
|
60
32
|
</soap:Envelope>
|
@@ -1,34 +1,21 @@
|
|
1
1
|
<!-- Post to 'https://adwords-sandbox.google.com/api/adwords/info/v201008/InfoService' -->
|
2
|
-
|
3
|
-
<env:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<min>
|
22
|
-
20100101
|
23
|
-
</min>
|
24
|
-
<max>
|
25
|
-
20101209
|
26
|
-
</max>
|
27
|
-
</s:dateRange>
|
28
|
-
<s:apiUsageType>
|
29
|
-
UNIT_COUNT
|
30
|
-
</s:apiUsageType>
|
31
|
-
</s:selector>
|
32
|
-
</s:get>
|
33
|
-
</env:Body>
|
2
|
+
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://adwords.google.com/api/adwords/cm/v201008" xmlns:s="https://adwords.google.com/api/adwords/info/v201008">
|
3
|
+
<env:Header>
|
4
|
+
<s:RequestHeader env:mustUnderstand="0">
|
5
|
+
<authToken>***censured***</authToken>
|
6
|
+
<userAgent>Sem4r Adwords Ruby Client Library (http://github.com/sem4r/sem4r)</userAgent>
|
7
|
+
<developerToken>***censured***</developerToken>
|
8
|
+
</s:RequestHeader>
|
9
|
+
</env:Header>
|
10
|
+
<env:Body>
|
11
|
+
<s:get>
|
12
|
+
<s:selector>
|
13
|
+
<s:dateRange>
|
14
|
+
<min>20100101</min>
|
15
|
+
<max>20101212</max>
|
16
|
+
</s:dateRange>
|
17
|
+
<s:apiUsageType>UNIT_COUNT</s:apiUsageType>
|
18
|
+
</s:selector>
|
19
|
+
</s:get>
|
20
|
+
</env:Body>
|
34
21
|
</env:Envelope>
|
@@ -1,27 +1,17 @@
|
|
1
|
-
<soap:Envelope xmlns:soap=
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</
|
16
|
-
|
17
|
-
</soap:Header>
|
18
|
-
<soap:Body>
|
19
|
-
<getResponse xmlns='https://adwords.google.com/api/adwords/info/v201008' xmlns:ns2='https://adwords.google.com/api/adwords/cm/v201008'>
|
20
|
-
<rval>
|
21
|
-
<cost>
|
22
|
-
0
|
23
|
-
</cost>
|
24
|
-
</rval>
|
25
|
-
</getResponse>
|
26
|
-
</soap:Body>
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
2
|
+
<soap:Header>
|
3
|
+
<ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201008" xmlns="https://adwords.google.com/api/adwords/info/v201008">
|
4
|
+
<ns2:requestId>8372f3c31d7865e7ffd1b5c55d877dad</ns2:requestId>
|
5
|
+
<ns2:operations>1</ns2:operations>
|
6
|
+
<ns2:responseTime>250</ns2:responseTime>
|
7
|
+
<ns2:units>1</ns2:units>
|
8
|
+
</ResponseHeader>
|
9
|
+
</soap:Header>
|
10
|
+
<soap:Body>
|
11
|
+
<getResponse xmlns="https://adwords.google.com/api/adwords/info/v201008" xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201008">
|
12
|
+
<rval>
|
13
|
+
<cost>0</cost>
|
14
|
+
</rval>
|
15
|
+
</getResponse>
|
16
|
+
</soap:Body>
|
27
17
|
</soap:Envelope>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# -------------------------------------------------------------------------
|
3
|
+
# Copyright (c) 2009-2010 Sem4r sem4ruby@gmail.com
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
# -------------------------------------------------------------------------
|
24
|
+
|
25
|
+
require File.expand_path(File.dirname(__FILE__) + '/../rspec_helper')
|
26
|
+
|
27
|
+
describe Profile do
|
28
|
+
|
29
|
+
before(:each) do
|
30
|
+
@test_config_filename = File.expand_path(File.dirname(__FILE__) + "/../fixtures/sem4r.example.yml")
|
31
|
+
@test_password_filename = File.expand_path(File.dirname(__FILE__) + "/../fixtures/password.example.yml")
|
32
|
+
|
33
|
+
@environment = "sandbox"
|
34
|
+
@email = "sem4ruby@sem4r.com"
|
35
|
+
@password = "password"
|
36
|
+
@developer_token = "developer_token"
|
37
|
+
|
38
|
+
@options = {
|
39
|
+
:environment => @environment,
|
40
|
+
:email => @email,
|
41
|
+
:password => @password,
|
42
|
+
:developer_token => @developer_token,
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should list profiles" do
|
47
|
+
values = Profile.profiles(@test_config_filename)
|
48
|
+
values.should have(5).profiles
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
@@ -1,22 +1,15 @@
|
|
1
1
|
<!-- Post to 'https://adwords-sandbox.google.com/api/adwords/cm/v201008/ReportDefinitionService' -->
|
2
|
-
|
3
|
-
<env:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</RequestHeader>
|
16
|
-
</env:Header>
|
17
|
-
<env:Body>
|
18
|
-
<get>
|
19
|
-
<selector/>
|
20
|
-
</get>
|
21
|
-
</env:Body>
|
2
|
+
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://adwords.google.com/api/adwords/cm/v201008">
|
3
|
+
<env:Header>
|
4
|
+
<RequestHeader env:mustUnderstand="0">
|
5
|
+
<authToken>***censured***</authToken>
|
6
|
+
<userAgent>Sem4r Adwords Ruby Client Library (http://github.com/sem4r/sem4r)</userAgent>
|
7
|
+
<developerToken>***censured***</developerToken>
|
8
|
+
</RequestHeader>
|
9
|
+
</env:Header>
|
10
|
+
<env:Body>
|
11
|
+
<get>
|
12
|
+
<selector/>
|
13
|
+
</get>
|
14
|
+
</env:Body>
|
22
15
|
</env:Envelope>
|