Skip to content

PhaseGroup

Brandon Cooke edited this page Aug 6, 2019 · 2 revisions

PhaseGroup

A Phase Group is the lowest unit on smash.gg. It is a bracket of some sort that belongs to a Phase.

const smashgg = require('smashgg.js');
const PhaseGroup = smashgg.PhaseGroup;

let phaseGroup1 = await PhaseGroup.get(44445);

Constructor

PhaseGroup(
    id: number,
    phaseId: number,
    displayIdentifier: string | null,
    firstRoundTime: number | null,
    state: number | null,
    waveId: number | null,
    tiebreakOrder: object | null
)

Properties

  • id
    • number
  • phaseId
    • number
  • displayIdentifier
    • string | null
  • firstRoundTime
    • number | null
  • state
    • number | null
  • waveId
    • number | null
  • tiebreakOrder
    • object | null

Statics

  • async get(id)
    • get a phase group by numeric id
    • parameters
      • id
        • number
        • numeric id of the phase group

Methods

  • getId()

    • gets the numeric identifier of the phase group
    • returns number
  • getPhaseId()

    • gets the numeric identifier of the phase groups owning phase
    • returns number
  • getDisplayIdentifier()

    • gets the display identifier string of the phase group
    • returns string | null
  • getFirstRoundTime()

    • get the time of the first round of the phase group as a unix epoch
    • returns number | null
  • getState()

    • get the numeric state of the the phase group
    • returns number | null
  • getWaveId()

    • get the numeric wave id of the phase group
    • returns number | null
  • getTiebreakOrder()

    • get the JSON tiebreaker order of the phase group
    • returns object | null
  • getSeeds(options: ISeed.SeedOptions)

    • gets the seeds in this phase group
    • parameters
      • options
        • SeedOptions
        • series of options for the return set of Seeds
    • returns Promise<Seed[]>
  • getEntrants(options: IEntrant.EntrantOptions)

    • gets the tournament attendees who competed in this phase group
    • parameters
      • options
    • returns Promise<Entrant[]>
  • getAttendees(options: IAttendee.AttendeeOptions)

    • gets the tournament attendees who were in this phase group
    • parameters
      • options
    • returns Promise<Attendee[]>
  • getSets(options: IGGSet.SetOptions)

    • gets the tournament sets that occurred in this phase group
    • parameters
      • options
        • SetOptions
        • series of options for the return set of GGSet
    • returns Promise<GGSet[]>
  • getCompleteSets(options: IGGSet.SetOptions)

    • get the tournament sets in this phase group that have been completed
    • parameters
      • options
        • SetOptions
        • series of options for the return set of GGSet
    • returns Promise<GGSet[]>
  • getIncompleteSets(options: IGGSet.SetOptions)

    • get the tournament sets in this phase group that have not been completed
    • parameters
      • options
        • SetOptions
        • series of options for the return set of GGSet
    • returns Promise<GGSet[]>
  • getSetsXMinutesBack(minutes: number, options: IGGSet.SetOptions)

    • get the tournament sets in this phase group that have been completed within the last x minutes
    • parameters
      • options
        • SetOptions
        • series of options for the return set of GGSet
    • returns Promise<GGSet[]>

Clone this wiki locally