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

[Request] Import teams from CSV #143

Open
Iwhite67 opened this issue Jun 1, 2022 · 3 comments
Open

[Request] Import teams from CSV #143

Iwhite67 opened this issue Jun 1, 2022 · 3 comments
Labels
request Feature request/changes to the front end to be evaluated

Comments

@Iwhite67
Copy link
Contributor

Iwhite67 commented Jun 1, 2022

Hello.

This is a feature request to have possibility to import teams from *.CSV

@PhlexPlexico PhlexPlexico added the request Feature request/changes to the front end to be evaluated label Jun 1, 2022
@PhlexPlexico
Copy link
Owner

There's still some more changes I'd like to do before getting into this, but I'll leave it as a request for now. PRs are more than welcome, since this may just require some processing on the front end to generate the API call from steam IDs and team name, flags, etc. Logos most likely won't be supported though.

@ilazim
Copy link

ilazim commented Oct 25, 2022

+1 on this request!.

I don't know if I should open a new issue for this, but an export functionality would be great too, to move team details from one instance to another.

@PhlexPlexico
Copy link
Owner

PhlexPlexico commented Oct 25, 2022

Hi,

I've been taking a bit of a break for now, so as I said PRs are definitely welcome on the import side of things. You would just need to sanitize input of the CSV, maybe provide a default CSV for users' to download, and just make sure it fits into the POST call when creating a team.

Re: to the the export. I'm very against this as this was the whole point of the API. You can get the raw data via JSON format by simply going to api/teams/myteams (https://phlex.avidgamers.me/api/teams/myteams as an example) to export all the info of the teams, minus the logo. However, the logos can also be inferred by going to the directory with the images and inputting the logo from the results (i.e. https://phlex.avidgamers.me/api/static/img/logos/4O3bD.png).

Plus, you could just write a small script that would go through each team block and create a post call with your API key to insert the teams as well then with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Feature request/changes to the front end to be evaluated
Projects
None yet
Development

No branches or pull requests

3 participants