Skip to content

Commit 491cb5c

Browse files
authored
Merge pull request #42 from vikramsk/master
fixed typo in the inventory object.
2 parents f11883b + 93eb934 commit 491cb5c

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

bidrequest_test.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ package openrtb
22

33
import (
44
"encoding/json"
5+
56
. "github.com/onsi/ginkgo"
67
. "github.com/onsi/gomega"
78
)
89

910
var _ = Describe("BidRequest", func() {
1011
var subject *BidRequest
11-
12+
privacyPolicy := 1
1213
BeforeEach(func() {
1314
err := fixture("breq.banner", &subject)
1415
Expect(err).NotTo(HaveOccurred())
@@ -35,11 +36,12 @@ var _ = Describe("BidRequest", func() {
3536
},
3637
Site: &Site{
3738
Inventory: Inventory{
38-
ID: "234563",
39-
Name: "Site ABCD",
40-
Domain: "siteabcd.com",
41-
Cat: []string{"IAB2-1", "IAB2-2"},
42-
Publisher: &Publisher{ID: "pub12345", Name: "Publisher A"},
39+
ID: "234563",
40+
Name: "Site ABCD",
41+
Domain: "siteabcd.com",
42+
Cat: []string{"IAB2-1", "IAB2-2"},
43+
Publisher: &Publisher{ID: "pub12345", Name: "Publisher A"},
44+
PrivacyPolicy: &privacyPolicy,
4345
Content: &Content{
4446
Keywords: "keyword a,keyword b,keyword c",
4547
},

inventory.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ type Inventory struct {
44
ID string `json:"id,omitempty"` // ID on the exchange
55
Name string `json:"name,omitempty"`
66
Domain string `json:"domain,omitempty"`
7-
Cat []string `json:"cat,omitempty"` // Array of IAB content categories
8-
SectionCat []string `json:"sectioncat,omitempty"` // Array of IAB content categories for subsection
9-
PageCat []string `json:"pagecat,omitempty"` // Array of IAB content categories for page
10-
PrivacyPolicy *int `json:"pivacypolicy,omitempty"` // Default: 1 ("1": has a privacy policy)
11-
Publisher *Publisher `json:"publisher,omitempty"` // Details about the Publisher
12-
Content *Content `json:"content,omitempty"` // Details about the Content
13-
Keywords string `json:"keywords,omitempty"` // Comma separated list of keywords about the site.
7+
Cat []string `json:"cat,omitempty"` // Array of IAB content categories
8+
SectionCat []string `json:"sectioncat,omitempty"` // Array of IAB content categories for subsection
9+
PageCat []string `json:"pagecat,omitempty"` // Array of IAB content categories for page
10+
PrivacyPolicy *int `json:"privacypolicy,omitempty"` // Default: 1 ("1": has a privacy policy)
11+
Publisher *Publisher `json:"publisher,omitempty"` // Details about the Publisher
12+
Content *Content `json:"content,omitempty"` // Details about the Content
13+
Keywords string `json:"keywords,omitempty"` // Comma separated list of keywords about the site.
1414
Ext Extension `json:"ext,omitempty"`
1515
}
1616

0 commit comments

Comments
 (0)