Skip to content

Commit ab58532

Browse files
committed
device: Add MCCMNC field from 2.5 spec
1 parent 3d7c6ec commit ab58532

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

device.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type Device struct {
2525
FlashVer string `json:"flashver,omitempty"` // Flash version
2626
Language string `json:"language,omitempty"` // Browser language
2727
Carrier string `json:"carrier,omitempty"` // Carrier or ISP derived from the IP address
28+
MCCMNC string `json:"mccmnc,omitempty"` // Mobile carrier as the concatenated MCC-MNC code (e.g., "310-005" identifies Verizon Wireless CDMA in the USA).
2829
ConnType int `json:"connectiontype,omitempty"` // Network connection type.
2930
IFA string `json:"ifa,omitempty"` // Native identifier for advertisers
3031
IDSHA1 string `json:"didsha1,omitempty"` // SHA1 hashed device ID

device_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ var _ = Describe("Device", func() {
3737
OSVer: "6.1",
3838
JS: 1,
3939
ConnType: ConnTypeCell,
40+
MCCMNC: "722-341",
4041
DeviceType: DeviceTypeMobile,
4142
}))
4243
})

testdata/device.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
"osv": "6.1",
2222
"js": 1,
2323
"connectiontype": 3,
24+
"mccmnc": "722-341",
2425
"devicetype": 1
2526
}

0 commit comments

Comments
 (0)