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

added getWeeklySchedule(week, year, seasonType) to NFL service #20

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

unmonk
Copy link
Contributor

@unmonk unmonk commented Jul 20, 2023

My brother asked for a pickem league, the current nfl.getSchedule fetches by year, month, day. Which could work, but wasnt the easiest solution for me.

getWeeklySchedule(week, year, seasonType) is just utilizing some different params on that same cdn http://cdn.espn.com/core/nfl/schedule/_/week/${week}/year/${year}/seasontype/${seasonType}`;

Defaults to 1st week of regular season, of current year, if no parameters are provided.

Related tests created.
Ran md-nfl and readme

@unmonk unmonk added the enhancement New feature or request label Jul 20, 2023
@unmonk unmonk requested a review from saiemgilani July 20, 2023 19:49
@vercel
Copy link

vercel bot commented Jul 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sportsdataverse-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 20, 2023 8:07pm

@unmonk unmonk changed the title added getWeeklySchedule(week, year, seasonType) added getWeeklySchedule(week, year, seasonType) to NFL service Jul 20, 2023
@saiemgilani
Copy link
Collaborator

Sounds good. And this is no problem, but whatever nfl schedule function was there could've also just accepted date=year and a week parameter. Merge as you want, make the version/changelog updates, then run the publish action

@unmonk
Copy link
Contributor Author

unmonk commented Jul 20, 2023

Hmm that could be a possibility as well.

I'm actually looking at doing a typescript fork soon, which I am hoping to overhaul how params are handled.

How are you handling the version bump? I dont think I see it as part of the publish workflow.

Looks like just a manual bump and commit.

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.

2 participants