Giter Club home page Giter Club logo

jje_app's Introduction

JJE App

Application for the JJE Fantasy league

Handles waiver claims, standings emails and logic

See new_season.md for notes on how to setup a new season

API

Token access

Request token with

api/token/

data = {"username": "", "password"}

returns "access" and "refresh" token
{'access': '<TOKEN>', 'refresh': '<TOKEN>'}

Refresh token with

api/token/refresh/

data = {"refresh": "<refresh token>"}

Headers to add to requests

Use access token as a header in your request

{"Authorization": "Bearer <ACCESS_TOKEN>"}

Waiver claim api

team ID info

/api/teams

For only your teams
params={
    'user_teams': 1
}
requests.get('./api/teams', params=params, headers=headers)

Active Claim info

waivers/api/active_claims/

Submitting claims

New claims should be sent as POST Cancel claims should be sent as PUT


Create New claim

/waivers/api/new/
data = {
    "yahoo_team": 9,
    "add_player": "testadd",
    "add_IR": True,
    "drop_player": "testdrop",
    "drop_D": True,
}

requests.post('./waivers/api/new/', headers=headers, data=data)

Overclaim

/waivers/api/overclaim/
data = {
    "yahoo_team": 9,
    "over_claim_id": 36,
    "drop_player": "testdrop",
    "drop_D": True,
}
requests.post('./waivers/api/overclaim/', headers=headers, data=data)

Cancel

supply cancellation ID in the url

/waivers/api/cancel/<ID>/
requests.put('./waivers/api/cancel/<ID>/', headers=headers)

Yahoo Player Data

Individual Player Stats

/oauth/api/getplayer/

data {
    'player_id': 6381,
}
requests.get("./oauth/api/getplayer/", headers=headers, params=data)

Collection of Player Stats

/oauth/api/players/

full list of parameters

https://developer.yahoo.com/fantasysports/guide/#players-collection

/oauth/api/searchplayers/
data {
    'status': "FA",
    "position": "C",
    "sort_type": "lastweek",
    "sort": "AR",
}
requests.get("./oauth/api/searchplayers/", headers=headers, params=data)

jje_app's People

Contributors

cody-scott avatar

Watchers

 avatar  avatar

jje_app's Issues

Standings

problem with gap in standings.

Change standings so they pull the specific week and fill the gaps with nothing in the missing weeks

Update standings

Sometimes double fires to update the standings on the website. Setup something to prevent this

BCC Email

Update all emails to send using BCC and not in the "To" field

API Logic

Build Log for API functions of creating and removing a waiver claim

Logging

Build lots of log messages into the app

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.