Skip to content

Calculate the number of people reached using Stack Exchange API

License

Notifications You must be signed in to change notification settings

1dimir/StackAPI-Impact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Calculate the number of people reached using Stack Exchange API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages