# EventsService

> Events and their players.

Source: https://docs.stxapp.io/sdks/go/reference/events/

## EventsService

```go
type EventsService struct {
	// contains filtered or unexported fields
}
```

EventsService lists events and their players. Use it through [Client.Events](/sdks/go/reference/client/#client).

### All

```go
func (s *EventsService) All(ctx context.Context, q *EventsQuery) iter.Seq2[Event, error]
```

All returns every event matching q, following the cursor.

### List

```go
func (s *EventsService) List(ctx context.Context, q *EventsQuery) (*Page[Event], error)
```

List returns one page of events (`GET /api/v1/events`).

### Players

```go
func (s *EventsService) Players(ctx context.Context, eventID string) (*EventPlayers, error)
```

Players returns the event's team rosters and the stats a market on it can use (`GET /api/v1/events/{event_id}/players`). It needs an API key or an OAuth app token with the events scope, and returns an error matching [ErrNotAvailable](/sdks/go/reference/errors/#constants-and-variables) where the exchange does not have it.

### StatsFor

```go
func (s *EventsService) StatsFor(ctx context.Context, eventID string) ([]EventStat, error)
```

StatsFor returns the stats an event accepts for new markets.
