This repository has been archived by the owner on Dec 22, 2022. It is now read-only.
forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Made some changes to support VAST cacheing. * Implemented vastxml cacheing. * Fixed JSON in markdown. * Added endpoint contract tests. * Removed redundant line.
- Loading branch information
Showing
20 changed files
with
458 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
29 changes: 29 additions & 0 deletions
29
endpoints/openrtb2/sample-requests/valid-whole/supplementary/cache-bids.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"id": "some-request-id", | ||
"site": { | ||
"page": "test.somepage.com" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "my-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 10433394 | ||
} | ||
} | ||
} | ||
], | ||
"ext": { | ||
"prebid": { | ||
"cache": { | ||
"bids": {} | ||
}, | ||
"targeting": {} | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
endpoints/openrtb2/sample-requests/valid-whole/supplementary/cache-vast.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"id": "some-request-id", | ||
"site": { | ||
"page": "test.somepage.com" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "my-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 10433394 | ||
} | ||
} | ||
} | ||
], | ||
"ext": { | ||
"prebid": { | ||
"cache": { | ||
"vastxml": {} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package exchange | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/mxmCherry/openrtb" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestMakeVASTGiven(t *testing.T) { | ||
const expect = `<VAST version="3.0"></VAST>` | ||
bid := &openrtb.Bid{ | ||
AdM: expect, | ||
} | ||
vast := makeVAST(bid) | ||
assert.Equal(t, expect, vast) | ||
} | ||
|
||
func TestMakeVASTNurl(t *testing.T) { | ||
const url = "http://domain.com/win-notify/1" | ||
const expect = `<VAST version="3.0"><Ad><Wrapper>` + | ||
`<AdSystem>prebid.org wrapper</AdSystem>` + | ||
`<VASTAdTagURI><![CDATA[` + url + `]]></VASTAdTagURI>` + | ||
`<Impression></Impression><Creatives></Creatives>` + | ||
`</Wrapper></Ad></VAST>` | ||
bid := &openrtb.Bid{ | ||
NURL: url, | ||
} | ||
vast := makeVAST(bid) | ||
assert.Equal(t, expect, vast) | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.