oas 0.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/.gitignore +6 -6
  2. data/.travis.yml +9 -3
  3. data/Gemfile +4 -4
  4. data/LICENSE +20 -20
  5. data/README.md +47 -0
  6. data/Rakefile +11 -8
  7. data/lib/oas.rb +19 -31
  8. data/lib/oas/client.rb +39 -17
  9. data/lib/oas/configuration.rb +45 -45
  10. data/lib/oas/response.rb +31 -0
  11. data/lib/oas/version.rb +3 -3
  12. data/oas.gemspec +30 -29
  13. data/test/fixtures/successful_response.xml +15 -0
  14. data/test/helper.rb +6 -0
  15. data/test/test_client.rb +49 -0
  16. data/test/test_oas.rb +15 -0
  17. data/test/test_response.rb +22 -0
  18. metadata +85 -61
  19. data/.rspec +0 -2
  20. data/README.markdown +0 -103
  21. data/lib/oas/api.rb +0 -56
  22. data/lib/oas/client/campaigns.rb +0 -25
  23. data/lib/oas/client/databases.rb +0 -96
  24. data/lib/oas/client/notifications.rb +0 -15
  25. data/lib/oas/client/reports.rb +0 -71
  26. data/lib/oas/client/utils.rb +0 -16
  27. data/lib/oas/core_ext/hash.rb +0 -57
  28. data/lib/oas/core_ext/object.rb +0 -6
  29. data/lib/oas/error.rb +0 -17
  30. data/spec/fixtures/read_advertiser.xml +0 -49
  31. data/spec/fixtures/read_agency.xml +0 -49
  32. data/spec/fixtures/read_campaign.xml +0 -121
  33. data/spec/fixtures/read_campaign_group.xml +0 -31
  34. data/spec/fixtures/read_creative.xml +0 -52
  35. data/spec/fixtures/read_keyname.xml +0 -29
  36. data/spec/fixtures/read_keyword.xml +0 -27
  37. data/spec/fixtures/read_notification.xml +0 -31
  38. data/spec/fixtures/read_page.xml +0 -33
  39. data/spec/fixtures/read_section.xml +0 -30
  40. data/spec/fixtures/read_site.xml +0 -32
  41. data/spec/fixtures/read_site_group.xml +0 -33
  42. data/spec/fixtures/wsdl.xml +0 -37
  43. data/spec/oas/client/campaigns_spec.rb +0 -30
  44. data/spec/oas/client/databases_spec.rb +0 -111
  45. data/spec/oas/client/notifications_spec.rb +0 -16
  46. data/spec/oas_spec.rb +0 -14
  47. data/spec/spec_helper.rb +0 -29
@@ -1,121 +0,0 @@
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>
@@ -1,31 +0,0 @@
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>
@@ -1,52 +0,0 @@
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>
@@ -1,29 +0,0 @@
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>
@@ -1,27 +0,0 @@
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>
@@ -1,31 +0,0 @@
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>
@@ -1,33 +0,0 @@
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>
@@ -1,30 +0,0 @@
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>
@@ -1,32 +0,0 @@
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>
@@ -1,33 +0,0 @@
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>
@@ -1,37 +0,0 @@
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>