Git Product home page Git Product logo

youtube-dashboard's Introduction

Setup

  1. Follow the PHP Quickstart guide to acquire client secret.
  2. Store client secret in a file accessible by this app.
  3. Create .env file at root folder of this app. a. Use the template below, replace values as needed.

Populating Subscriptions and Videos

# From host
docker exec [container name] php /var/www/html/src/utils/sync_videos.php

# From container
php ./src/utils/sync_videos.php

.env

ACCESS_TOKEN_FILE_PATH=./access_token.json REDIS_PASSWORD= REDIS_URL=redis REDIS_PORT=6379

Docker

This codebase has a Dockerfile and docker-compose.yml for development purposes.

Note: The PHP container will run run_dev_server.sh when it starts. This shell script installs Composer dependencies and starts PHP's built-in developer server.

Commands

docker-compose up # Spins PHP and Redis-JSON containers
docker-compose down # Tears down containers

# Opens a shell for a running container
docker exec -it [container name] bash

# Access Redis-CLI (starting from host)
docker exec -it [container name] bash
redis-cli

Add Categories

# Start redis-cli client
JSON.ARRAPPEND categories.names . '{ "id": [unique id], "title": "Name of category" }'

Dependencies

Optional

API

Response Structure

Success

{
   "status": "SUCCESS",
   "response": "",
   "error": ""
}

Failure

{
   "status": "FAIL",
   "response": "",
   "error": ""
}

Subsystems

Categorization

/api/categories is intended as a generic categorization mechanism. All it needs is an item and category.

Data Structure (Stored in Redis

)

// categories._id
int

// categories.names
[
   {
      id: int (autoincrement),
      title: string
   },
]

// categories.items
{
   mapping: [{
      categoryID: int,
      itemID: string (hash)
   }]
}

youtube-dashboard's People

Contributors

josterholt avatar

Stargazers

Roman avatar

Watchers

 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.