Skip to content

documentation typos: get_event_by_id #244

@johndwest

Description

@johndwest

The Search by ID section examples use the search() function, which does not have an eventid keyword. The entire section should be calling get_event_by_id()

Section follows:
Search by ID
from libcomcat.search import get_event_by_id

The get_event_by_id method assumes that the ComCat ID is already known. This method returns a DetailEvent Object which gives the user access to products and product contents.

Parameters
get_event_by_id has fewer parameters than the search and count methods.

Event ID: The event id. This may be specific to the data center.
ci3144585 = search(eventid='ci3144585')
Catalog: Limits the events to those from an available catalog. The default is the 'preferred' catalog.
us_events = search(eventid='ci3144585', catalog='us')
Include Superseded Products: Superseded products are those that have been replaced by a product contributed from another center or by updated versions of the product. Including superseded products will also include all deleted products. This must be specified when using examining the history of events.
ci3144585 = search(eventid='ci3144585', includesuperseded=True)
Include Deleted: This will allow deleted products and events to be included. This option is mutually exclusive to the 'includesuperseded. ci3144585 = search(eventid='ci3144585', includedeleted=True)
Host: By default the ComCat host is earthquake.usgs.gov, but this can be overriden using the host option.
host_events = search(host='other_host')
Scenario: By default, libcomcat searches for real events. Use the --scenario option to search for scenario events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions