This is an unofficial server example. It is discouraged to use it as-is for production uses. It comes with no warranty.
This is an implementation of version Broadsign Control 13.2's real-time pop protocol: https://docs.broadsign.com/broadsign-control/13-2/real-time-pop-api.html
The endpoint should be pointing to <url to server>/pop.
Follow the steps indicated on the official page: https://www.rust-lang.org/tools/install
- Install
rust-analyzerandRustextensions. - Recommended: Change
Rustextension settings to userust-analyzerinstead ofrls(ctrl + ,). - Run unit tests using
cargo test. - Run using
cargo run. Usecargo run --releasefor optimizations.
You may set the log level by prepending RUST_LOG=<level>, where level corresponds to:
debugerrorwarninfo(default)trace
RUST_LOG=trace cargo run
Note that logs messages are not currently enabled in the tests by lack of time and will.
They are stored in the SQLite pops.db file in the working directory. For the tests, a test.db fle is used, instead.
An Insomnia file is available (api_insomnia.json). You may import it to help you debug or comprehend how to use this real-time pop server implementation.
{
"api_key": "{{ api_key }}",
"player_id": 12345,
"pop": [
{
"display_unit_id": 4456,
"frame_id": 4457,
"n_screens": 1,
"ad_copy_id": 5001,
"campaign_id": 5002,
"schedule_id": 5003,
"impressions": 2,
"interactions": 0,
"end_time": "2016-05-31T10:14:50.200",
"duration": 5000,
"ext1": "bmb",
"ext2": "3451",
"extra_data": ""
},
{
"display_unit_id": 3456,
"frame_id": 3457,
"n_screens": 1,
"ad_copy_id": 7001,
"campaign_id": 7002,
"schedule_id": 7003,
"impressions": 4,
"interactions": 1,
"end_time": "2016-05-31T10:14:55.200",
"duration": 5000,
"ext1": "",
"ext2": "",
"extra_data": ""
}
]
}
MIT Licensed. See LICENSE.md