Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Get team logos on getPlayer #626

Closed

Conversation

danilofuchs
Copy link
Contributor

@danilofuchs danilofuchs commented Jan 2, 2023

Makes the team logos available when parsing a player.

It is a lower quality version (50px) than the one in getTeam (100px).

It is also possible to add this parsing to other endpoints in the future.

Example for Spinx:

team: {
  name: 'Vitality',
  id: 9565,
  logo: 'https://img-cdn.hltv.org/teamlogo/GAlByJtDTnkgbb9p_71SUL.png?ixlib=java-2.1.0&w=50&s=2838cd78a5ebb5c9fea4c485908e9dbb'
}
teams: [
  {
    id: 9565,
    name: 'Vitality',
    logo: 'https://img-cdn.hltv.org/teamlogo/GAlByJtDTnkgbb9p_71SUL.png?ixlib=java-2.1.0&w=50&s=2838cd78a5ebb5c9fea4c485908e9dbb',
    startDate: 1660514400000,
    leaveDate: 1660514400000,
    trophies: [ [Object] ]
  },
  {
    id: 4869,
    name: 'ENCE',
    logo: 'https://img-cdn.hltv.org/teamlogo/-X8NoyWC_1gYqUHvZqcpkc.svg?ixlib=java-2.1.0&s=85bb9daa6f846fa097c5942f2565fdb8',
    startDate: 1611183600000,
    leaveDate: 1660514400000,
    trophies: []
  },
  {
    id: 10606,
    name: 'c0ntact',
    logo: 'https://img-cdn.hltv.org/teamlogo/AUDa-fSQq5HZiFR0RL9aU6.svg?ixlib=java-2.1.0&s=7981bd0f228277fa327070ca03992f08',
    startDate: 1598565600000,
    leaveDate: 1606863600000,
    trophies: []
  },
  {
    id: 10766,
    name: 'Tikitakan',
    logo: undefined,
    startDate: 1593554400000,
    leaveDate: 1596492000000,
    trophies: []
  }
]

@gigobyte gigobyte closed this Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants