Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
GET /devices endpoint #939
Conversation
richvdh
added some commits
Jul 20, 2016
richvdh
assigned
dbkr
Jul 20, 2016
dbkr
commented on the diff
Jul 21, 2016
synapse/storage/client_ips.py
| + "user_id", | ||
| + "access_token", | ||
| + "ip", | ||
| + "user_agent", | ||
| + "device_id", | ||
| + "last_seen", | ||
| + ), | ||
| + devices=devices | ||
| + ) | ||
| + | ||
| + ret = {(d["user_id"], d["device_id"]): d for d in res} | ||
| + defer.returnValue(ret) | ||
| + | ||
| + @classmethod | ||
| + def _get_last_client_ip_by_device_txn(cls, txn, devices, retcols): | ||
| + def where_clause_for_device(d): |
|
|
dbkr
merged commit 44adde4
into
develop
Jul 21, 2016
8 of 10 checks passed
Sytest Dendron (Commit)
Build #307 origin/rav/get_devices_api failed in 1 min 28 sec
Details
Sytest Dendron (Merged PR)
Build finished.
Details
Flake8 + Packaging (Commit)
Build #1193 origin/rav/get_devices_api succeeded in 33 sec
Details
Flake8 + Packaging (Merged PR)
Build finished.
Details
Sytest Postgres (Commit)
Build #1144 origin/rav/get_devices_api succeeded in 6 min 42 sec
Details
Sytest Postgres (Merged PR)
Build finished.
Details
Sytest SQLite (Commit)
Build #1167 origin/rav/get_devices_api succeeded in 6 min 3 sec
Details
Sytest SQLite (Merged PR)
Build finished.
Details
Unit Tests (Commit)
Build #1232 origin/rav/get_devices_api succeeded in 2 min 19 sec
Details
Unit Tests (Merged PR)
Build finished.
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
richvdh commentedJul 20, 2016
implement a GET /devices endpoint which lists all of the user's devices.
This needs #938 to be useful, but is harmless enough without it.
It also returns the last IP where we saw that device, so there is some dancing
to fish that out of the user_ips table.