Skip to content

Conversation

@dmbf29
Copy link
Owner

@dmbf29 dmbf29 commented Jun 6, 2024

The goal was to add both Euros and Copa America but the new Data-Football API only has the Euros.

I suggest each person create a free account so that you can get your own API Key

FOOTBALL_DATA_TOKEN=******

I created a rake task to setup the tournament

rails euros:create

this will create the teams (with flag upload), groups, rounds, matches, leaderboards, and memberships

@dmbf29 dmbf29 added the enhancement New feature or request label Jun 6, 2024
@dmbf29 dmbf29 requested review from Netsujr, caiosantosss and trouni June 6, 2024 07:19
@dmbf29 dmbf29 self-assigned this Jun 6, 2024
@dmbf29
Copy link
Owner Author

dmbf29 commented Jun 6, 2024

Also, just added the API key to Heroku

Copy link
Collaborator

@caiosantosss caiosantosss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me.

Copy link
Collaborator

@trouni trouni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't take a super deep dive, but it looks good to me!
Setup worked well on my computer as well 👍

Comment on lines +98 to +102
doug = User.find_by(email: 'douglasmberkley@gmail.com') || User.create(email: 'douglasmberkley@gmail.com', password: ENV['ADMIN_PASSWORD'], admin: true)
trouni = User.find_by(email: 'trouni@gmail.com') || User.create(email: 'trouni@gmail.com', password: ENV['ADMIN_PASSWORD'], admin: true)
james = User.find_by(email: 'devereuxjj@gmail.com') || User.create(email: 'devereuxjj@gmail.com', password: ENV['ADMIN_PASSWORD'], admin: true)
renato = User.find_by(email: 'renatonato_jr@hotmail.com') || User.create(email: 'renatonato_jr@hotmail.com', password: ENV['ADMIN_PASSWORD'], admin: true)
caio = User.find_by(email: 'caio.santos@msn.com') || User.create(email: 'caio.santos@msn.com', password: ENV['ADMIN_PASSWORD'], admin: true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably did that before, but I guess it's not ideal to commit real emails on a public repo.

Don't think we've been using the Rails credentials for this repo, but we should probably start.

In any case, no need to fix this right away 👍

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha yeah. i just copied what we had in the seeds but see what you mean

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could move them to the .env file maybe

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the problem is that these are in the git commit history, so moving them to env or credentials now wouldn't fully resolve the issue. I'll create a separate issue.

@dmbf29 dmbf29 merged commit 388b72c into main Jun 10, 2024
@dmbf29 dmbf29 deleted the new-competitions branch June 10, 2024 06:33
yannklein pushed a commit to yannklein/predictor-api that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants