stack

Home > @infiniteobjects/top-shot-service

top-shot-service package

Top Shot service package

Classes

Class Description
TopShotService TopShot Services

Enumerations

Enumeration Description
MomentAssetImages Moment asset image sufixes
MomentAssetType Moment Asset sufixes selections
MomentAssetVideos Moment asset video sufixes

Functions

Function Description
excludeFromLeagues(leagues) Given a leagues (MomentLeague[]) param, returns a filtered MomentLeague[].
filterMomentsByLeague(filterLeagues) Given a leagues (MomentLeague[]) param and ITopShotAssetToken[] return a filtered ITopShotAssetToken[] based on provided leagues param.
filterMomentsByRetired(includeRetired) Given a includeRetired (boolean) param and TopShotAssetWithCurrentTeam[] return a filtered TopShotAssetWithCurrentTeam[] based on matching boolean.
getExternalUrl(momentId) Returns Top Shot external url
getPrintability(owner, user) Return IAssetPrintabilityStatus based on owner criteria
getRarity(rarity) Returns a TopshotMomentRarity from MomentAssetRarity or null
getSeriesName(setSeries) Transforms a setSeries number to series name
mintedMomentToTopShot(data, user) Transforms ITopshotMoment to ITopShotAssetToken
mintedMomentToTopShotWithCurrentTeam(data, user) Transforms ITopshotMoment to TopShotAssetWithCurrentTeam
removeCurrentTeamFromMoments(moments) Exclude current currentTeam prop from given TopShotAssetWithCurrentTeam[] param.
topShotUserToProfile(data) Transforms a ITopshotMomentOwner to IProfile
valueOrNull(obj) Given a object and a path Return the obj path value, or null.

Interfaces

Interface Description
GetMomentPayload GetMomentPayload
GetMomentsPayload GetMomentsPayload
GetUserProfilePayload GetUserProfilePayload
GqlError GqlError
GqlQuery GqlQuery
ITopshotMoment TopShots Minted Moment
ITopshotMomentOwner TopShots Minted Moment Owner
ITopshotMomentPlay TopShots Minted Moment Play information
ITopshotMomentPlayStats TopShots Minted Moment Play Stats
ITopshotMomentSet TopShots Minted Moment Set Data
SearchMomentPayload SearchMomentPayload

Variables

Variable Description
TOP_SHOT_API_ENDPOINT TOP_SHOT_API_ENDPOINT
TOP_SHOT_CONTRACT TopShot Contract
TOP_SHOT_DOMAIN TopShot Public Domain
TOP_SHOT_INCLUDE_RETIRED TOP_SHOT_INCLUDE_RETIRED
TOP_SHOT_INCLUDE_WNBA TOP_SHOT_INCLUDE_WNBA

Type Aliases

Type Alias Description
TopshotMomentRarity TopShots Moment Rarities