oas 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/README.markdown +69 -0
- data/Rakefile +8 -0
- data/lib/oas/api.rb +56 -0
- data/lib/oas/client/campaign.rb +16 -0
- data/lib/oas/client/creative.rb +15 -0
- data/lib/oas/client/database.rb +96 -0
- data/lib/oas/client/notification.rb +15 -0
- data/lib/oas/client/utils.rb +16 -0
- data/lib/oas/client.rb +15 -0
- data/lib/oas/configuration.rb +45 -0
- data/lib/oas/core_ext/hash.rb +57 -0
- data/lib/oas/core_ext/object.rb +6 -0
- data/lib/oas/error.rb +17 -0
- data/lib/oas/version.rb +3 -0
- data/lib/oas.rb +31 -0
- data/oas.gemspec +28 -0
- data/spec/fixtures/read_advertiser.xml +49 -0
- data/spec/fixtures/read_agency.xml +49 -0
- data/spec/fixtures/read_campaign.xml +121 -0
- data/spec/fixtures/read_campaign_group.xml +31 -0
- data/spec/fixtures/read_creative.xml +52 -0
- data/spec/fixtures/read_keyname.xml +29 -0
- data/spec/fixtures/read_keyword.xml +27 -0
- data/spec/fixtures/read_notification.xml +31 -0
- data/spec/fixtures/read_page.xml +33 -0
- data/spec/fixtures/read_section.xml +30 -0
- data/spec/fixtures/read_site.xml +32 -0
- data/spec/fixtures/read_site_group.xml +33 -0
- data/spec/fixtures/wsdl.xml +37 -0
- data/spec/oas/client/campaign_spec.rb +16 -0
- data/spec/oas/client/creative_spec.rb +17 -0
- data/spec/oas/client/database_spec.rb +111 -0
- data/spec/oas/client/notification_spec.rb +16 -0
- data/spec/oas_spec.rb +14 -0
- data/spec/spec_helper.rb +29 -0
- metadata +149 -0
@@ -0,0 +1,121 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<Campaign>
|
13
|
+
<Overview>
|
14
|
+
<Id>campaign_id</Id>
|
15
|
+
<AdvertiserId>AnuncianteA</AdvertiserId>
|
16
|
+
<Name>default_campaign_name</Name>
|
17
|
+
<AgencyId>AgencyId</AgencyId>
|
18
|
+
<Description/>
|
19
|
+
<ProductId>default-product</ProductId>
|
20
|
+
<Status>L</Status>
|
21
|
+
<CampaignGroups/>
|
22
|
+
<CompetitiveCategories/>
|
23
|
+
<ExternalUsers/>
|
24
|
+
<InternalQuickReport>keysearch</InternalQuickReport>
|
25
|
+
<ExternalQuickReport>keysearch</ExternalQuickReport>
|
26
|
+
<WhoCreated>realmedia</WhoCreated>
|
27
|
+
<WhenCreated>2011-02-27 18:40:20</WhenCreated>
|
28
|
+
<WhoModified>realmedia</WhoModified>
|
29
|
+
<WhenModified>2011-03-30 15:12:32</WhenModified>
|
30
|
+
</Overview>
|
31
|
+
<Schedule>
|
32
|
+
<Impressions>0</Impressions>
|
33
|
+
<Clicks>0</Clicks>
|
34
|
+
<Uniques>0</Uniques>
|
35
|
+
<Weight>0</Weight>
|
36
|
+
<PriorityLevel>1</PriorityLevel>
|
37
|
+
<Completion>S</Completion>
|
38
|
+
<StartDate/>
|
39
|
+
<EndDate/>
|
40
|
+
<Reach>O</Reach>
|
41
|
+
<DailyImp>0</DailyImp>
|
42
|
+
<DailyClicks>0</DailyClicks>
|
43
|
+
<DailyUniq>0</DailyUniq>
|
44
|
+
<SmoothOrAsap>A</SmoothOrAsap>
|
45
|
+
<ImpOverrun>0</ImpOverrun>
|
46
|
+
<CompanionPositions/>
|
47
|
+
<StrictCompanions>N</StrictCompanions>
|
48
|
+
<PrimaryFrequency>
|
49
|
+
<ImpPerVisitor>0</ImpPerVisitor>
|
50
|
+
<ClickPerVisitor>0</ClickPerVisitor>
|
51
|
+
<FreqScope>0</FreqScope>
|
52
|
+
</PrimaryFrequency>
|
53
|
+
<SecondaryFrequency>
|
54
|
+
<ImpPerVisitor>0</ImpPerVisitor>
|
55
|
+
<FreqScope>0</FreqScope>
|
56
|
+
</SecondaryFrequency>
|
57
|
+
<HourOfDay/>
|
58
|
+
<DayOfWeek/>
|
59
|
+
<UserTimeZone>N</UserTimeZone>
|
60
|
+
<Sections/>
|
61
|
+
</Schedule>
|
62
|
+
<Pages>
|
63
|
+
<Url>www.247realmedia.com/home</Url>
|
64
|
+
</Pages>
|
65
|
+
<Target>
|
66
|
+
<ExcludeTargets>N</ExcludeTargets>
|
67
|
+
<TopLevelDomain/>
|
68
|
+
<Domain/>
|
69
|
+
<Bandwidth/>
|
70
|
+
<Continent/>
|
71
|
+
<Country/>
|
72
|
+
<State/>
|
73
|
+
<AreaCode/>
|
74
|
+
<Msa/>
|
75
|
+
<Dma/>
|
76
|
+
<City/>
|
77
|
+
<Zip/>
|
78
|
+
<Os/>
|
79
|
+
<Browser/>
|
80
|
+
<BrowserV/>
|
81
|
+
<SearchType>A</SearchType>
|
82
|
+
<SearchTerm/>
|
83
|
+
<Cookie/>
|
84
|
+
<AgeFrom/>
|
85
|
+
<AgeTo/>
|
86
|
+
<Gender>
|
87
|
+
<Code>E</Code>
|
88
|
+
</Gender>
|
89
|
+
<IncomeFrom/>
|
90
|
+
<IncomeTo/>
|
91
|
+
<SubscriberCode/>
|
92
|
+
<PreferenceFlags/>
|
93
|
+
<Cluster/>
|
94
|
+
</Target>
|
95
|
+
<Exclude>
|
96
|
+
<Sites/>
|
97
|
+
<Pages/>
|
98
|
+
</Exclude>
|
99
|
+
<Billing>
|
100
|
+
<Cpm>0.0000</Cpm>
|
101
|
+
<Cpc>0.0000</Cpc>
|
102
|
+
<Cpa>0.00</Cpa>
|
103
|
+
<FlatRate>0.00</FlatRate>
|
104
|
+
<Tax>0.0</Tax>
|
105
|
+
<AgencyCommission>0.00</AgencyCommission>
|
106
|
+
<PaymentMethod>C</PaymentMethod>
|
107
|
+
<PurchaseOrder/>
|
108
|
+
<SalesRepresentative/>
|
109
|
+
<CommissionPercent>0.0000</CommissionPercent>
|
110
|
+
<Notes/>
|
111
|
+
<IsYieldManaged>N</IsYieldManaged>
|
112
|
+
<BillTo>G</BillTo>
|
113
|
+
</Billing>
|
114
|
+
</Campaign>
|
115
|
+
</Response>
|
116
|
+
</AdXML>
|
117
|
+
]]>
|
118
|
+
</result>
|
119
|
+
</ns1:OasXmlRequestResponse>
|
120
|
+
</soapenv:Body>
|
121
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<CampaignGroup>
|
13
|
+
<Id>campaign_group_id</Id>
|
14
|
+
<Description>Added via the API</Description>
|
15
|
+
<Notes>This is the Notes field text.</Notes>
|
16
|
+
<ExternalUsers/>
|
17
|
+
<InternalQuickReport>to-date</InternalQuickReport>
|
18
|
+
<ExternalQuickReport>short</ExternalQuickReport>
|
19
|
+
<Campaigns/>
|
20
|
+
<WhoCreated>ducheol</WhoCreated>
|
21
|
+
<WhenCreated>02/20/2009 11:12:58</WhenCreated>
|
22
|
+
<WhoModified></WhoModified>
|
23
|
+
<WhenModified></WhenModified>
|
24
|
+
</CampaignGroup>
|
25
|
+
</Response>
|
26
|
+
</AdXML>
|
27
|
+
]]>
|
28
|
+
</result>
|
29
|
+
</ns1:OasXmlRequestResponse>
|
30
|
+
</soapenv:Body>
|
31
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<Creative>
|
13
|
+
<CampaignId>campaign_id</CampaignId>
|
14
|
+
<Id>creative_id</Id>
|
15
|
+
<Name>creative01</Name>
|
16
|
+
<Description></Description>
|
17
|
+
<ClickUrl>http://www.google.com</ClickUrl>
|
18
|
+
<Positions>
|
19
|
+
<Position>Bottom</Position>
|
20
|
+
<Position>Left</Position>
|
21
|
+
</Positions>
|
22
|
+
<CreativeTypesId>unknown_type</CreativeTypesId>
|
23
|
+
<Display>Y</Display>
|
24
|
+
<Height>30</Height>
|
25
|
+
<Width>30</Width>
|
26
|
+
<TargetWindow></TargetWindow>
|
27
|
+
<AltText></AltText>
|
28
|
+
<DiscountImpressions>Y</DiscountImpressions>
|
29
|
+
<StartDate>2008-08-29</StartDate>
|
30
|
+
<EndDate>2008-10-01</EndDate>
|
31
|
+
<Weight>70</Weight>
|
32
|
+
<ExpireImmediately>Y</ExpireImmediately>
|
33
|
+
<NoCache>Y</NoCache>
|
34
|
+
<ExtraHTML></ExtraHTML>
|
35
|
+
<ExtraText></ExtraText>
|
36
|
+
<RichMediaCpm>0.0</RichMediaCpm>
|
37
|
+
<BrowserV/>
|
38
|
+
<SequenceNo></SequenceNo>
|
39
|
+
<CountOnDownload>N</CountOnDownload>
|
40
|
+
<File contentType='text/html' fileType='creative' fileName='hi.html'/>
|
41
|
+
<WhoCreated>realmedia</WhoCreated>
|
42
|
+
<WhenCreated>2008-09-03 22:28:14</WhenCreated>
|
43
|
+
<WhoModified>realmedia</WhoModified>
|
44
|
+
<WhenModified>2008-09-03 22:28:14</WhenModified>
|
45
|
+
</Creative>
|
46
|
+
</Response>
|
47
|
+
</AdXML>
|
48
|
+
]]>
|
49
|
+
</result>
|
50
|
+
</ns1:OasXmlRequestResponse>
|
51
|
+
</soapenv:Body>
|
52
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<Keyname>
|
13
|
+
<Name>keyname_name</Name>
|
14
|
+
<Values>
|
15
|
+
<Value>webservice</Value>
|
16
|
+
<Value>OAS API</Value>
|
17
|
+
</Values>
|
18
|
+
<WhoCreated>realmedia</WhoCreated>
|
19
|
+
<WhenCreated>2008-12-04 21:15:25</WhenCreated>
|
20
|
+
<WhoModified></WhoModified>
|
21
|
+
<WhenModified></WhenModified>
|
22
|
+
</Keyname>
|
23
|
+
</Response>
|
24
|
+
</AdXML>
|
25
|
+
]]>
|
26
|
+
</result>
|
27
|
+
</ns1:OasXmlRequestResponse>
|
28
|
+
</soapenv:Body>
|
29
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<Keyword>
|
13
|
+
<Id>keyword_id</Id>
|
14
|
+
<InternalQuickReport>standard</InternalQuickReport>
|
15
|
+
<ExternalQuickReport>to-date</ExternalQuickReport>
|
16
|
+
<WhoCreated>realmedia</WhoCreated>
|
17
|
+
<WhenCreated>2008-12-04 21:15:25</WhenCreated>
|
18
|
+
<WhoModified></WhoModified>
|
19
|
+
<WhenModified></WhenModified>
|
20
|
+
</Keyword>
|
21
|
+
</Response>
|
22
|
+
</AdXML>
|
23
|
+
]]>
|
24
|
+
</result>
|
25
|
+
</ns1:OasXmlRequestResponse>
|
26
|
+
</soapenv:Body>
|
27
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<Notification>
|
13
|
+
<CampaignId>campaign_id</CampaignId>
|
14
|
+
<EventName>event_name</EventName>
|
15
|
+
<DaysBefore>2</DaysBefore>
|
16
|
+
<EmailAddresses>
|
17
|
+
<Email>nobody@247realmedia.com</Email>
|
18
|
+
</EmailAddresses>
|
19
|
+
<WhenMailSent></WhenMailSent>
|
20
|
+
<WhoCreated>realmedia</WhoCreated>
|
21
|
+
<WhenCreated>2008-12-11 02:09:25</WhenCreated>
|
22
|
+
<WhoModified>realmedia</WhoModified>
|
23
|
+
<WhenModified></WhenModified>
|
24
|
+
</Notification>
|
25
|
+
</Response>
|
26
|
+
</AdXML>
|
27
|
+
]]>
|
28
|
+
</result>
|
29
|
+
</ns1:OasXmlRequestResponse>
|
30
|
+
</soapenv:Body>
|
31
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<Page>
|
13
|
+
<LocationKey>5531</LocationKey>
|
14
|
+
<Url>page_url</Url>
|
15
|
+
<Site>www.mySite.com</Site>
|
16
|
+
<SiteId>MySite</SiteId>
|
17
|
+
<Description>My site</Description>
|
18
|
+
<Sections>
|
19
|
+
<SectionId>Film</SectionId>
|
20
|
+
<SectionId>Television</SectionId>
|
21
|
+
</Sections>
|
22
|
+
<WhoCreated>realmedia</WhoCreated>
|
23
|
+
<WhenCreated>2008-12-04 21:15:25</WhenCreated>
|
24
|
+
<WhoModified></WhoModified>
|
25
|
+
<WhenModified></WhenModified>
|
26
|
+
</Page>
|
27
|
+
</Response>
|
28
|
+
</AdXML>
|
29
|
+
]]>
|
30
|
+
</result>
|
31
|
+
</ns1:OasXmlRequestResponse>
|
32
|
+
</soapenv:Body>
|
33
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<Section>
|
13
|
+
<Id>section_id</Id>
|
14
|
+
<Pages>
|
15
|
+
<Url>www.spiderman.com/mutation</Url>
|
16
|
+
<Url>www.hulk.com/powers</Url>
|
17
|
+
<Url>www.spiderman.com</Url>
|
18
|
+
</Pages>
|
19
|
+
<WhoCreated>realmedia</WhoCreated>
|
20
|
+
<WhenCreated>2008-12-04 21:15:25</WhenCreated>
|
21
|
+
<WhoModified></WhoModified>
|
22
|
+
<WhenModified></WhenModified>
|
23
|
+
</Section>
|
24
|
+
</Response>
|
25
|
+
</AdXML>
|
26
|
+
]]>
|
27
|
+
</result>
|
28
|
+
</ns1:OasXmlRequestResponse>
|
29
|
+
</soapenv:Body>
|
30
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<Site>
|
13
|
+
<Id>site_id</Id>
|
14
|
+
<Name>My Site</Name>
|
15
|
+
<Domain>www.mySite.com</Domain>
|
16
|
+
<Notes>This is being used to test the Notes field</Notes>
|
17
|
+
<Sections>
|
18
|
+
<SectionId>Film</SectionId>
|
19
|
+
<SectionId>Television</SectionId>
|
20
|
+
</Sections>
|
21
|
+
<WhoCreated>realmedia</WhoCreated>
|
22
|
+
<WhenCreated>2008-12-04 21:15:25</WhenCreated>
|
23
|
+
<WhoModified></WhoModified>
|
24
|
+
<WhenModified></WhenModified>
|
25
|
+
</Site>
|
26
|
+
</Response>
|
27
|
+
</AdXML>
|
28
|
+
]]>
|
29
|
+
</result>
|
30
|
+
</ns1:OasXmlRequestResponse>
|
31
|
+
</soapenv:Body>
|
32
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
5
|
+
<soapenv:Body>
|
6
|
+
<ns1:OasXmlRequestResponse xmlns:ns1="http://api.oas.tfsm.com/">
|
7
|
+
<result>
|
8
|
+
<![CDATA[
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<AdXML>
|
11
|
+
<Response>
|
12
|
+
<SiteGroup>
|
13
|
+
<Id>site_group_id</Id>
|
14
|
+
<Description>apitestdescriptionUpdated</Description>
|
15
|
+
<Sites>
|
16
|
+
<SiteId>EUAPISite1</SiteId>
|
17
|
+
</Sites>
|
18
|
+
<Notes>ApiTestNotes1234Updated</Notes>
|
19
|
+
<ExternalUsers/>
|
20
|
+
<InternalQuickReport>short</InternalQuickReport>
|
21
|
+
<ExternalQuickReport>to-date</ExternalQuickReport>
|
22
|
+
<WhoCreated>realmedia</WhoCreated>
|
23
|
+
<WhenCreated>01/21/2008 17:35:57</WhenCreated>
|
24
|
+
<WhoModified>realmedia</WhoModified>
|
25
|
+
<WhenModified>01/21/2008 17:46:47</WhenModified>
|
26
|
+
</SiteGroup>
|
27
|
+
</Response>
|
28
|
+
</AdXML>
|
29
|
+
]]>
|
30
|
+
</result>
|
31
|
+
</ns1:OasXmlRequestResponse>
|
32
|
+
</soapenv:Body>
|
33
|
+
</soapenv:Envelope>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
+
<definitions name="OaxApiService" targetNamespace="http://api.oas.tfsm.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://api.oas.tfsm.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<types>
|
4
|
+
</types>
|
5
|
+
<message name="OaxApi_OasXmlRequestResponse">
|
6
|
+
<part name="result" type="xsd:string"/>
|
7
|
+
</message>
|
8
|
+
<message name="OaxApi_OasXmlRequest">
|
9
|
+
<part name="String_1" type="xsd:string"/>
|
10
|
+
<part name="String_2" type="xsd:string"/>
|
11
|
+
<part name="String_3" type="xsd:string"/>
|
12
|
+
<part name="String_4" type="xsd:string"/>
|
13
|
+
</message>
|
14
|
+
<portType name="OaxApi">
|
15
|
+
<operation name="OasXmlRequest" parameterOrder="String_1 String_2 String_3 String_4">
|
16
|
+
<input message="tns:OaxApi_OasXmlRequest"/>
|
17
|
+
<output message="tns:OaxApi_OasXmlRequestResponse"/>
|
18
|
+
</operation>
|
19
|
+
</portType>
|
20
|
+
<binding name="OaxApiBinding" type="tns:OaxApi">
|
21
|
+
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
22
|
+
<operation name="OasXmlRequest">
|
23
|
+
<soap:operation soapAction=""/>
|
24
|
+
<input>
|
25
|
+
<soap:body namespace="http://api.oas.tfsm.com/" use="literal"/>
|
26
|
+
</input>
|
27
|
+
<output>
|
28
|
+
<soap:body namespace="http://api.oas.tfsm.com/" use="literal"/>
|
29
|
+
</output>
|
30
|
+
</operation>
|
31
|
+
</binding>
|
32
|
+
<service name="OaxApiService">
|
33
|
+
<port binding="tns:OaxApiBinding" name="OaxApiPort">
|
34
|
+
<soap:address location="https://oas.realmedianetwork.net:443/oasapi/OaxApi"/>
|
35
|
+
</port>
|
36
|
+
</service>
|
37
|
+
</definitions>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Oas::Client do
|
4
|
+
describe "campaign" do
|
5
|
+
before(:each) do
|
6
|
+
stub_api_call fixture("read_campaign.xml")
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should return a campaign hash for a given id" do
|
10
|
+
response = Oas.campaign("campaign_id")
|
11
|
+
response.should_not be_nil
|
12
|
+
response[:Campaign].should be_a(Hash)
|
13
|
+
response[:Campaign][:Overview][:Id].should eq("campaign_id")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Oas::Client do
|
4
|
+
describe "creative" do
|
5
|
+
before(:each) do
|
6
|
+
stub_api_call fixture("read_creative.xml")
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should return a campaign hash for a given id" do
|
10
|
+
response = Oas.creative("campaign_id", "creative_id")
|
11
|
+
response.should_not be_nil
|
12
|
+
response[:Creative].should be_a(Hash)
|
13
|
+
response[:Creative][:CampaignId].should eq("campaign_id")
|
14
|
+
response[:Creative][:Id].should eq("creative_id")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Oas::Client do
|
4
|
+
describe "advertiser" do
|
5
|
+
before(:each) do
|
6
|
+
stub_api_call fixture("read_advertiser.xml")
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should return an advertiser hash for a given id" do
|
10
|
+
response = Oas.advertiser("advertiser_id")
|
11
|
+
response.should_not be_nil
|
12
|
+
response[:Advertiser][:Id].should eq("advertiser_id")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "agency" do
|
17
|
+
before(:each) do
|
18
|
+
stub_api_call fixture("read_agency.xml")
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should return an agency hash for a given id" do
|
22
|
+
response = Oas.agency("agency_id")
|
23
|
+
response.should_not be_nil
|
24
|
+
response[:Agency][:Id].should eq("agency_id")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "campaign_group" do
|
29
|
+
before(:each) do
|
30
|
+
stub_api_call fixture("read_campaign_group.xml")
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should return a campaign_group hash for a given id" do
|
34
|
+
response = Oas.campaign_group("campaign_group_id")
|
35
|
+
response.should_not be_nil
|
36
|
+
response[:CampaignGroup][:Id].should eq("campaign_group_id")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "keyname" do
|
41
|
+
before(:each) do
|
42
|
+
stub_api_call fixture("read_keyname.xml")
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should return a keyname hash for a given id" do
|
46
|
+
response = Oas.keyname("keyname_name")
|
47
|
+
response.should_not be_nil
|
48
|
+
response[:Keyname][:Name].should eq("keyname_name")
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "keyword" do
|
53
|
+
before(:each) do
|
54
|
+
stub_api_call fixture("read_keyword.xml")
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should return a keyword hash for a given id" do
|
58
|
+
response = Oas.keyword("keyword_id")
|
59
|
+
response.should_not be_nil
|
60
|
+
response[:Keyword][:Id].should eq("keyword_id")
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe "page" do
|
65
|
+
before(:each) do
|
66
|
+
stub_api_call fixture("read_page.xml")
|
67
|
+
end
|
68
|
+
|
69
|
+
it "should return a page hash for a given id" do
|
70
|
+
response = Oas.page("page_url")
|
71
|
+
response.should_not be_nil
|
72
|
+
response[:Page][:Url].should eq("page_url")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe "section" do
|
77
|
+
before(:each) do
|
78
|
+
stub_api_call fixture("read_section.xml")
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should return a section hash for a given id" do
|
82
|
+
response = Oas.section("section_id")
|
83
|
+
response.should_not be_nil
|
84
|
+
response[:Section][:Id].should eq("section_id")
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe "site" do
|
89
|
+
before(:each) do
|
90
|
+
stub_api_call fixture("read_site.xml")
|
91
|
+
end
|
92
|
+
|
93
|
+
it "should return a site hash for a given id" do
|
94
|
+
response = Oas.site("site_id")
|
95
|
+
response.should_not be_nil
|
96
|
+
response[:Site][:Id].should eq("site_id")
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
describe "site_group" do
|
101
|
+
before(:each) do
|
102
|
+
stub_api_call fixture("read_site_group.xml")
|
103
|
+
end
|
104
|
+
|
105
|
+
it "should return a site_group hash for a given id" do
|
106
|
+
response = Oas.site_group("site_group_id")
|
107
|
+
response.should_not be_nil
|
108
|
+
response[:SiteGroup][:Id].should eq("site_group_id")
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Oas::Client do
|
4
|
+
describe "notification" do
|
5
|
+
before(:each) do
|
6
|
+
stub_api_call fixture("read_notification.xml")
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should return a notification hash for a given campaign_id and event_name" do
|
10
|
+
response = Oas.notification("campaign_id", "event_name")
|
11
|
+
response.should_not be_nil
|
12
|
+
response[:Notification][:CampaignId].should eq("campaign_id")
|
13
|
+
response[:Notification][:EventName].should eq("event_name")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/spec/oas_spec.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Oas do
|
4
|
+
describe ".configure" do
|
5
|
+
Oas::Configuration::VALID_OPTIONS_KEYS.each do |key|
|
6
|
+
it "should set the #{key}" do
|
7
|
+
Oas.configure do |config|
|
8
|
+
config.send("#{key}=", key)
|
9
|
+
Oas.send(key).should == key
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|