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

Fixed test_fanduel.py 'list index out of range' and added function call at bottom for the noobies #62

Open
ryanstoic opened this issue Nov 12, 2023 · 1 comment

Comments

@ryanstoic
Copy link

ryanstoic commented Nov 12, 2023

import southpaw

def test_get_upcoming():
basic_auth_token = 'look up basic_auth_token'
x_auth_token = 'look up long ass x_auth_token'
fanduel_email = 'put in your email'

fanduel_password = 'put in your pw'

fd = southpaw.Fanduel(fanduel_email, fanduel_password, basic_auth_token, x_auth_token)

print(fd.get_upcoming())

entries = fd.get_entries()
print(entries)
if entries:
    print(fd.get_entry(entries[0].id))

rosters = fd.get_rosters()
print(rosters)
if rosters:
    print(fd.get_roster(rosters[0].id))

contests = fd.get_contests()
print(contests)
if contests:
    print(fd.get_contest(contests[0].id))

fixtures = fd.get_fixtures()
print(fixtures)
if fixtures:
    print(fd.get_fixture(fixtures[0].id))

fixture_lists = fd.get_fixture_lists()
print(fixture_lists)
if fixture_lists:
    print(fd.get_fixture_list(fixture_lists[0].id))

game_descriptions = fd.get_game_descriptions()
print(game_descriptions)
if game_descriptions:
    print(fd.get_game_description(game_descriptions[0].id))

player_lists = fd.get_player_lists()
print(player_lists)
if player_lists:
    print(fd.get_player_list(player_lists[0].id))

if entries:
    print(fd.get_players_in_entry(entries[0].id))
    print(fd.get_roster_format_in_entry(entries[0].id))

test_get_upcoming()

@ryanstoic ryanstoic changed the title Fixed test_fanduel.py list index out of range and added function call at bottom for the noobies Fixed test_fanduel.py 'list index out of range' and added function call at bottom for the noobies Nov 12, 2023
@bcanfield
Copy link
Owner

Make a PR and I will review! Thanks

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

No branches or pull requests

2 participants