Teams #

Read more about the Teams system in Hiro here.

Create a team #

Create a team which other players can join.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var request = Hiro.TeamCreateRequest.new()
request.name = "Example team"
request.desc = "Example description"
request.open = true
request.icon = "icon.png"
request.lang_tag = "en"
request.setup_metadata = ""

var team = await hiro.teamsCreate(session, request)
print(team)

List one or more teams #

List one or more teams which the player can join.

1
2
3
4
5
6
7
var request = Hiro.TeamListRequest.new()
request.cursor = ""
request.location = "UK"
request.limit = 100

var team_list = await hiro.teamsList(session, request)
print(team_list)

Search for a team #

Search for a team by name or optional short code.

1
2
3
4
5
6
var request = Hiro.TeamSearchRequest.new()
request.input = "heroes"
request.limit = 100

var team_list = await hiro.teamSearch(session, request)
print(team_list)

Send team chat message #

Write a chat message to the Team’s chat channel.

1
2
3
4
5
6
7
## Send team chat message
var request = Hiro.TeamWriteChatMessageRequest.new()
request.id = "team_1"
request.content = "{\"message\":\"Hey everyone!\"}"

var channel_message_ack = await hiro.teamsWriteChatMessage(session, request)
print(channel_message_ack)