Skip to content

Instantly share code, notes, and snippets.

View coffeejay's full-sized avatar
🤡
clowning around

Jay Deuskar coffeejay

🤡
clowning around
View GitHub Profile
NBA Roster Project
This project provides an opportunity to showcase your coding and web design skills for the PrizePicks team. You will build a web interface utilizing React & Redux that displays all NBA teams and their respective players in a roster format including player's names, position and any additional stats available through the provied API. Creative display of the player & team information is encouraged.
It's preferable to use Git for managing your project source code and the final deliverable can be provided via an archived email attachment or via a Github/Gitlab repository. Time commitment for this project is not restricted, although we estimate a time investment of around 2 hours.
https://www.balldontlie.io/
Is a fully open API hosted by a 3rd party that will provide endpoints for fetching NBA teams, players and their stats. Full documentation is provided on the site.
window.gidxServiceStatus = function (service, action, json) {
for (var i = 0; i < json.length; i++) {
for (var key in json[i]) {
if (json[i].hasOwnProperty(key)) {
//Here you can look at the key and value to make decisions on what you would
//like to do with the client side interface.
var sItem = key;
var sValue = json[i][key];
console.log(sItem +": ", sValue);
{
"body": "{\n\t\"error\":\t{\n\t\t\"event\":\t\"auto-tracked events are ignored\"\n\t}\n}\n",
"headers": {
"access-control-allow-origin": "*",
"connection": "close",
"content-length": "64",
"content-type": "application/json",
"date": "Wed, 29 May 2019 18:00:17 GMT",
"server": "openresty/1.13.6.2",
"via": "1.1 0cf6c59c77f0fff670ae085179adc459.cloudfront.net (CloudFront)",
json = response.parsed_response
matchup = json.select { |s| s["Week"] == week.to_s && (s["team_1_name"] == @player.team || s["team_2_name"] == @player.team) }
matchup.each { |h| h.each { |k,v| game_ids << v if v && /game_\d_id/ =~ k } }
is_final = matchup.length > 0 && matchup.first["winning_team_id"].present?
/*!
* Webflow: Front-end site library
* @license MIT
* Inline scripts may access the api using an async handler:
* var Webflow = Webflow || [];
* Webflow.push(readyFunction);
*/!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=133)}([function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(51)("wks"),i=n(31),o=n(4).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(100),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){t.exports=funct
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS and IE text size adjust after device orientation change,
* without disabling user zoom.
*/
html {
font-family: sans-serif;
/* 1 */
-ms-text-size-adjust: 100%;
class SoccerPlayers
SOCCER_PLAYERS = [
{ id: 90026231, name: "Junior Stanislas", },
{ id: 90026232, name: "Dan Gosling", },
{ id: 90026234, name: "Adam Smith", },
{ id: 90026236, name: "Marc Pugh", },
{ id: 90026238, name: "Simon Francis", },
{ id: 90026239, name: "Charlie Daniels", },
{ id: 90026241, name: "Callum Wilson", },
{ id: 90026243, name: "Steve Cook", },
class NhlPlayers
NHL_PLAYERS = [
{ id: 30000007, name: "Carey Price" },
{ id: 30000008, name: "Jonathan Bernier" },
{ id: 30000009, name: "Nathan Beaulieu" },
{ id: 30000012, name: "Lars Eller" },
{ id: 30000014, name: "Alex Galchenyuk" },
{ id: 30000015, name: "Brendan Gallagher" },
{ id: 30000019, name: "Max Pacioretty" },
{ id: 30000021, name: "Tomas Plekanec" },
class MlbPlayers
MLB_PLAYERS = [
{ id: 10000001, position: "SP", name: "Chase Anderson", },
{ id: 10000002, position: "SP", name: "Bronson Arroyo", },
{ id: 10000004, position: "SP", name: "Trevor Cahill", },
{ id: 10000005, position: "RP", name: "Andrew Chafin", },
{ id: 10000006, position: "RP", name: "Josh Collmenter", },
{ id: 10000007, position: "SP", name: "Patrick Corbin", },
{ id: 10000008, position: "RP", name: "Rubby De La Rosa", },
{ id: 10000009, position: "RP", name: "Randall Delgado", },
class NbaPlayers
NBA_PLAYERS = [
{ id: 20000439, name: "Nene Hilario" },
{ id: 20000440, name: "Marcin Gortat" },
{ id: 20000441, name: "Bradley Beal" },
{ id: 20000442, name: "John Wall" },
{ id: 20000443, name: "Otto Porter" },
{ id: 20000452, name: "Garrett Temple" },
{ id: 20000453, name: "Terrence Ross" },
{ id: 20000455, name: "Jonas Valanciunas" },