Skip to content

Commit

Permalink
InMobi: adding native support (prebid#1928)
Browse files Browse the repository at this point in the history
  • Loading branch information
cormorinth authored and jizeyopera committed Oct 13, 2021
1 parent 09394a0 commit e63d057
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adapters/inmobi/inmobi.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ func getMediaTypeForImp(impId string, imps []openrtb2.Imp) openrtb_ext.BidType {
if imp.Video != nil {
mediaType = openrtb_ext.BidTypeVideo
}
if imp.Native != nil {
mediaType = openrtb_ext.BidTypeNative
}
break
}
}
Expand Down
105 changes: 105 additions & 0 deletions adapters/inmobi/inmobitest/exemplary/simple-app-native.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"mockBidRequest": {
"app": {
"bundle": "com.example.app"
},
"id": "req-id",
"device": {
"ifa": "9d8fe0a9-c0dd-4482-b16b-5709b00c608d",
"ip": "1.1.1.1",
"ua": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36"
},
"imp": [
{
"ext": {
"bidder": {
"plc": "1618933962959"
}
},
"native": {
"request": "{\"ver\":\"1.2\",\"context\":2,\"contextsubtype\":20,\"plcmttype\":11,\"plcmtcnt\":1,\"aurlsupport\":1,\"durlsupport\":1,\"assets\":[{\"id\":123,\"required\":1,\"title\":{\"len\":140}},{\"id\":128,\"required\":0,\"img\":{\"wmin\":836,\"hmin\":627,\"type\":3}}]}"
},
"id": "imp-id"
}
]
},
"httpCalls": [{
"expectedRequest": {
"uri": "https://api.w.inmobi.com/showad/openrtb/bidder/prebid",
"body": {
"app": {
"bundle": "com.example.app"
},
"id": "req-id",
"device": {
"ifa": "9d8fe0a9-c0dd-4482-b16b-5709b00c608d",
"ip": "1.1.1.1",
"ua": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36"
},
"imp": [
{
"ext": {
"bidder": {
"plc": "1618933962959"
}
},
"native": {
"request": "{\"ver\":\"1.2\",\"context\":2,\"contextsubtype\":20,\"plcmttype\":11,\"plcmtcnt\":1,\"aurlsupport\":1,\"durlsupport\":1,\"assets\":[{\"id\":123,\"required\":1,\"title\":{\"len\":140}},{\"id\":128,\"required\":0,\"img\":{\"wmin\":836,\"hmin\":627,\"type\":3}}]}"
},
"id": "imp-id"
}
]
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "req-id",
"seatbid": [
{
"bid": [
{
"ext": {
"prebid": {
"meta": {
"networkName": "inmobi"
}
}
},
"nurl": "https://some.event.url/params",
"crid": "123456789",
"adomain": [],
"price": 2.0,
"id": "1234",
"adm": "native-json",
"impid": "imp-id"
}
]
}
]
}
}
}],

"expectedBidResponses": [{
"currency": "USD",
"bids": [{
"bid": {
"id": "1234",
"impid": "imp-id",
"price": 2.0,
"adm": "native-json",
"crid": "123456789",
"nurl": "https://some.event.url/params",
"ext": {
"prebid": {
"meta": {
"networkName": "inmobi"
}
}
}
},
"type": "native"
}]
}]
}
1 change: 1 addition & 0 deletions static/bidder-info/inmobi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ capabilities:
mediaTypes:
- banner
- video
- native
site:
mediaTypes:
- banner
Expand Down

0 comments on commit e63d057

Please sign in to comment.