Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bsm/openrtb
OpenRTB protocol defintions for Go
https://github.com/bsm/openrtb
adtech go openrtb rtb
Last synced: about 12 hours ago
JSON representation
OpenRTB protocol defintions for Go
- Host: GitHub
- URL: https://github.com/bsm/openrtb
- Owner: bsm
- License: other
- Created: 2013-10-18T16:17:58.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2024-08-09T12:17:53.000Z (3 months ago)
- Last Synced: 2024-11-06T04:13:54.701Z (8 days ago)
- Topics: adtech, go, openrtb, rtb
- Language: Go
- Homepage:
- Size: 227 KB
- Stars: 288
- Watchers: 24
- Forks: 121
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rtb - openrtb by BSM - Go-lang BidRequest and BidResponse serialization without targeting or budget logic. ✊ (Table of Contents / Applications Engines and Frameworks)
README
# OpenRTB
[![Build Status](https://travis-ci.org/bsm/openrtb.svg?branch=master)](https://travis-ci.org/bsm/openrtb)
OpenRTB structs and validations for Go.
## Requirements
Requires Go 1.8+ for proper `json.RawMessage` marshaling.
## Installation
To install, use `go get`:
```shell
go get github.com/bsm/openrtb/v3
```## Usage
```go
package mainimport (
"log"
"github.com/bsm/openrtb/v3"
)func main() {
file, err := os.Open("stored.json")
if err != nil {
log.Fatal(err)
}
defer file.Close()var req *openrtb.BidRequest
if err := json.NewDecoder(file).Decode(&req); err != nil {
log.Fatal(err)
}log.Printf("%+v\n", req)
}
```