Skip to content

SDK drift: Python Exchange has get_event_by_id and get_event_by_slug methods absent from TypeScript #1295

Description

@realfishsam

Summary

Python's Exchange base class exposes two lookup helpers — get_event_by_id(id) and get_event_by_slug(slug) — that have no equivalent in the TypeScript Exchange class.

Python (sdks/python/pmxt/client.py, lines 2888–2912)

def get_event_by_id(self, id: str) -> Optional[UnifiedEvent]:
    """Fetch a single Probable event by its numeric ID."""
    data = self._call_method("getEventById", id)
    return _convert_event(data) if data is not None else None

def get_event_by_slug(self, slug: str) -> Optional[UnifiedEvent]:
    """Fetch a single Probable event by its URL slug."""
    data = self._call_method("getEventBySlug", slug)
    return _convert_event(data) if data is not None else None

Both methods delegate to the sidecar via _call_method and return a UnifiedEvent (or None).

TypeScript (sdks/typescript/pmxt/client.ts)

No getEventById or getEventBySlug method exists on the Exchange class.

Impact

Python users of Probable (and any other venue that supports these endpoints) can look up events directly by ID or slug. TypeScript users have no equivalent — they must go through fetchEvents with a filter, which is more verbose and may not be supported on all venues.

These methods are generic helpers on the base class and should be mirrored in TypeScript:

async getEventById(id: string): Promise<UnifiedEvent | null>
async getEventBySlug(slug: string): Promise<UnifiedEvent | null>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions