Skip to content

JavierPachas/portfolio-project

Repository files navigation

API Portfolio Project

This project demonstrates API coding best practices using Python and FastAPI.

This project was built from examples in the book Hands-On APIs For API and Data Science.

SportsWorldCentral (SWC) Fantasy Football API Documentation

Thanks for using the SportsWorldCentral API. This is your one-stop shop for accessing data from our fantasy football website, www.sportsworldcentral.com.

Table of Contents

Public API

Our API is hosted at https://fantasyfootball-api-service-9n5k.onrender.com/.
You can access the interactive documentation at https://fantasyfootball-api-service-9n5k.onrender.com/docs.
You can view the OpenAPI Specification (OAS) file at https://fantasyfootball-api-service-9n5k.onrender.com/openapi.json.

Getting Started

Since all of the data is public, the SWC API doesn't require any authentication. All of the the following data is available using GET endpoints that return JSON data.

Analytics

Get information about the health of the API and counts of leagues, teams, and players.

Player

You can get a list of all NFL players, or search for an individual player by player_id.

Scoring

You can get a list of NFL player performances, including the fantasy points they scored using SWC league scoring.

Membership

Get information about all the SWC fantasy football leagues and the teams in them.

Terms of Service

By using the API, you agree to the following terms of service:

  • Usage Limits: You are allowed up to 2000 requests per day. Exceeding this limit may result in your API key being suspended.
  • No Warranty: We don't provide any warranty of the API or its operation.

Example Code

Here is some Python example code for accessing the health check endpoint:

import httpx

HEALTH_CHECK_ENDPOINT = "/"

with httpx.Client(base_url=self.swc_base_url) as client:
    response = client.get(self.HEALTH_CHECK_ENDPOINT)
    print(response.json())

Software Development Kit (SDK)

If you are a Python user, you can use the PySWC SDK to interact with our API. Full information is available here

About

Portfolio project showcasing API development best practices with Python, FastAPI, SQLAlchemy, and a custom Python SDK — based on Hands-On APIs for AI and Data Science.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors