fetchTribe
Retrieves a tribe from Sentinel’s database.
Signatures
beacon.fetchTribe(tribeId);
Parameters
tribeId
The Sentinel UUID of the desired tribe.
Return Values
Type | Notes |
---|---|
Object | If the tribe was found, returns an object conforming to the Tribe class. Returns null if not found, which is rare, but possible. |
Examples
Fetch a the tribe for a survivor
let tribe;
if (beacon.eventData.tribeId) {
tribe = beacon.fetchTribe(beacon.eventData.tribeId);
} else {
const character = beacon.fetchCharacter(beacon.eventData.characterId);
tribe = beacon.fetchTribe(character.tribeId);
}