- You are asked to build an API for a photo app.
- You need to create the routes according to REST for the following actions:
-
The end-user wants to see a list of photos
-
The end-user wants to see a particular photo
| # | |
| # This Python script makes a summary of a football game by cutting | |
| # the video around the 10 % loudest moments, which generally | |
| # include the goals and other important events. | |
| # For more details, see this blog post: | |
| # http://zulko.github.io/blog/2014/07/04/automatic-soccer-highlights-compilations-with-python/ | |
| # | |
| # LICENCE: Creative Commons 0 - Public Domain | |
| # I, the author of this script, wave any rights and place this work in the public domain. | |
| # |
| import React from 'react'; | |
| import Tabs from '@material-ui/core/Tabs' | |
| import Tab from '@material-ui/core/Tab' | |
| import Typography from '@material-ui/core/Typography' | |
| import { withStyles } from '@material-ui/core/withStyles'; | |
| class ProfileTabs extends React.PureComponent { | |
| state = { activeIndex: 0 } |
| const createKeyPath = function (currentKeyPath, key) { | |
| return currentKeyPath + (currentKeyPath ? '.' : '') + key; | |
| }; | |
| function recursiveObjectKeysPaths(obj, path = '') { | |
| if (!obj || typeof obj == 'string') return; | |
| let keys = []; | |
| let currentPath; | |
| if (Array.isArray(obj)) { |