Rankings api

Fixes #144