Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Construct a bid request type correct on readme #58

Open
JaosnHsieh opened this issue May 17, 2019 · 0 comments · May be fixed by #59
Open

Construct a bid request type correct on readme #58

JaosnHsieh opened this issue May 17, 2019 · 0 comments · May be fixed by #59

Comments

@JaosnHsieh
Copy link

JaosnHsieh commented May 17, 2019

Validation schema is correct but the sample code on README is wrong type.

Construct a bid request

  var bidRequestBuilder = openrtb.getBuilder({
    builderType: 'bidRequest'
  });
  var bidRequest = bidRequestBuilder
  .timestamp(moment.utc().format())
  .id('1234')
  .at(2)
  .imp([
    {
      "id":"1",
      "native":{
        "request": {
          "ver": 1,
          "layout": 6,
          "assets": [
            { "id": 0, "req": 1, "title": { "len": 25 } }, 
            { "id": 1, "req": 1, "img": { "type": 3, "wmin": 100, "hmin": 100 } },
            { "id": 3, "req": 0, "data": { "type": 2, "len": 90 } }
          ]
        }
      },
...

to

Construct a bid request

  var bidRequestBuilder = openrtb.getBuilder({
    builderType: 'bidRequest'
  });
  var bidRequest = bidRequestBuilder
  .timestamp(moment.utc().format())
  .id('1234')
  .at(2)
  .imp([
    {
      "id":"1",
      "native":{
        "request": JSON.stringify({
          "ver": 1,
          "layout": 6,
          "assets": [
            { "id": 0, "req": 1, "title": { "len": 25 } }, 
            { "id": 1, "req": 1, "img": { "type": 3, "wmin": 100, "hmin": 100 } },
            { "id": 3, "req": 0, "data": { "type": 2, "len": 90 } }
          ]
        })
      },
@JaosnHsieh JaosnHsieh linked a pull request May 17, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant