Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StravaEventHandlerStrategy

Hierarchy

  • StravaEventHandlerStrategy

Implements

Index

Constructors

Methods

Constructors

Methods

  • This method handles incoming events from third-party data providers, in this case Strava.

    After a successful execution of processing an incoming event, this method will fire an internal event with the identifier: oauth.activity.created. This event can be caught to use the fulfilled (completed) activity details in other places.

    access

    public

    async
    throws

    {Error} Given invalid event payload, incompatible event payload or given any other error occurs while processing.

    emits

    OnActivityCreated Given a successful activity creation (processing success).

    Parameters

    • providerName: string

      The OAuth provider name. This is the name of the third-party data provider, e.g. "strava".

    • userAddress: string

      The dHealth Address of the account that belongs to the activity owner.

    • data: BasicWebHookEventRequest

      The activity's headers. Importantly, Strava does not share full activity details here.

    Returns Promise<ActivityDocument>

    The created document that was added to activities.

Generated using TypeDoc