= load_sample_events() evts
ghtop API
API details
get_sparklines
get_sparklines ()
When creating GhApi
we can pass a callback which will be called after each API operation. In this case, we use it to warn the user when their quota is getting low.
def limit_cb(rem,quota):
"Callback to warn user when close to using up hourly quota"
='WARNING '*7
wif rem < 1000: print(f"{w}\nRemaining calls: {rem} out of {quota}\n{w}", file=sys.stderr)
limit_cb
limit_cb (rem, quota)
Callback to warn user when close to using up hourly quota
pct_comp
pct_comp (api)
tail_events
tail_events (evt, api)
Print events from fetch_events
along with a counter of push events
watch_users
watch_users (evts, api)
Print a table of the users with the most events
quad_logs
quad_logs (evts, api)
Print 4 panels, showing most recent issues, commits, PRs, and releases
simple
simple (evts, api)
main
main (mode:_OpModes<Operationmodetorun>, include_bots:<Includebots(there'salotofthem!)>=False, types:str<Comma-separatedtypesofeventtoinclude(e.gPushEvent)>='', p ause:float<NumberofsecondstopausebetweenrequeststotheGitHubapi>=0.4 , filt:_filts<Filteringmethod>=None, filtval:str<Valuetofilterby(for`repo`useformat`owner/repo`)>=None)