Documentation ¶
Index ¶
- Constants
- type Client
- func (client *Client) GetStreamData(stream string, handlerFunc interface{}) error
- func (client *Client) LastTimestamp() string
- func (client *Client) Match(attribute string, value interface{}) *Client
- func (client *Client) UnmarshalJSONBasedOnStream(stream string, handlerFunc interface{}, lastSub *time.Time) error
Constants ¶
View Source
const ( // DefaultURL is the URL of the Wikimedia EventStreams service (sans any stream endpoints) DefaultURL string = "https://stream.wikimedia.org/v2/stream" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { BaseURL string Predicates map[string]interface{} Since string // contains filtered or unexported fields }
Client is used to subscribe to the Wikimedia EventStreams service
func (*Client) GetStreamData ¶
RecentChanges subscribes to the recent changes feed. The handler is invoked with a RecentChangeEvent once for every matching event received.
func (*Client) LastTimestamp ¶
LastTimestamp returns the ISO8601 formatted timestamp of the last event received.
Click to show internal directories.
Click to hide internal directories.