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

InMobi: adding native support #1928

Merged
merged 3 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {
mansinahar marked this conversation as resolved.
Show resolved Hide resolved
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
mansinahar marked this conversation as resolved.
Show resolved Hide resolved
site:
mediaTypes:
- banner
Expand Down