This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2020-12-16 22:02:43 +00:00
|
|
|
import { DefaultClient } from "./Client";
|
2020-12-01 21:17:07 +00:00
|
|
|
|
2020-12-20 21:04:29 +00:00
|
|
|
export class Event {
|
|
|
|
// events/events/top_per_user/?filter_action=authorize_application
|
2020-12-01 21:17:07 +00:00
|
|
|
static topForUser(action: string): Promise<TopNEvent[]> {
|
2020-12-20 21:04:29 +00:00
|
|
|
return DefaultClient.fetch<TopNEvent[]>(["events", "events", "top_per_user"], {
|
2020-12-01 21:17:07 +00:00
|
|
|
"filter_action": action,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TopNEvent {
|
|
|
|
application: { [key: string]: string};
|
|
|
|
counted_events: number;
|
|
|
|
unique_users: number;
|
|
|
|
}
|