Documentation
¶
Overview ¶
Package gamma provides a read-only client for the Polymarket Gamma market-data API.
Overview ¶
The Gamma API exposes market and event metadata, full-text search, tag relationships, sports data, public profiles, and user comments. All endpoints are public (no auth required).
Usage ¶
client := gamma.New(gamma.Config{}) // defaults to gamma-api.polymarket.com
// Search markets, events, profiles
var results gamma.SearchResults
client.Search(ctx, "election", &results)
// Get events and markets
events, _ := client.GetEvents(ctx, gamma.EventFilterParams{Active: truePtr})
markets, _ := client.GetMarkets(ctx, gamma.MarketFilterParams{Slug: "..."})
// Tags and related content
tags, _ := client.GetTags(ctx)
related, _ := client.GetRelatedTags(ctx, 12, gamma.RelatedTagParams{})
// Public profiles and comments
profile := gamma.PublicProfile{Address: "0x..."}
client.GetPublicProfile(ctx, &profile)
comments, _ := client.GetComments(ctx, gamma.CommentFilterParams{})
Default host: https://gamma-api.polymarket.com
Index ¶
- Constants
- type Client
- func (c *Client) GetComment(ctx context.Context, id int) ([]Comment, error)
- func (c *Client) GetComments(ctx context.Context, params CommentFilterParams) ([]Comment, error)
- func (c *Client) GetCommentsByUserAddress(ctx context.Context, address string) ([]Comment, error)
- func (c *Client) GetEvent(ctx context.Context, out *Event) error
- func (c *Client) GetEventBySlug(ctx context.Context, out *Event) error
- func (c *Client) GetEventTags(ctx context.Context, eventID int) ([]Tag, error)
- func (c *Client) GetEvents(ctx context.Context, params EventFilterParams) ([]Event, error)
- func (c *Client) GetMarket(ctx context.Context, out *Market) error
- func (c *Client) GetMarketBySlug(ctx context.Context, out *Market) error
- func (c *Client) GetMarkets(ctx context.Context, params MarketFilterParams) ([]Market, error)
- func (c *Client) GetPublicProfile(ctx context.Context, out *PublicProfile) error
- func (c *Client) GetRelatedTagRelationships(ctx context.Context, id int, params RelatedTagParams) ([]TagRelationship, error)
- func (c *Client) GetRelatedTagRelationshipsBySlug(ctx context.Context, slug string, params RelatedTagParams) ([]TagRelationship, error)
- func (c *Client) GetRelatedTags(ctx context.Context, id int, params RelatedTagParams) ([]Tag, error)
- func (c *Client) GetRelatedTagsBySlug(ctx context.Context, slug string, params RelatedTagParams) ([]Tag, error)
- func (c *Client) GetSeries(ctx context.Context, out *Series) error
- func (c *Client) GetSports(ctx context.Context) ([]SportsMetadata, error)
- func (c *Client) GetTag(ctx context.Context, out *Tag) error
- func (c *Client) GetTagBySlug(ctx context.Context, out *Tag) error
- func (c *Client) GetTags(ctx context.Context) ([]Tag, error)
- func (c *Client) GetTeams(ctx context.Context) ([]Team, error)
- func (c *Client) GetValidSportsMarketTypes(ctx context.Context, out *SportsMarketTypesResponse) error
- func (c *Client) Host() string
- func (c *Client) ListEventsKeyset(ctx context.Context, params EventKeysetParams) (EventKeysetPage, error)
- func (c *Client) ListMarketsKeyset(ctx context.Context, params MarketKeysetParams) (MarketKeysetPage, error)
- func (c *Client) ListSeries(ctx context.Context, params SeriesFilterParams) ([]Series, error)
- func (c *Client) PublicSearch(ctx context.Context, query string, out *SearchResults) error
- func (c *Client) Search(ctx context.Context, query string, out *SearchResults) error
- type Comment
- type CommentFilterParams
- type Config
- type Event
- type EventFilterParams
- type EventKeysetPage
- type EventKeysetParams
- type Market
- type MarketFilterParams
- type MarketKeysetPage
- type MarketKeysetParams
- type PublicProfile
- type RelatedTagParams
- type Reward
- type SearchResults
- type Series
- type SeriesFilterParams
- type SportsMarketTypesResponse
- type SportsMetadata
- type Tag
- type TagRelationship
- type Team
Constants ¶
const DefaultHost = "https://gamma-api.polymarket.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetComment ¶
GetComment returns comments for a comment ID.
func (*Client) GetComments ¶
GetComments returns comments matching params.
func (*Client) GetCommentsByUserAddress ¶
GetCommentsByUserAddress returns comments for a user wallet address.
func (*Client) GetEvent ¶
GetEvent writes an event into out using out.ID, or out.Slug when ID is empty.
func (*Client) GetEventBySlug ¶
GetEventBySlug writes an event by out.Slug into out.
func (*Client) GetEventTags ¶ added in v1.2.7
GetEventTags returns tags attached to an event.
func (*Client) GetMarket ¶
GetMarket writes a market into out using out.ID, or out.Slug when ID is empty.
func (*Client) GetMarketBySlug ¶
GetMarketBySlug writes a market by out.Slug into out.
func (*Client) GetMarkets ¶
GetMarkets returns markets matching params.
func (*Client) GetPublicProfile ¶
func (c *Client) GetPublicProfile(ctx context.Context, out *PublicProfile) error
GetPublicProfile writes a public profile by out.Address into out.
func (*Client) GetRelatedTagRelationships ¶
func (c *Client) GetRelatedTagRelationships(ctx context.Context, id int, params RelatedTagParams) ([]TagRelationship, error)
GetRelatedTagRelationships returns ranked related-tag relationships for a tag ID.
func (*Client) GetRelatedTagRelationshipsBySlug ¶
func (c *Client) GetRelatedTagRelationshipsBySlug(ctx context.Context, slug string, params RelatedTagParams) ([]TagRelationship, error)
GetRelatedTagRelationshipsBySlug returns ranked related-tag relationships for a tag slug.
func (*Client) GetRelatedTags ¶
func (c *Client) GetRelatedTags(ctx context.Context, id int, params RelatedTagParams) ([]Tag, error)
GetRelatedTags returns related Tag records for a tag ID.
func (*Client) GetRelatedTagsBySlug ¶
func (c *Client) GetRelatedTagsBySlug(ctx context.Context, slug string, params RelatedTagParams) ([]Tag, error)
GetRelatedTagsBySlug returns related Tag records for a tag slug.
func (*Client) GetSports ¶
func (c *Client) GetSports(ctx context.Context) ([]SportsMetadata, error)
GetSports returns sports metadata.
func (*Client) GetTagBySlug ¶
GetTagBySlug writes a tag by out.Slug into out.
func (*Client) GetValidSportsMarketTypes ¶
func (c *Client) GetValidSportsMarketTypes(ctx context.Context, out *SportsMarketTypesResponse) error
GetValidSportsMarketTypes writes valid sports market types into out.
func (*Client) ListEventsKeyset ¶ added in v1.2.7
func (c *Client) ListEventsKeyset(ctx context.Context, params EventKeysetParams) (EventKeysetPage, error)
ListEventsKeyset returns events using cursor-based keyset pagination.
func (*Client) ListMarketsKeyset ¶ added in v1.2.7
func (c *Client) ListMarketsKeyset(ctx context.Context, params MarketKeysetParams) (MarketKeysetPage, error)
ListMarketsKeyset returns markets using cursor-based keyset pagination.
func (*Client) ListSeries ¶
ListSeries returns series matching params.
func (*Client) PublicSearch ¶
PublicSearch writes market, event, and public-profile matches into out.
type Comment ¶
type Comment struct {
ID pmtypes.Int `json:"id"`
Body string `json:"body"`
User string `json:"user"`
Address string `json:"address"`
CreatedAt pmtypes.Time `json:"createdAt"`
UpdatedAt pmtypes.Time `json:"updatedAt"`
Deleted bool `json:"deleted"`
ParentID pmtypes.Int `json:"parentId"`
RootID pmtypes.Int `json:"rootId"`
Depth pmtypes.Int `json:"depth"`
Market string `json:"market"`
EventID pmtypes.Int `json:"eventId"`
ReportCount pmtypes.Int `json:"reportCount"`
ReactionCount pmtypes.Int `json:"reactionCount"`
ProfileImage string `json:"profileImage"`
ProfileImageURL string `json:"profileImageUrl"`
Raw json.RawMessage `json:"-"`
}
Comment describes a Gamma comment.
func (*Comment) UnmarshalJSON ¶
type CommentFilterParams ¶
type CommentFilterParams struct {
// Limit sets the maximum results.
Limit int
// Offset sets the start index.
Offset int
// Market filters by condition ID.
Market string
// EventID filters by event ID.
EventID int
// User filters by user wallet address.
User string
}
CommentFilterParams filters GET /comments requests.
type Event ¶
type Event struct {
ID pmtypes.Int `json:"id"`
Ticker string `json:"ticker"`
Slug string `json:"slug"`
Title string `json:"title"`
Subtitle string `json:"subtitle"`
Description string `json:"description"`
ResolutionSource string `json:"resolutionSource"`
StartDate pmtypes.Time `json:"startDate"`
CreationDate pmtypes.Time `json:"creationDate"`
EndDate pmtypes.Time `json:"endDate"`
Image string `json:"image"`
Icon string `json:"icon"`
Active bool `json:"active"`
Closed bool `json:"closed"`
Archived bool `json:"archived"`
New bool `json:"new"`
Featured bool `json:"featured"`
Restricted bool `json:"restricted"`
Liquidity pmtypes.Float64 `json:"liquidity"`
Volume pmtypes.Float64 `json:"volume"`
OpenInterest pmtypes.Float64 `json:"openInterest"`
SortBy string `json:"sortBy"`
Category string `json:"category"`
Subcategory string `json:"subcategory"`
IsTemplate bool `json:"isTemplate"`
TemplateVariables string `json:"templateVariables"`
PublishedAt pmtypes.Time `json:"published_at"`
CreatedAt pmtypes.Time `json:"createdAt"`
UpdatedAt pmtypes.Time `json:"updatedAt"`
CreatedBy pmtypes.Int `json:"createdBy"`
UpdatedBy pmtypes.Int `json:"updatedBy"`
Competitive pmtypes.Float64 `json:"competitive"`
Volume24hr pmtypes.Float64 `json:"volume24hr"`
Volume1wk pmtypes.Float64 `json:"volume1wk"`
Volume1mo pmtypes.Float64 `json:"volume1mo"`
Volume1yr pmtypes.Float64 `json:"volume1yr"`
LiquidityClob pmtypes.Float64 `json:"liquidityClob"`
NegRisk bool `json:"negRisk"`
CommentCount pmtypes.Int `json:"commentCount"`
Markets []Market `json:"markets"`
Tags []Tag `json:"tags"`
Series []Series `json:"series"`
Raw json.RawMessage `json:"-"`
}
Event describes a Gamma event.
func (*Event) UnmarshalJSON ¶
type EventFilterParams ¶
type EventFilterParams = MarketFilterParams
EventFilterParams is an alias for MarketFilterParams.
type EventKeysetPage ¶ added in v1.2.7
type EventKeysetPage struct {
Events []Event `json:"events"`
NextCursor string `json:"next_cursor"`
}
EventKeysetPage contains a cursor-paginated event page.
type EventKeysetParams ¶ added in v1.2.7
type EventKeysetParams struct {
// Limit sets the maximum number of results, up to 500.
Limit int
// Order is a comma-separated list of JSON field names to order by.
Order string
// Ascending sets the sort direction when Order is set.
Ascending *bool
// AfterCursor is the cursor returned as next_cursor by the previous page.
AfterCursor string
// IDs filters by event IDs.
IDs []int
// Slugs filters by event slugs.
Slugs []string
// Closed filters by closed status.
Closed *bool
// Live filters by live status.
Live *bool
// Featured filters by featured status.
Featured *bool
// CYOM filters by create-your-own-market status.
CYOM *bool
// TitleSearch filters by title search text.
TitleSearch string
// LiquidityMin filters by minimum liquidity.
LiquidityMin *float64
// LiquidityMax filters by maximum liquidity.
LiquidityMax *float64
// VolumeMin filters by minimum volume.
VolumeMin *float64
// VolumeMax filters by maximum volume.
VolumeMax *float64
// StartDateMin filters by minimum start date.
StartDateMin string
// StartDateMax filters by maximum start date.
StartDateMax string
// EndDateMin filters by minimum end date.
EndDateMin string
// EndDateMax filters by maximum end date.
EndDateMax string
// StartTimeMin filters by minimum start time.
StartTimeMin string
// StartTimeMax filters by maximum start time.
StartTimeMax string
// TagIDs filters by tag IDs.
TagIDs []int
// TagSlug filters by tag slug.
TagSlug string
// ExcludeTagIDs excludes matching tag IDs.
ExcludeTagIDs []int
// RelatedTags includes events related to the supplied tags.
RelatedTags *bool
// TagMatch controls tag matching semantics.
TagMatch string
// SeriesIDs filters by series IDs.
SeriesIDs []int
// GameIDs filters by game IDs.
GameIDs []int
// EventDate filters by event date.
EventDate string
// EventWeek filters by event week.
EventWeek int
// FeaturedOrder filters by featured-order status.
FeaturedOrder *bool
// Recurrence filters by recurrence.
Recurrence string
// CreatedBy filters by creator IDs.
CreatedBy []string
// ParentEventID filters by parent event ID.
ParentEventID int
// IncludeChildren includes child events.
IncludeChildren *bool
// PartnerSlug attaches external partners to matching events.
PartnerSlug string
// IncludeChat includes Chats and Series.Chats relations.
IncludeChat *bool
// IncludeTemplate includes Templates relation.
IncludeTemplate *bool
// IncludeBestLines includes BestLines relation.
IncludeBestLines *bool
// Locale sets the localized response language.
Locale string
}
EventKeysetParams filters GET /events/keyset requests.
type Market ¶
type Market struct {
ID pmtypes.Int `json:"id"`
Question string `json:"question"`
ConditionID string `json:"conditionId"`
Slug string `json:"slug"`
Description string `json:"description"`
ResolutionSource string `json:"resolutionSource"`
EndDate pmtypes.Time `json:"endDate"`
StartDate pmtypes.Time `json:"startDate"`
Image string `json:"image"`
Icon string `json:"icon"`
Active bool `json:"active"`
Closed bool `json:"closed"`
Archived bool `json:"archived"`
Resolved bool `json:"resolved"`
New bool `json:"new"`
Featured bool `json:"featured"`
Restricted bool `json:"restricted"`
Liquidity pmtypes.Float64 `json:"liquidity"`
Volume pmtypes.Float64 `json:"volume"`
OpenInterest pmtypes.Float64 `json:"openInterest"`
VolumeNum pmtypes.Float64 `json:"volumeNum"`
LiquidityNum pmtypes.Float64 `json:"liquidityNum"`
EndDateISO pmtypes.Time `json:"endDateIso"`
StartDateISO pmtypes.Time `json:"startDateIso"`
CreatedAt pmtypes.Time `json:"createdAt"`
UpdatedAt pmtypes.Time `json:"updatedAt"`
CreationDate pmtypes.Time `json:"creationDate"`
PublishedAt pmtypes.Time `json:"published_at"`
CreatedBy pmtypes.Int `json:"createdBy"`
UpdatedBy pmtypes.Int `json:"updatedBy"`
Ready bool `json:"ready"`
Funded bool `json:"funded"`
AcceptingOrders bool `json:"acceptingOrders"`
AcceptingOrderTimestamp pmtypes.Time `json:"acceptingOrderTimestamp"`
EnableOrderBook bool `json:"enableOrderBook"`
MinimumOrderSize pmtypes.Float64 `json:"minimumOrderSize"`
MinimumTickSize pmtypes.Float64 `json:"minimumTickSize"`
QuestionID pmtypes.String `json:"questionID"`
FPmm string `json:"fpmm"`
MakerBaseFee pmtypes.Float64 `json:"makerBaseFee"`
TakerBaseFee pmtypes.Float64 `json:"takerBaseFee"`
NotificationsEnabled bool `json:"notificationsEnabled"`
NegRisk bool `json:"negRisk"`
NegRiskMarketID pmtypes.String `json:"negRiskMarketID"`
NegRiskRequestID pmtypes.String `json:"negRiskRequestID"`
Competitive pmtypes.Float64 `json:"competitive"`
RewardsMinSize pmtypes.Float64 `json:"rewardsMinSize"`
RewardsMaxSpread pmtypes.Float64 `json:"rewardsMaxSpread"`
Spread pmtypes.Float64 `json:"spread"`
LastTradePrice pmtypes.Float64 `json:"lastTradePrice"`
BestBid pmtypes.Float64 `json:"bestBid"`
BestAsk pmtypes.Float64 `json:"bestAsk"`
OneDayPriceChange pmtypes.Float64 `json:"oneDayPriceChange"`
OneHourPriceChange pmtypes.Float64 `json:"oneHourPriceChange"`
OneWeekPriceChange pmtypes.Float64 `json:"oneWeekPriceChange"`
OneMonthPriceChange pmtypes.Float64 `json:"oneMonthPriceChange"`
OneYearPriceChange pmtypes.Float64 `json:"oneYearPriceChange"`
Outcomes pmtypes.StringSlice `json:"outcomes"`
OutcomePrices pmtypes.Float64Slice `json:"outcomePrices"`
ClobTokenIDs pmtypes.StringSlice `json:"clobTokenIds"`
Tags []Tag `json:"tags"`
Events []Event `json:"events"`
Rewards []Reward `json:"rewards"`
Category string `json:"category"`
Subcategory string `json:"subcategory"`
SortBy string `json:"sortBy"`
IsTemplate bool `json:"isTemplate"`
TemplateVariables string `json:"templateVariables"`
MarketType string `json:"marketType"`
GroupItemTitle string `json:"groupItemTitle"`
GroupItemThreshold pmtypes.String `json:"groupItemThreshold"`
OrderPriceMinTickSize pmtypes.Float64 `json:"orderPriceMinTickSize"`
OrderMinSize pmtypes.Float64 `json:"orderMinSize"`
Volume24hr pmtypes.Float64 `json:"volume24hr"`
Volume1wk pmtypes.Float64 `json:"volume1wk"`
Volume1mo pmtypes.Float64 `json:"volume1mo"`
Volume1yr pmtypes.Float64 `json:"volume1yr"`
LiquidityClob pmtypes.Float64 `json:"liquidityClob"`
VolumeClob pmtypes.Float64 `json:"volumeClob"`
Raw json.RawMessage `json:"-"`
}
Market describes a Gamma market.
func (*Market) UnmarshalJSON ¶
type MarketFilterParams ¶
type MarketFilterParams struct {
// Active filters by active status.
Active *bool
// Closed filters by closed status.
Closed *bool
// Archived filters by archived status.
Archived *bool
// Resolved filters by resolution status.
Resolved *bool
// Limit sets the maximum results.
Limit int
// Offset sets the start index.
Offset int
// Order sets the sort field.
Order string
// Ascending sets the sort direction.
Ascending *bool
// TagID filters by tag ID.
TagID int
// EventID filters by event ID.
EventID int
// Slug filters by market slug.
Slug string
// NegativeRisk filters by neg-risk status.
NegativeRisk *bool
// AcceptingOrders filters by order book status.
AcceptingOrders *bool
// ClobTokenIDs filters by conditional token IDs.
ClobTokenIDs []string
// ConditionIDs filters by condition IDs.
ConditionIDs []string
// MarketMakerAddress filters by FPMM contract address.
MarketMakerAddress []string
}
MarketFilterParams filters GET /markets requests.
type MarketKeysetPage ¶ added in v1.2.7
type MarketKeysetPage struct {
Markets []Market `json:"markets"`
NextCursor string `json:"next_cursor"`
}
MarketKeysetPage contains a cursor-paginated market page.
type MarketKeysetParams ¶ added in v1.2.7
type MarketKeysetParams struct {
// Limit sets the maximum number of results, up to 100.
Limit int
// Order is a comma-separated list of JSON field names to order by.
Order string
// Ascending sets the sort direction when Order is set.
Ascending *bool
// AfterCursor is the cursor returned as next_cursor by the previous page.
AfterCursor string
// IDs filters by market IDs.
IDs []int
// Slugs filters by market slugs.
Slugs []string
// Closed filters by closed status.
Closed *bool
// Decimalized filters by decimalized status.
Decimalized *bool
// ClobTokenIDs filters by conditional token IDs.
ClobTokenIDs []string
// ConditionIDs filters by condition IDs.
ConditionIDs []string
// QuestionIDs filters by question IDs.
QuestionIDs []string
// MarketMakerAddress filters by FPMM contract address.
MarketMakerAddress []string
// LiquidityNumMin filters by minimum numeric liquidity.
LiquidityNumMin *float64
// LiquidityNumMax filters by maximum numeric liquidity.
LiquidityNumMax *float64
// VolumeNumMin filters by minimum numeric volume.
VolumeNumMin *float64
// VolumeNumMax filters by maximum numeric volume.
VolumeNumMax *float64
// StartDateMin filters by minimum start date.
StartDateMin string
// StartDateMax filters by maximum start date.
StartDateMax string
// EndDateMin filters by minimum end date.
EndDateMin string
// EndDateMax filters by maximum end date.
EndDateMax string
// TagIDs filters by tag IDs.
TagIDs []int
// RelatedTags includes markets related to the supplied tags.
RelatedTags *bool
// TagMatch controls tag matching semantics.
TagMatch string
// CYOM filters by create-your-own-market status.
CYOM *bool
// RFQEnabled filters by RFQ status.
RFQEnabled *bool
// UMAResolutionStatus filters by UMA resolution status.
UMAResolutionStatus string
// GameID filters by game ID.
GameID string
// SportsMarketTypes filters by sports market type identifiers.
SportsMarketTypes []string
// IncludeTag includes Tags relation on each market.
IncludeTag *bool
// Locale sets the localized response language.
Locale string
}
MarketKeysetParams filters GET /markets/keyset requests.
type PublicProfile ¶
type PublicProfile struct {
Address string `json:"address"`
Name string `json:"name"`
Username string `json:"username"`
Pseudonym string `json:"pseudonym"`
Bio string `json:"bio"`
ProfileImage string `json:"profileImage"`
ProfileImageOptimized string `json:"profileImageOptimized"`
DisplayUsernamePublic bool `json:"displayUsernamePublic"`
ProxyWallet string `json:"proxyWallet"`
Wallet string `json:"wallet"`
CreatedAt pmtypes.Time `json:"createdAt"`
UpdatedAt pmtypes.Time `json:"updatedAt"`
VolumeTraded pmtypes.Float64 `json:"volumeTraded"`
ProfitLoss pmtypes.Float64 `json:"profitLoss"`
PositionsValue pmtypes.Float64 `json:"positionsValue"`
Verified bool `json:"verified"`
VerifiedBadge bool `json:"verifiedBadge"`
XUsername string `json:"xUsername"`
Raw json.RawMessage `json:"-"`
}
PublicProfile describes a public user profile.
func (*PublicProfile) UnmarshalJSON ¶
func (p *PublicProfile) UnmarshalJSON(data []byte) error
type RelatedTagParams ¶
type RelatedTagParams struct {
// OmitEmpty removes tags with no related items.
OmitEmpty *bool
// Status filters by tag status.
Status string
}
RelatedTagParams filters GET /tags/:id/related-tags requests.
type Reward ¶
type Reward struct {
ID pmtypes.Int `json:"id"`
AssetAddress string `json:"assetAddress"`
StartDate pmtypes.Time `json:"startDate"`
EndDate pmtypes.Time `json:"endDate"`
RatePerDay pmtypes.Float64 `json:"ratePerDay"`
TotalRewards pmtypes.Float64 `json:"totalRewards"`
Raw json.RawMessage `json:"-"`
}
Reward describes a Gamma market reward configuration.
type SearchResults ¶
type SearchResults struct {
Markets []Market `json:"markets"`
Events []Event `json:"events"`
Series []Series `json:"series"`
Tags []Tag `json:"tags"`
}
SearchResults contains public search matches.
type Series ¶
type Series struct {
ID pmtypes.Int `json:"id"`
Ticker string `json:"ticker"`
Slug string `json:"slug"`
Title string `json:"title"`
Subtitle string `json:"subtitle"`
Description string `json:"description"`
Image string `json:"image"`
Icon string `json:"icon"`
Active bool `json:"active"`
Closed bool `json:"closed"`
Archived bool `json:"archived"`
Volume pmtypes.Float64 `json:"volume"`
Liquidity pmtypes.Float64 `json:"liquidity"`
StartDate pmtypes.Time `json:"startDate"`
EndDate pmtypes.Time `json:"endDate"`
CreatedAt pmtypes.Time `json:"createdAt"`
UpdatedAt pmtypes.Time `json:"updatedAt"`
Events []Event `json:"events"`
Tags []Tag `json:"tags"`
Raw json.RawMessage `json:"-"`
}
Series describes a Gamma series.
func (*Series) UnmarshalJSON ¶
type SeriesFilterParams ¶
type SeriesFilterParams struct {
// Limit sets the maximum results.
Limit int
// Offset sets the start index.
Offset int
// Active filters by active status.
Active *bool
// Closed filters by closed status.
Closed *bool
// Archived filters by archived status.
Archived *bool
// Slug filters by series slug.
Slug string
// TagID filters by tag ID.
TagID int
// Ascending sets the sort direction.
Ascending *bool
// Order sets the sort field.
Order string
}
SeriesFilterParams filters GET /series requests.
type SportsMarketTypesResponse ¶
type SportsMarketTypesResponse struct {
// MarketTypes lists the valid market type identifiers.
MarketTypes []string `json:"marketTypes"`
}
SportsMarketTypesResponse contains valid sports market types.
type SportsMetadata ¶
type SportsMetadata struct {
ID pmtypes.Int `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Label string `json:"label"`
TagID pmtypes.Int `json:"tagId"`
CreatedAt pmtypes.Time `json:"createdAt"`
Image string `json:"image"`
}
SportsMetadata describes a sport.
type Tag ¶
type Tag struct {
ID pmtypes.Int `json:"id"`
Label string `json:"label"`
Slug string `json:"slug"`
ForceShow bool `json:"forceShow"`
PublishedAt pmtypes.Time `json:"publishedAt"`
CreatedBy pmtypes.Int `json:"createdBy"`
UpdatedBy pmtypes.Int `json:"updatedBy"`
CreatedAt pmtypes.Time `json:"createdAt"`
UpdatedAt pmtypes.Time `json:"updatedAt"`
ForceHide bool `json:"forceHide"`
IsCarousel bool `json:"isCarousel"`
Raw json.RawMessage `json:"-"`
}
Tag describes a Gamma tag.
func (*Tag) UnmarshalJSON ¶
type TagRelationship ¶
type TagRelationship struct {
ID pmtypes.Int `json:"id"`
TagID pmtypes.Int `json:"tagID"`
RelatedTagID pmtypes.Int `json:"relatedTagID"`
Rank pmtypes.Int `json:"rank"`
}
TagRelationship describes a ranked relationship between two tags.
type Team ¶
type Team struct {
ID pmtypes.Int `json:"id"`
Name string `json:"name"`
Sport string `json:"sport"`
Logo string `json:"logo"`
Abbreviation string `json:"abbreviation"`
Image string `json:"image"`
CreatedAt pmtypes.Time `json:"createdAt"`
UpdatedAt pmtypes.Time `json:"updatedAt"`
}
Team describes a sports team.