mb_get_events: Get List of Available Events

Description Usage Arguments Value See Also Examples

Description

List the Events Available on Matchbook.com

Usage

1
2
mb_get_events(session_data, sport_ids = NULL, start_date = NULL,
  end_date = NULL, market_states = c("open", "suspended"))

Arguments

session_data

A session object returned from a successful mb_login attempt. It contains details about your user preferences and security details.

sport_ids

A vector of integer sport_ids that indicate sports for which event details are required. e.g. c(15,1) gives Soccer and Pro Football (NFL)

start_date

A string (or date/POSIXct) value with format YYYY-mm-dd or YYYY-mm-dd HH:MM:SS format.

end_date

A string (or date/POSIXct) value with format YYYY-mm-dd or YYYY-mm-dd HH:MM:SS format.

market_states

A vector of string containing the market states to return. Defaults to 'open' or 'suspended' market types.

Value

If successful, a dataframe with first 500 events and associated information. Only 500 events are permitted at one time. Pagination is possible but not implemented in this version. The data frame has the following fields:

id

Event id

name

Event name

start

The start date of the event

status

If betting is still available on this event it will have status='open'

sport-id

The sport id of this event

category-id

The category of the event e.g. Premier League is a category within Football/Soccer

in-running-flag

Is the market currently in-running

allow-live-betting

Is it possible for this market to go in running

market-ids

The ids of the markets within this event

meta-tags

Tags describing the event

See Also

mb_get_sports,mb_get_markets

Examples

1
2
3
## Not run: my_session <- mb_login("my_user_name","verysafepassword"); 
mb_get_events(session_data=my_session,sport_ids=15)
## End(Not run)

matchbook documentation built on May 2, 2019, 5:49 a.m.