teams.previous_players()
Get all previous and current players with calculated status from transaction history
Signature
import vlrdevapi as vlr
result = vlr.teams.previous_players(
team_id: int,
timeout: float = 5.0
) -> list[PreviousPlayer]Parameters
Prop
Type
Return Value
Type: list[PreviousPlayer]
Returns a list of previous and current players sorted by most recent activity.
Prop
Type
Status Determination
Status is calculated from the most recent transaction with a known date:
- Active: Player has joined and has no subsequent leave/inactive action
- Left: Player has a "leave" action as their most recent status change
- Inactive: Player has an "inactive" action as their most recent status change
- Unknown: Cannot determine status from available transactions
Examples
Get Previous Players
import vlrdevapi as vlr
# Get all players
players = vlr.teams.previous_players(team_id=1034)
print(f"Total players: {len(players)}")
for player in players[:10]: # Show first 10
print(f"{player.ign} - {player.status} ({player.position})")
join_str = player.join_date.strftime('%Y/%m/%d') if player.join_date else 'Unknown'
leave_str = player.leave_date.strftime('%Y/%m/%d') if player.leave_date else 'None'
print(f" Joined: {join_str}, Left: {leave_str}")Filter by Status
import vlrdevapi as vlr
players = vlr.teams.previous_players(team_id=1034)
# Filter by status
active = [p for p in players if p.status == "Active"]
left = [p for p in players if p.status == "Left"]
inactive = [p for p in players if p.status == "Inactive"]
print(f"Active: {len(active)}")
print(f"Left: {len(left)}")
print(f"Inactive: {len(inactive)}")
# Show active players
for player in active:
print(f" {player.ign} - {player.position}")Error Handling
- Network failures: Returns an empty list
[] - Invalid team ID: Returns an empty list
[] - No transactions: Returns an empty list
[] - Players without player_id: Excluded from results
The function never raises exceptions, making it safe to use without try-catch blocks.
Related
Source
Data scraped from: https://www.vlr.gg/team/transactions/{team_id}