Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #35 from mxmCherry/feature/subpkgs
Browse files Browse the repository at this point in the history
Feature/subpkgs
  • Loading branch information
mxmCherry authored Dec 28, 2018
2 parents 39d0e97 + 89da091 commit 0292ea4
Show file tree
Hide file tree
Showing 113 changed files with 116 additions and 116 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ go get -u "github.com/mxmCherry/openrtb"
```

```go
import "github.com/mxmCherry/openrtb"
import openrtb "github.com/mxmCherry/openrtb/openrtb2"
```

This repo follows [semver](http://semver.org/) - see [releases](https://github.com/mxmCherry/openrtb/releases).
Expand Down
2 changes: 1 addition & 1 deletion native/README.md → native1/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# native [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native)
# native1 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native)

[Go](https://golang.org/) implementation of [OpenRTB](https://www.iab.com/guidelines/real-time-bidding-rtb-project/) [Dynamic Native Ads API
Specification Version 1.2](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) types/enums.
2 changes: 1 addition & 1 deletion native/ad_unit.go → native1/ad_unit.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.2 Native Ad Unit IDs in version 1.1.
// Deprecated/removed in version 1.2.
Expand Down
2 changes: 1 addition & 1 deletion native/context_sub_type.go → native1/context_sub_type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.2 Context Sub Type IDs
//
Expand Down
2 changes: 1 addition & 1 deletion native/context_type.go → native1/context_type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.1 Context Type IDs
//
Expand Down
2 changes: 1 addition & 1 deletion native/data_asset_type.go → native1/data_asset_type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.4 Data Asset Types
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.7 Event Tracking Methods Table
type EventTrackingMethod int8
Expand Down
2 changes: 1 addition & 1 deletion native/event_type.go → native1/event_type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.6 Event Types Table
type EventType int8
Expand Down
2 changes: 1 addition & 1 deletion native/image_asset_type.go → native1/image_asset_type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.5 Image Asset Types
//
Expand Down
2 changes: 1 addition & 1 deletion native/layout.go → native1/layout.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.1 Native Layout IDs in version 1.1.
// Deprecated/removed in version 1.2.
Expand Down
4 changes: 2 additions & 2 deletions native/native.go → native1/native1.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package native provides OpenRTB Dynamic Native Ads API Specification Version 1.2
// Package native1 provides OpenRTB Dynamic Native Ads API Specification Version 1.2
// section 7 Reference Lists/Enumerations types/constants:
// https://www.iab.com/guidelines/real-time-bidding-rtb-project/
// https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf
package native
package native1
2 changes: 1 addition & 1 deletion native/placement_type.go → native1/placement_type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 7.3 Placement Type IDs
//
Expand Down
2 changes: 1 addition & 1 deletion native/protocol.go → native1/protocol.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package native
package native1

// 5.8 Protocols (from OpenRTB spec 2.5)
//
Expand Down
2 changes: 1 addition & 1 deletion native/request/README.md → native1/request/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# native/request [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native/request?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native/request)
# native1/request [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native/request?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native/request)

[Go](https://golang.org/) implementation of [OpenRTB](https://www.iab.com/guidelines/real-time-bidding-rtb-project/) [Dynamic Native Ads API
Specification Version 1.2](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section 4 Native Ad Request Markup Details types.
4 changes: 2 additions & 2 deletions native/request/asset.go → native1/request/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import "encoding/json"
// So if a request for a title object is sent with id 1, then the response containing the title should have an id of 1.
//
// Since version 1.1 of the spec, there are recommended sizes/lengths/etc with some of the asset types.
// The goal for asset requirements standardization is to facilitate adoption of native by DSPs by limiting the diverse types/sizes/requirements of assets they must have available to purchase a native ad impression.
// The goal for asset requirements standardization is to facilitate adoption of native1 by DSPs by limiting the diverse types/sizes/requirements of assets they must have available to purchase a native ad impression.
// While great diversity may exist in publishers, advertisers/DSPs can not be expected to provide infinite headline lengths, thumbnail aspect ratios, etc.
// While we have not gone as far as creating a single standard, we've honed in on a few options that cover the most common cases.
// SSPs can deviate from these standards, but should understand they may limit applicable DSP demand by doing so.
// DSPs should feel confident that if they support these standards they'll be able to access most native inventory.
// DSPs should feel confident that if they support these standards they'll be able to access most native1 inventory.
type Asset struct {
// Field:
// id
Expand Down
8 changes: 4 additions & 4 deletions native/request/data.go → native1/request/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package request
import (
"encoding/json"

"github.com/mxmCherry/openrtb/native"
"github.com/mxmCherry/openrtb/native1"
)

// 4.6 Data Object
//
// The Data Object is to be used for all non-core elements of the native unit such as Brand Name, Ratings, Review Count, Stars, Download count, descriptions etc.
// It is also generic for future native elements not contemplated at the time of the writing of this document.
// The Data Object is to be used for all non-core elements of the native1 unit such as Brand Name, Ratings, Review Count, Stars, Download count, descriptions etc.
// It is also generic for future native1 elements not contemplated at the time of the writing of this document.
// In some cases, additional recommendations are also included in the Data Asset Types table.
type Data struct {

Expand All @@ -23,7 +23,7 @@ type Data struct {
// Type ID of the element supported by the publisher.
// The publisher can display this information in an appropriate format.
// See Data Asset Types table for commonly used examples.
Type native.DataAssetType `json:"type"`
Type native1.DataAssetType `json:"type"`

// Field:
// len
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package request
import (
"encoding/json"

"github.com/mxmCherry/openrtb/native"
"github.com/mxmCherry/openrtb/native1"
)

// 4.7 Event Trackers Request Object
Expand All @@ -20,7 +20,7 @@ type EventTracker struct {
// Description:
// Type of event available for tracking.
// See Event Types table.
Event native.EventType `json:"event"`
Event native1.EventType `json:"event"`

// Field:
// methods
Expand All @@ -31,7 +31,7 @@ type EventTracker struct {
// Description:
// Array of the types of tracking available for the given event.
// See Event Tracking Methods table
Methods []native.EventTrackingMethod `json:"methods"`
Methods []native1.EventTrackingMethod `json:"methods"`

// Field:
// ext
Expand Down
4 changes: 2 additions & 2 deletions native/request/image.go → native1/request/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package request
import (
"encoding/json"

"github.com/mxmCherry/openrtb/native"
"github.com/mxmCherry/openrtb/native1"
)

// 4.4 Image Object
Expand All @@ -22,7 +22,7 @@ type Image struct {
// Type ID of the image element supported by the publisher.
// The publisher can display this information in an appropriate format.
// See Table Image Asset Types.
Type native.ImageAssetType `json:"type,omitempty"`
Type native1.ImageAssetType `json:"type,omitempty"`

// Field:
// w
Expand Down
26 changes: 13 additions & 13 deletions native/request/request.go → native1/request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ package request
import (
"encoding/json"

"github.com/mxmCherry/openrtb/native"
"github.com/mxmCherry/openrtb/native1"
)

// 4.1 Native Markup Request Object
//
// The Native Object defines the native advertising opportunity available for bid via this bid request.
// It will be included as a JSON-encoded string in the bid request’s imp.native field or as a direct JSON object, depending on the choice of the exchange.
// The Native Object defines the native1 advertising opportunity available for bid via this bid request.
// It will be included as a JSON-encoded string in the bid request’s imp.native1 field or as a direct JSON object, depending on the choice of the exchange.
// While OpenRTB 2.x officially supports only JSON-encoded strings, many exchanges have implemented a formal object.
// Check with your integration docs.
//
// Note: Prior to VERSION 1.1, the specification could be interpreted as requiring the native request to have a root node with a single field “native” that would contain the object above as its value.
// Note: Prior to VERSION 1.1, the specification could be interpreted as requiring the native1 request to have a root node with a single field “native” that would contain the object above as its value.
// The Native Markup Request Object specified above is now the root object.
type Request struct {

Expand All @@ -40,9 +40,9 @@ type Request struct {
// Type:
// integer
// Description:
// The Layout ID of the native ad unit.
// The Layout ID of the native1 ad unit.
// See the Table of Layout IDs below.
Layout native.Layout `json:"layout,omitempty"`
Layout native1.Layout `json:"layout,omitempty"`

// Field:
// adunit
Expand All @@ -51,9 +51,9 @@ type Request struct {
// Type:
// integer
// Description:
// The Ad unit ID of the native ad unit.
// The Ad unit ID of the native1 ad unit.
// See Table of Ad Unit IDs below for a list of supported core ad units.
AdUnit native.AdUnit `json:"adunit,omitempty"`
AdUnit native1.AdUnit `json:"adunit,omitempty"`

// Field:
// context
Expand All @@ -64,7 +64,7 @@ type Request struct {
// Description:
// The context in which the ad appears.
// See Table of Context IDs below for a list of supported context types.
Context native.ContextType `json:"context,omitempty"`
Context native1.ContextType `json:"context,omitempty"`

// Field:
// contextsubtype
Expand All @@ -75,7 +75,7 @@ type Request struct {
// Description:
// A more detailed context in which the ad appears.
// See Table of Context SubType IDs below for a list of supported context subtypes.
ContextSubType native.ContextSubType `json:"contextsubtype,omitempty"`
ContextSubType native1.ContextSubType `json:"contextsubtype,omitempty"`

// Field:
// plcmttype
Expand All @@ -86,7 +86,7 @@ type Request struct {
// Description:
// The design/format/layout of the ad unit being offered.
// See Table of Placement Type IDs below for a list of supported placement types.
PlcmtType native.PlacementType `json:"plcmttype,omitempty"`
PlcmtType native1.PlacementType `json:"plcmttype,omitempty"`

// Field:
// plcmtcnt
Expand Down Expand Up @@ -171,8 +171,8 @@ type Request struct {
// Default:
// 0
// Description:
// Set to 1 when the native ad supports buyer-specific privacy notice.
// Set to 0 (or field absent) when the native ad doesn’t support custom privacy links or if support is unknown.
// Set to 1 when the native1 ad supports buyer-specific privacy notice.
// Set to 0 (or field absent) when the native1 ad doesn’t support custom privacy links or if support is unknown.
Privacy int8 `json:"privacy,omitempty"`

// Field:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io/ioutil"
"path/filepath"

. "github.com/mxmCherry/openrtb/native/request"
. "github.com/mxmCherry/openrtb/native1/request"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions native/request/video.go → native1/request/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package request
import (
"encoding/json"

"github.com/mxmCherry/openrtb/native"
"github.com/mxmCherry/openrtb/native1"
)

// 4.5 Video Object
Expand All @@ -23,7 +23,7 @@ type Video struct {
// Description:
// Content MIME types supported.
// Popular MIME types include,but are not limited to “video/x-mswmv” for Windows Media, and “video/x-flv” for Flash Video, or “video/mp4”.
// Note that native frequently does not support flash.
// Note that native1 frequently does not support flash.
MIMEs []string `json:"mimes"`

// Field:
Expand Down Expand Up @@ -55,7 +55,7 @@ type Video struct {
// Description:
// An array of video protocols the publisher can accept in the bid response.
// See OpenRTB Table ‘Video Bid Response Protocols’ for a list of possible values.
Protocols []native.Protocol `json:"protocols"`
Protocols []native1.Protocol `json:"protocols"`

// Field:
// ext
Expand Down
2 changes: 1 addition & 1 deletion native/response/README.md → native1/response/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# native/response [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native/response?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native/response)
# native1/response [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native/response?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native/response)

[Go](https://golang.org/) implementation of [OpenRTB](https://www.iab.com/guidelines/real-time-bidding-rtb-project/) [Dynamic Native Ads API
Specification Version 1.2](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section 5 Native Ad Response Markup Details types.
File renamed without changes.
8 changes: 4 additions & 4 deletions native/response/data.go → native1/response/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package response
import (
"encoding/json"

"github.com/mxmCherry/openrtb/native"
"github.com/mxmCherry/openrtb/native1"
)

// 5.5 Object: Data
//
// Corresponds to the Data Object in the request, with the value filled in.
// The Data Object is to be used for all miscellaneous elements of the native unit such as Brand Name, Ratings, Review Count, Stars, Downloads, Price count etc.
// It is also generic for future native elements not contemplated at the time of the writing of this document.
// The Data Object is to be used for all miscellaneous elements of the native1 unit such as Brand Name, Ratings, Review Count, Stars, Downloads, Price count etc.
// It is also generic for future native1 elements not contemplated at the time of the writing of this document.
type Data struct {
// Field:
// type
Expand All @@ -21,7 +21,7 @@ type Data struct {
// Description:
// Required for assetsurl/dcourl responses, not required for embedded asset responses.
// The type of data element being submitted from the Data Asset Types table.
Type native.DataAssetType `json:"type,omitempty"`
Type native1.DataAssetType `json:"type,omitempty"`

// Field:
// len
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package response
import (
"encoding/json"

"github.com/mxmCherry/openrtb/native"
"github.com/mxmCherry/openrtb/native1"
)

// 5.8 Event Tracker Response Object
Expand All @@ -21,7 +21,7 @@ type EventTracker struct {
// Description:
// Type of event to track.
// See Event Types table.
Event native.EventType `json:"event"`
Event native1.EventType `json:"event"`

// Field:
// method
Expand All @@ -32,7 +32,7 @@ type EventTracker struct {
// Description:
// Type of tracking requested
// See Event Tracking Methods table.
Method native.EventTrackingMethod `json:"method"`
Method native1.EventTrackingMethod `json:"method"`

// Field:
// url
Expand Down
4 changes: 2 additions & 2 deletions native/response/image.go → native1/response/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package response
import (
"encoding/json"

"github.com/mxmCherry/openrtb/native"
"github.com/mxmCherry/openrtb/native1"
)

// 5.4 Object: Image
Expand All @@ -22,7 +22,7 @@ type Image struct {
// Description:
// Required for assetsurl or dcourl responses, not required for embedded asset responses.
// The type of image element being submitted from the Image Asset Types table.
Type native.ImageAssetType `json:"type,omitempty"`
Type native1.ImageAssetType `json:"type,omitempty"`

// Field:
// url
Expand Down
File renamed without changes.
Loading

0 comments on commit 0292ea4

Please sign in to comment.