Skip to content

Commit

Permalink
Merge pull request bsm#40 from emaraschio/master
Browse files Browse the repository at this point in the history
device: Add MCCMNC field from 2.5 spec
  • Loading branch information
dim authored Mar 16, 2017
2 parents dde43bc + ab58532 commit f11883b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions device.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type Device struct {
FlashVer string `json:"flashver,omitempty"` // Flash version
Language string `json:"language,omitempty"` // Browser language
Carrier string `json:"carrier,omitempty"` // Carrier or ISP derived from the IP address
MCCMNC string `json:"mccmnc,omitempty"` // Mobile carrier as the concatenated MCC-MNC code (e.g., "310-005" identifies Verizon Wireless CDMA in the USA).
ConnType int `json:"connectiontype,omitempty"` // Network connection type.
IFA string `json:"ifa,omitempty"` // Native identifier for advertisers
IDSHA1 string `json:"didsha1,omitempty"` // SHA1 hashed device ID
Expand Down
1 change: 1 addition & 0 deletions device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var _ = Describe("Device", func() {
OSVer: "6.1",
JS: 1,
ConnType: ConnTypeCell,
MCCMNC: "722-341",
DeviceType: DeviceTypeMobile,
}))
})
Expand Down
1 change: 1 addition & 0 deletions testdata/device.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"osv": "6.1",
"js": 1,
"connectiontype": 3,
"mccmnc": "722-341",
"devicetype": 1
}

0 comments on commit f11883b

Please sign in to comment.