-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d8d320
commit cd60ec2
Showing
3 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
setup( | ||
name="tc-analyzer-lib", | ||
version="1.4.10", | ||
version="1.4.11", | ||
author="Mohammad Amin Dadgar, TogetherCrew", | ||
maintainer="Mohammad Amin Dadgar", | ||
maintainer_email="[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# flake8: noqa | ||
from .discord import DiscordAnalyzerConfig | ||
from .discourse import DiscourseAnalyzerConfig | ||
from .telegram import TelegramAnalyzerConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
from tc_analyzer_lib.schemas import ( | ||
ActivityDirection, | ||
ActivityType, | ||
HourlyAnalytics, | ||
RawAnalytics, | ||
) | ||
from tc_analyzer_lib.schemas.platform_configs.config_base import PlatformConfigBase | ||
|
||
|
||
class TelegramAnalyzerConfig(PlatformConfigBase): | ||
def __init__(self): | ||
platform: str = "telegram" | ||
resource_identifier: str = "chat_id" | ||
hourly_analytics: list[HourlyAnalytics] = [ | ||
HourlyAnalytics( | ||
name="chat_messages", | ||
type=ActivityType.ACTION, | ||
member_activities_used=True, | ||
rawmemberactivities_condition={}, | ||
direction=ActivityDirection.EMITTER, | ||
activity_name="message", | ||
), | ||
HourlyAnalytics( | ||
name="replier", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=False, | ||
direction=ActivityDirection.RECEIVER, | ||
), | ||
HourlyAnalytics( | ||
name="replied", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=False, | ||
direction=ActivityDirection.EMITTER, | ||
), | ||
HourlyAnalytics( | ||
name="mentioner", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=False, | ||
direction=ActivityDirection.EMITTER, | ||
), | ||
HourlyAnalytics( | ||
name="mentioned", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=False, | ||
direction=ActivityDirection.RECEIVER, | ||
), | ||
HourlyAnalytics( | ||
name="reacter", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=False, | ||
direction=ActivityDirection.RECEIVER, | ||
), | ||
HourlyAnalytics( | ||
name="reacted", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=False, | ||
direction=ActivityDirection.EMITTER, | ||
), | ||
] | ||
|
||
raw_analytics: list[RawAnalytics] = [ | ||
RawAnalytics( | ||
name="replied_per_acc", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=True, | ||
direction=ActivityDirection.EMITTER, | ||
), | ||
RawAnalytics( | ||
name="mentioner_per_acc", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=True, | ||
direction=ActivityDirection.EMITTER, | ||
), | ||
RawAnalytics( | ||
name="reacted_per_acc", | ||
type=ActivityType.INTERACTION, | ||
member_activities_used=True, | ||
direction=ActivityDirection.EMITTER, | ||
), | ||
] | ||
|
||
super().__init__(platform, resource_identifier, hourly_analytics, raw_analytics) |