Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cody-scott/jje_app
Django Application for the JJE League
https://github.com/cody-scott/jje_app
Last synced: 12 days ago
JSON representation
Django Application for the JJE League
- Host: GitHub
- URL: https://github.com/cody-scott/jje_app
- Owner: cody-scott
- License: mit
- Created: 2017-04-15T14:08:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-01-09T20:23:59.000Z (almost 3 years ago)
- Last Synced: 2024-04-17T22:10:49.534Z (7 months ago)
- Language: Python
- Size: 524 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# 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': '', 'refresh': ''}
Refresh token withapi/token/refresh/
data = {"refresh": ""}#### Headers to add to requests
Use access token as a header in your request
{"Authorization": "Bearer "}
## 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//
requests.put('./waivers/api/cancel//', 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)