Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.83 KB

README.md

File metadata and controls

64 lines (46 loc) · 1.83 KB

StackAPI-Impact

Stack Exchange API doesn't provide a direct way to get the impact of a user. Still considering the definition of impact, it seems possible to reproduce the calculations, as all the required data is available in API: views, questions and answers. This project is an implementation of that idea. Practical limitations make an application scope very narrow though. Someday the impact should be exposed in the public API.

Retrieving the large collections of user’s answers or questions ends up with throttling, despite the use of an api key. Due to that, the calculation of the top user’s impact may take tens of minutes.

Installing

Install using pip:

$ pip install git+https://github.com/1dimir/StackAPI-Impact

Usage

Command line interface:

usage: get-so-impact [-h] [-k API_KEY] user_id
$ get-so-impact 21350362
> 21650

As a package:

from stackapi_impact import StackExchangeImpact

USER_ID = 21350362

impact = StackExchangeImpact()
result = impact.calculate(USER_ID)

print(result)

License

This project is licensed under the MIT License - see the LICENSE.txt file for details

Links