SparkTeams

Provides access to teams for the current game.

e.g.

var team = Spark.getTeams().getTeam(myTeamId);

getTeam

signature getTeam(string teamId)

returns SparkTeam

Returns a SparkTeam object that represents the team with the given teamId.

example

var team = Spark.getTeams().getTeam(myTeamId);

getTeamByOwnerIdAndTeamType

signature getTeamByOwnerIdAndTeamType(string ownerId, string teamType)

returns SparkTeam[]

Returns an array of SparkTeam objects for the given ownerId and teamType.

example

var teams = Spark.getTeams().getTeamByOwnerIdAndTeamType(myOwnerId, myTeamType);
Did this page help you? Please enter your feedback below. For questions about using this part of the platform, please contact support here