Giter Club home page Giter Club logo

redditnba_api's Introduction

REST API for reddit submissions from the NBA community

https://reddit-nba-sub-api.herokuapp.com

Description

This RESTFUL API returns reddit submissions JSON data including title, timestamp, submission url and a unit of measure used to determine the significance of the submission.

The database of these submissions deemed significant were generated by a process that looked at all NBA reddit submissions from within all 31 communities. The submissions were selected by a process that identified spikes in submission activity and then extracted the highest rated submission in that time frame.

The code that identified and generated these submissions is here.

The API offers the following GET methods to retrieve specific data from the postgresql db.

*Returns significant submissions during the 2015 regular season for the Los Angeles Lakers subreddit community.

All submissions for particular season year and subseason and subreddit:- /sigsubs/<year>-<sub_season>&<subreddit>

e.g :- https://reddit-nba-sub-api.herokuapp.com/sigsubs/2015-reg_season&LAL

*Returns significant submissions during the whole 2015 NBA season (including playoffs, offseason and regular season) for the Los Angeles Lakers subreddit community.

All submissions for a particular season year and subreddit:- /sigsubs_yrteam/<year>&<subreddit>

e.g :- https://reddit-nba-sub-api.herokuapp.com/sigsubs_yrteam/2015&LAL

  • Returns all significant submissions across all years for the Los Angeles Lakers subreddit community.

All submissions for particular subreddit across all years:- /sigsubs_sub/<subreddit>

e.g :- https://reddit-nba-sub-api.herokuapp.com/sigsubs_sub/LAL

  • Returns significant submissions from offseasons across all NBA seasons for the Los Angeles Lakers subreddit community.

All submissions across all years for partiulcar subseason and subreddit:- /sigsubs_seasonsub/<sub_season>&<subreddit>

e.g :- https://reddit-nba-sub-api.herokuapp.com/sigsubs_seasonsub/offseason&LAL

  • There is additionally a POST method available to update the database with new submission data if needed.

endpoint : /submission/<unique_reddit_submission_id>

reuquired header: {
	"yearseason_id":,
	"subreddit_id":,
	"submission_title":"",
	"timestamp":"",
	"std_measure":,
	"submission_url": ""
	}

*Finally there is DELETE method available to delete a submission by its unique reddit submission id.

endpoint: /submission/<unique_reddit_submission_id>

Implementation

This project was implemented with:

Flask
Postgresql
sqlalchemy
Nginx
uwsgi

The API is on a server running Ubuntu 16.04 through Digital Ocean.
Python 3.5.2

redditnba_api's People

Contributors

nabeel-h avatar

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.