Skip to content

Newsfeed

genjishimada_sdk.newsfeed

NewsfeedAnnouncement

Bases: _TaggedPayload

Newsfeed entry for general announcements.

Attributes:

Name Type Description
title str

Announcement title.

content str

Body content of the announcement.

url str | None

Optional link for more details.

banner_url GuideURL | None

Optional banner image URL.

thumbnail_url GuideURL | None

Optional thumbnail image URL.

from_discord bool

Whether the announcement originated from Discord.

banner_url: GuideURL | None = None class-attribute instance-attribute

content: str instance-attribute

from_discord: bool = False class-attribute instance-attribute

thumbnail_url: GuideURL | None = None class-attribute instance-attribute

title: str instance-attribute

url: str | None = None class-attribute instance-attribute

NewsfeedArchive

Bases: _TaggedPayload

Newsfeed entry for archiving a map.

Attributes:

Name Type Description
code OverwatchCode

Workshop code for the map.

map_name OverwatchMap

Name of the Overwatch map.

creators list[str]

List of creator names.

difficulty DifficultyAll

Difficulty rating for the map.

reason str

Explanation for the archive action.

code: OverwatchCode instance-attribute

creators: list[str] instance-attribute

difficulty: DifficultyAll instance-attribute

map_name: OverwatchMap instance-attribute

reason: str instance-attribute

NewsfeedBulkArchive

Bases: _TaggedPayload

Newsfeed entry for bulk archiving multiple maps.

Attributes:

Name Type Description
codes list[OverwatchCode]

Workshop codes for the affected maps.

reason str

Explanation for the bulk archive action.

codes: list[OverwatchCode] instance-attribute

reason: str instance-attribute

NewsfeedBulkUnarchive

Bases: _TaggedPayload

Newsfeed entry for restoring multiple maps.

Attributes:

Name Type Description
codes list[OverwatchCode]

Workshop codes for the affected maps.

reason str

Explanation for the bulk unarchive action.

codes: list[OverwatchCode] instance-attribute

reason: str instance-attribute

NewsfeedDispatchEvent

Bases: Struct

Event dispatched when a newsfeed entry should be delivered.

Attributes:

Name Type Description
newsfeed_id int

Identifier of the newsfeed entry to dispatch.

newsfeed_id: int instance-attribute

NewsfeedEvent

Bases: Struct

Top-level newsfeed event record.

Attributes:

Name Type Description
id int | None

Identifier of the newsfeed entry.

timestamp datetime

When the event occurred.

payload NewsfeedPayload

Typed payload for the event.

event_type NewsfeedEventType | None

Optional explicit event type override.

total_results int | None

Total items for paginated feeds.

event_type: NewsfeedEventType | None = None class-attribute instance-attribute

id: int | None instance-attribute

payload: NewsfeedPayload instance-attribute

timestamp: dt.datetime instance-attribute

total_results: int | None = None class-attribute instance-attribute

NewsfeedEventType = Literal['new_map', 'record', 'archive', 'unarchive', 'bulk_archive', 'bulk_unarchive', 'guide', 'legacy_record', 'map_edit', 'role', 'announcement', 'linked_map', 'unlinked_map'] module-attribute

NewsfeedFieldChange

Bases: Struct

Represents a field difference for map edit newsfeed items.

Attributes:

Name Type Description
field str

Name of the field that changed.

old NewsfeedScalar

Previous value.

new NewsfeedScalar

Updated value.

field: str instance-attribute

new: NewsfeedScalar instance-attribute

old: NewsfeedScalar instance-attribute

NewsfeedGuide

Bases: _TaggedPayload

Newsfeed entry announcing a new guide for a map.

Attributes:

Name Type Description
code OverwatchCode

Workshop code for the map.

guide_url GuideURL

URL of the newly published guide.

name str

Name of the guide creator.

code: OverwatchCode instance-attribute

guide_url: GuideURL instance-attribute

name: str instance-attribute

NewsfeedLegacyRecord

Bases: _TaggedPayload

Newsfeed entry for legacy record adjustments.

Attributes:

Name Type Description
code OverwatchCode

Workshop code for the map.

affected_count int

Number of records affected.

reason str

Explanation for the legacy record change.

affected_count: int instance-attribute

code: OverwatchCode instance-attribute

reason: str instance-attribute

NewsfeedLinkedMap

Bases: _TaggedPayload

Newsfeed entry for linking an unofficial map to an official one.

Attributes:

Name Type Description
official_code OverwatchCode

Code for the official map.

unofficial_code OverwatchCode

Code for the unofficial map.

playtest_id int | None

Optional playtest identifier related to the link.

official_code: OverwatchCode instance-attribute

playtest_id: int | None = None class-attribute instance-attribute

unofficial_code: OverwatchCode instance-attribute

NewsfeedMapEdit

Bases: _TaggedPayload

Newsfeed entry describing edits made to a map.

Attributes:

Name Type Description
code OverwatchCode

Workshop code for the map.

changes list[NewsfeedFieldChange]

List of field-level changes.

reason str

Explanation for the edits.

changes: list[NewsfeedFieldChange] instance-attribute

code: OverwatchCode instance-attribute

reason: str instance-attribute

NewsfeedNewMap

Bases: _TaggedPayload

Newsfeed entry for publishing a new map.

Attributes:

Name Type Description
code OverwatchCode

Workshop code for the new map.

map_name OverwatchMap

Name of the Overwatch map.

difficulty DifficultyAll

Difficulty rating for the map.

creators list[str]

List of creator names.

title str | None

Optional display title for the map.

banner_url str | None

URL for the map banner.

official bool

Whether the map is official.

__post_init__() -> None

Set the map banner dynamically.

banner_url: str | None = None class-attribute instance-attribute

code: OverwatchCode instance-attribute

creators: list[str] instance-attribute

difficulty: DifficultyAll instance-attribute

map_name: OverwatchMap instance-attribute

official: bool = True class-attribute instance-attribute

title: str | None = None class-attribute instance-attribute

NewsfeedPayload = NewsfeedRecord | NewsfeedNewMap | NewsfeedArchive | NewsfeedUnarchive | NewsfeedBulkArchive | NewsfeedBulkUnarchive | NewsfeedGuide | NewsfeedLegacyRecord | NewsfeedMapEdit | NewsfeedRole | NewsfeedAnnouncement | NewsfeedLinkedMap | NewsfeedUnlinkedMap module-attribute

NewsfeedRecord

Bases: _TaggedPayload

Newsfeed entry for a new completion record.

Attributes:

Name Type Description
code OverwatchCode

Workshop code for the map.

map_name OverwatchMap

Name of the Overwatch map.

time float

Completion time achieved.

video GuideURL

Video URL showcasing the run.

rank_num int

Leaderboard rank number.

name str

Player name for the run.

medal MedalType | None

Medal tier assigned.

difficulty DifficultyAll

Difficulty rating for the map.

code: OverwatchCode instance-attribute

difficulty: DifficultyAll instance-attribute

map_name: OverwatchMap instance-attribute

medal: MedalType | None instance-attribute

name: str instance-attribute

rank_num: int instance-attribute

time: float instance-attribute

video: GuideURL instance-attribute

NewsfeedRole

Bases: _TaggedPayload

Newsfeed entry for a role assignment change.

Attributes:

Name Type Description
user_id int

Identifier of the user receiving the role change.

name str

Name of the role.

added list[str]

List of permissions or scopes added.

added: list[str] instance-attribute

name: str instance-attribute

user_id: int instance-attribute

NewsfeedScalar = str | int | float | bool | None module-attribute

NewsfeedUnarchive

Bases: _TaggedPayload

Newsfeed entry for unarchiving a map.

Attributes:

Name Type Description
code OverwatchCode

Workshop code for the map.

map_name OverwatchMap

Name of the Overwatch map.

creators list[str]

List of creator names.

difficulty DifficultyAll

Difficulty rating for the map.

reason str

Explanation for restoring the map.

code: OverwatchCode instance-attribute

creators: list[str] instance-attribute

difficulty: DifficultyAll instance-attribute

map_name: OverwatchMap instance-attribute

reason: str instance-attribute

NewsfeedUnlinkedMap

Bases: _TaggedPayload

Newsfeed entry for unlinking maps.

Attributes:

Name Type Description
official_code OverwatchCode

Code for the official map.

unofficial_code OverwatchCode

Code for the unofficial map.

reason str

Explanation for unlinking.

official_code: OverwatchCode instance-attribute

reason: str instance-attribute

unofficial_code: OverwatchCode instance-attribute

PublishNewsfeedJobResponse

Bases: Struct

Job response after requesting newsfeed publication.

Attributes:

Name Type Description
job_status JobStatusResponse

Status of the publishing job.

newsfeed_id int

Identifier of the newsfeed entry being published.

job_status: JobStatusResponse instance-attribute

newsfeed_id: int instance-attribute

__all__ = ('NewsfeedAnnouncement', 'NewsfeedArchive', 'NewsfeedBulkArchive', 'NewsfeedBulkUnarchive', 'NewsfeedDispatchEvent', 'NewsfeedEvent', 'NewsfeedEventType', 'NewsfeedFieldChange', 'NewsfeedGuide', 'NewsfeedLegacyRecord', 'NewsfeedLinkedMap', 'NewsfeedMapEdit', 'NewsfeedNewMap', 'NewsfeedPayload', 'NewsfeedRecord', 'NewsfeedRole', 'NewsfeedScalar', 'NewsfeedUnarchive', 'NewsfeedUnlinkedMap', 'PublishNewsfeedJobResponse') module-attribute