This is the README file for the Fancy Twitter API, which provides access to various endpoints to retrieve information about organizations, leagues, teams, players, and tweets related to them.
GET /organizations/all
Lists all the organizations (leagues).
GET /organizations
Lists organizations (leagues) filtered by name.
Parameters:
name
(optional): Filters organizations by name.GET /leagues/all
Lists all the leagues.
GET /leagues
Lists leagues filtered by name.
Parameters:
name
(optional): Filters leagues by name.GET /team/all
Lists all the teams in all the leagues, along with their Twitter handles and web pages.
GET /team
Lists teams filtered by name or organization (league).
Parameters:
name
(optional): Filters teams by name.organization
(optional): Filters teams by organization (league).league
(optional): Filters teams by league.GET /players/all
Lists all the players in all the leagues.
GET /players
Lists players filtered by name, team, or Twitter handle.
Parameters:
name
(optional): Filters players by name.team
(optional): Filters players by team.handle
(optional): Filters players by Twitter handle.GET /tweets/all
Lists all the tweets in the database.
GET /tweets
Lists tweets filtered by handle, tweet ID, teams, and ordered by various criteria.
Parameters:
handle
(optional): Filters tweets by Twitter handle.id
(optional): Filters tweets by tweet ID.team
(optional): Filters tweets by team.order_by
(optional): Orders tweets by like_count
, quote_count
, reply_count
, retweet_count
, tweetid
, sentiment_score
, or subjectivity_score
.GET /organizations/tweets
Lists all the tweets from the organization (league) offices.
GET /leagues/tweets
Lists all the tweets from the league offices.
GET /team/tweets
Lists all the tweets from the team front offices.
GET /tweets/sentiment/team/average
Lists the top ten teams sorted by average sentiment.
GET /tweets/negativesentiment/team/average
Lists the top ten teams sorted by average negative sentiment.
GET /tweets/subjectivity/team/average
Lists the top ten teams sorted by average subjectivity.
GET /tweets/objectivity/team/average
Lists the top ten teams sorted by average objectivity.
GET /tweets/sentiment
Lists tweets with sentiment information filtered by team.
Parameters:
team
(optional): Filters tweets by team.GET /tweets/subjectivity
Lists tweets with subject
ivity information filtered by team.
Parameters:
team
(optional): Filters tweets by team.name
: The name of an organization, league, team, player, or a Twitter handle.id
: The unique identifier of a tweet.team
: The name of a team.order_by
query parameter.Retrieve all organizations (leagues):
GET /organizations/all
Filter organizations by name:
GET /organizations?name="NHL"
Retrieve all teams:
GET /team/all
Filter teams by name:
GET /team?name='Washington Capitals'
Filter teams by organization (league):
GET /team?organization="NHL"
Retrieve all players:
GET /players/all
Filter players by name:
GET /players?name='Alex Ovechkin'
Filter players by team:
GET /players?team='Washington Capitals'
Filter players by Twitter handle:
GET /players?handle='ovi8'
Retrieve all tweets:
GET /tweets/all
Filter tweets by handle:
GET /tweets?handle='troystecher'&order_by='sentiment_classification'
Filter tweets by tweet ID:
GET /tweets?id=1657934386036371456
Filter tweets by team:
GET /tweets?team='Dallas Stars'
Filter tweets by tweet ID and handle:
GET /tweets?id=1657934386036371456&handle="troystecher"
Retrieve all tweets from the organization (league) offices:
GET /organizations/tweets?name='NFL'
Retrieve all tweets from the league offices:
GET /leagues/tweets
Retrieve all tweets from the team front offices:
GET /team/tweets
Retrieve the top ten teams sorted by average sentiment:
GET /tweets/sentiment/team/average
Retrieve the top ten teams sorted by average negative sentiment:
GET /tweets/negativesentiment/team/average
Retrieve the top ten teams sorted by average subjectivity:
GET /tweets/subjectivity/team/average
Retrieve the top ten teams sorted by average objectivity:
GET /tweets/objectivity/team/average
Retrieve tweets with sentiment information filtered by team:
GET /tweets/sentiment?team="Toronto Maple Leafs"
Retrieve tweets with subjectivity information filtered by team:
GET /tweets/subjectivity?team="Ottawa Senators"
Please note that you need to replace the base URL in the above examples with the actual API endpoint URL you are using.