Completions¶
genjishimada_sdk.completions
¶
CamelConfig
¶
Bases: Struct
Base struct that renames fields to camelCase during encoding/decoding.
CompletionCreateRequest
¶
Bases: Struct
Request payload for submitting a completion.
Attributes:
| Name | Type | Description |
|---|---|---|
code |
OverwatchCode
|
Workshop code for the map. |
user_id |
int
|
Identifier for the submitting user. |
time |
float
|
Completion time in seconds. |
screenshot |
GuideURL
|
Proof screenshot URL. |
video |
GuideURL | None
|
Optional video proof URL. |
CompletionCreateRequest2
¶
Bases: Struct
Request payload for submitting a completion.
Attributes:
| Name | Type | Description |
|---|---|---|
code |
OverwatchCode
|
Workshop code for the map. |
user_id |
int
|
Identifier for the submitting user. |
time |
float
|
Completion time in seconds. |
screenshot |
GuideURL
|
Proof screenshot URL. |
video |
GuideURL | None
|
Optional video proof URL. |
CompletionCreatedEvent
¶
Bases: Struct
Event emitted when a completion is created.
Attributes:
| Name | Type | Description |
|---|---|---|
completion_id |
int
|
Identifier of the new completion. |
completion_id: int
instance-attribute
¶
CompletionModerateRequest
¶
Bases: Struct
Request for moderating a completion record.
Attributes:
| Name | Type | Description |
|---|---|---|
moderated_by |
int
|
Identifier of the moderator making the change. |
time |
float | UnsetType
|
New completion time in seconds. |
time_change_reason |
str | UnsetType
|
Required reason for changing the time. |
verified |
bool | UnsetType
|
Whether the completion should be verified. |
verification_reason |
str | None | UnsetType
|
Optional reason for verification change. |
mark_suspicious |
bool
|
Whether to mark the completion as suspicious. |
unmark_suspicious |
bool
|
Whether to unmark the completion as suspicious. |
suspicious_context |
str | UnsetType
|
Context for marking as suspicious (required if mark_suspicious is True). |
suspicious_flag_type |
SuspiciousFlag | UnsetType
|
Flag type for suspicious marking. |
mark_suspicious: bool = False
class-attribute
instance-attribute
¶
moderated_by: int
instance-attribute
¶
suspicious_context: str | UnsetType = UNSET
class-attribute
instance-attribute
¶
suspicious_flag_type: SuspiciousFlag | UnsetType = UNSET
class-attribute
instance-attribute
¶
time: float | UnsetType = UNSET
class-attribute
instance-attribute
¶
time_change_reason: str | UnsetType = UNSET
class-attribute
instance-attribute
¶
unmark_suspicious: bool = False
class-attribute
instance-attribute
¶
verification_reason: str | None | UnsetType = UNSET
class-attribute
instance-attribute
¶
verified: bool | UnsetType = UNSET
class-attribute
instance-attribute
¶
CompletionPatchRequest
¶
Bases: Struct
Partial update payload for completion records.
Attributes:
| Name | Type | Description |
|---|---|---|
message_id |
int | UnsetType
|
Discord message identifier for the submission. |
completion |
bool | UnsetType
|
Flag indicating completion status. |
verification_id |
int | UnsetType
|
Identifier linking to verification metadata. |
legacy |
bool | UnsetType
|
Whether the record predates current validation rules. |
legacy_medal |
str | None | UnsetType
|
Medal tier used for legacy records. |
wr_xp_check |
bool | UnsetType
|
Whether to perform world-record XP validation. |
completion: bool | UnsetType = UNSET
class-attribute
instance-attribute
¶
legacy: bool | UnsetType = UNSET
class-attribute
instance-attribute
¶
legacy_medal: str | None | UnsetType = UNSET
class-attribute
instance-attribute
¶
message_id: int | UnsetType = UNSET
class-attribute
instance-attribute
¶
verification_id: int | UnsetType = UNSET
class-attribute
instance-attribute
¶
wr_xp_check: bool | UnsetType = UNSET
class-attribute
instance-attribute
¶
CompletionResponse
¶
Bases: Struct
Represents a completion entry with verification metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
code |
OverwatchCode
|
Workshop code for the map. |
user_id |
int
|
Identifier for the completing user. |
name |
str
|
Display name of the runner. |
also_known_as |
str | None
|
Alternate display name if available. |
time |
float
|
Completion time in seconds. |
screenshot |
str
|
Screenshot URL for proof. |
video |
GuideURL | None
|
Optional video URL for proof. |
completion |
bool
|
Whether the run qualifies as a completion. |
verified |
bool
|
Whether the completion has been staff verified. |
rank |
int | None
|
Leaderboard rank if available. |
medal |
MedalType | None
|
Awarded medal tier for the run. |
map_name |
OverwatchMap
|
Name of the Overwatch map. |
difficulty |
DifficultyAll
|
Difficulty rating for the map. |
message_id |
int
|
Discord message ID tied to the submission. |
legacy |
bool
|
Whether the record predates current validation rules. |
legacy_medal |
MedalType | None
|
Medal tier used for legacy records. |
suspicious |
bool
|
Whether the run has raised suspicion flags. |
total_results |
int | None
|
Total number of records in the query, when paginated. |
upvotes |
int
|
Current upvote total for the submission. |
id |
int | None
|
Completion record identifier (optional, used for moderation). |
also_known_as: str | None
instance-attribute
¶
code: OverwatchCode
instance-attribute
¶
completion: bool
instance-attribute
¶
difficulty: DifficultyAll
instance-attribute
¶
id: int | None = None
class-attribute
instance-attribute
¶
legacy: bool
instance-attribute
¶
legacy_medal: MedalType | None
instance-attribute
¶
map_name: OverwatchMap
instance-attribute
¶
medal: MedalType | None
instance-attribute
¶
message_id: int
instance-attribute
¶
name: str
instance-attribute
¶
rank: int | None
instance-attribute
¶
screenshot: str
instance-attribute
¶
suspicious: bool
instance-attribute
¶
time: float
instance-attribute
¶
total_results: int | None = None
class-attribute
instance-attribute
¶
upvotes: int = 0
class-attribute
instance-attribute
¶
user_id: int
instance-attribute
¶
verified: bool
instance-attribute
¶
video: GuideURL | None
instance-attribute
¶
CompletionSubmissionJobResponse
¶
Bases: Struct
Job response for completion submissions.
Attributes:
| Name | Type | Description |
|---|---|---|
job_status |
JobStatusResponse | None
|
Asynchronous processing status for the submission. |
completion_id |
int
|
Identifier of the submitted completion. |
CompletionSubmissionResponse
¶
Bases: Struct
Submission response returned immediately after creating a run.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Identifier of the new submission. |
user_id |
int
|
Identifier for the submitting user. |
time |
float
|
Completion time in seconds. |
screenshot |
str
|
Screenshot URL for proof. |
video |
GuideURL | None
|
Optional video URL for proof. |
verified |
bool
|
Whether the submission has been verified. |
completion |
bool
|
Whether the run qualifies as a completion. |
inserted_at |
datetime
|
Timestamp when the submission was recorded. |
code |
OverwatchCode
|
Workshop code for the map. |
difficulty |
DifficultyAll
|
Difficulty rating for the map. |
map_name |
OverwatchMap
|
Name of the Overwatch map. |
hypothetical_rank |
int | None
|
Expected leaderboard rank if verified. |
hypothetical_medal |
MedalType | None
|
Expected medal tier if verified. |
name |
str
|
Display name of the runner. |
also_known_as |
str
|
Alternate display name if available. |
verified_by |
int | None
|
Identifier of the verifier, if verified. |
verification_id |
int | None
|
Verification entry ID, if applicable. |
message_id |
int | None
|
Discord message ID tied to the submission. |
suspicious |
bool
|
Whether the run has raised suspicion flags. |
also_known_as: str
instance-attribute
¶
code: OverwatchCode
instance-attribute
¶
completion: bool
instance-attribute
¶
difficulty: DifficultyAll
instance-attribute
¶
hypothetical_medal: MedalType | None
instance-attribute
¶
hypothetical_rank: int | None
instance-attribute
¶
id: int
instance-attribute
¶
inserted_at: dt.datetime
instance-attribute
¶
map_name: OverwatchMap
instance-attribute
¶
message_id: int | None
instance-attribute
¶
name: str
instance-attribute
¶
screenshot: str
instance-attribute
¶
suspicious: bool
instance-attribute
¶
time: float
instance-attribute
¶
user_id: int
instance-attribute
¶
verification_id: int | None
instance-attribute
¶
verified: bool
instance-attribute
¶
verified_by: int | None
instance-attribute
¶
video: GuideURL | None
instance-attribute
¶
CompletionVerificationUpdateRequest
¶
Bases: Struct
Update verification metadata for a completion.
Attributes:
| Name | Type | Description |
|---|---|---|
verified_by |
int
|
Identifier of the staff member performing the verification. |
verified |
bool
|
Whether the completion has been verified. |
reason |
str | None
|
Optional reasoning for verification changes. |
ExtractedResultResponse
¶
Bases: CamelConfig
OCR output summarizing detected result details.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str | None
|
Detected player name, if any. |
time |
float | None
|
Detected completion time in seconds. |
code |
str | None
|
Detected workshop code. |
texts |
dict
|
Raw extracted text blocks from the image. |
FailedAutoverifyEvent
¶
Bases: Struct
Event fired when automatic verification fails after OCR.
Attributes:
| Name | Type | Description |
|---|---|---|
submitted_code |
OverwatchCode
|
Workshop code submitted by the user. |
submitted_time |
float
|
Completion time submitted by the user. |
submitted_user_names |
list[str]
|
Names submitted by the user. |
user_id |
int
|
Identifier of the submitting user. |
extracted |
ExtractedResultResponse
|
OCR results extracted from the proof. |
code_match |
bool
|
Whether the extracted code matched the submission. |
time_match |
bool
|
Whether the extracted time matched the submission. |
user_match |
bool
|
Whether the extracted user matched the submission. |
code_match: bool
instance-attribute
¶
extracted: ExtractedResultResponse
instance-attribute
¶
screenshot: str
instance-attribute
¶
submitted_code: OverwatchCode
instance-attribute
¶
submitted_time: float
instance-attribute
¶
submitted_user_names: list[str]
instance-attribute
¶
time_match: bool
instance-attribute
¶
user_id: int
instance-attribute
¶
user_match: bool
instance-attribute
¶
MapRecordProgressionResponse
¶
Bases: Struct
Represents a historical record progression for a map.
Attributes:
| Name | Type | Description |
|---|---|---|
time |
float
|
Completion time in seconds. |
inserted_at |
datetime
|
Timestamp when the record was recorded. |
OcrResponse
¶
Bases: CamelConfig
Top-level OCR response payload.
extracted: ExtractedResultResponse
instance-attribute
¶
PendingVerificationResponse
¶
Bases: Struct
Represents a completion waiting for verification.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Identifier of the completion submission. |
verification_id |
int
|
Identifier of the verification entry. |
QualityUpdateRequest
¶
SuspiciousCompletionCreateRequest
¶
Bases: Struct
Request payload for flagging a completion as suspicious.
Attributes:
| Name | Type | Description |
|---|---|---|
context |
str
|
Explanation of why the run is suspicious. |
flag_type |
SuspiciousFlag
|
Category for the suspicion (e.g., cheating). |
flagged_by |
int
|
Identifier of the moderator setting the flag. |
message_id |
int | None
|
Discord message ID associated with the run. |
verification_id |
int | None
|
Verification record ID, if applicable. |
SuspiciousCompletionResponse
¶
Bases: Struct
Represents a stored suspicious completion entry.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Identifier of the suspicious record. |
user_id |
int
|
Identifier of the flagged user. |
context |
str
|
Explanation of why the run is suspicious. |
flag_type |
SuspiciousFlag
|
Category for the suspicion (e.g., cheating). |
message_id |
int | None
|
Discord message ID associated with the run. |
verification_id |
int | None
|
Verification record ID, if applicable. |
flagged_by |
int
|
Identifier of the moderator setting the flag. |
SuspiciousFlag = Literal['Cheating', 'Scripting']
module-attribute
¶
TimePlayedPerRankResponse
¶
Bases: Struct
Aggregated time played per rank bucket.
Attributes:
| Name | Type | Description |
|---|---|---|
total_seconds |
float
|
Total time played in seconds. |
difficulty |
DifficultyTop
|
Rank or difficulty bucket represented. |
UpvoteCreateRequest
¶
Bases: Struct
Request payload for adding an upvote to a completion.
Attributes:
| Name | Type | Description |
|---|---|---|
user_id |
int
|
Identifier of the user casting the upvote. |
message_id |
int
|
Discord message identifier for the completion message. |
UpvoteSubmissionJobResponse
¶
Bases: Struct
Job response for upvote submissions.
Attributes:
| Name | Type | Description |
|---|---|---|
job_status |
JobStatusResponse | None
|
Asynchronous processing status for the upvote. |
upvotes |
int | None
|
Updated upvote total after processing. |
UpvoteUpdateEvent
¶
Bases: Struct
Event emitted when a completion's upvotes change.
Attributes:
| Name | Type | Description |
|---|---|---|
user_id |
int
|
Identifier of the user that triggered the change. |
message_id |
int
|
Discord message identifier for the completion. |
VerificationChangedEvent
¶
Bases: Struct
Event emitted when a completion's verification changes.
Attributes:
| Name | Type | Description |
|---|---|---|
completion_id |
int
|
Identifier of the affected completion. |
verified |
bool
|
New verification state. |
verified_by |
int
|
Identifier of the verifier. |
reason |
str | None
|
Optional reason for the change. |
VerificationMessageDeleteEvent
¶
Bases: Struct
Event emitted to delete a verification queue message.
Attributes:
| Name | Type | Description |
|---|---|---|
verification_id |
int
|
Discord message ID of the verification to delete. |
verification_id: int
instance-attribute
¶
WorldRecordXPCheckResponse
¶
Bases: Struct
Result of checking whether a completion grants world-record XP.
Attributes:
| Name | Type | Description |
|---|---|---|
code |
OverwatchCode
|
Workshop code for the map. |
user_id |
int
|
Identifier of the runner. |
__all__ = ('CompletionCreateRequest', 'CompletionCreatedEvent', 'CompletionModerateRequest', 'CompletionPatchRequest', 'CompletionResponse', 'CompletionSubmissionJobResponse', 'CompletionSubmissionResponse', 'CompletionVerificationUpdateRequest', 'ExtractedResultResponse', 'FailedAutoverifyEvent', 'MapRecordProgressionResponse', 'OcrResponse', 'PendingVerificationResponse', 'QualityUpdateRequest', 'SuspiciousCompletionCreateRequest', 'SuspiciousCompletionResponse', 'SuspiciousFlag', 'TimePlayedPerRankResponse', 'UpvoteCreateRequest', 'UpvoteSubmissionJobResponse', 'UpvoteUpdateEvent', 'VerificationChangedEvent', 'VerificationMessageDeleteEvent', 'WorldRecordXPCheckResponse')
module-attribute
¶
to_camel(name: str) -> str
¶
Convert a snake_case field name to camelCase.