Giter Site home page Giter Site logo

imamachi-n / virtual-youtuber-api Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 1.0 1.56 MB

Virtual Youtuber (VTuber) API: The data collection of 700+ Virtual TouTuber channels

Home Page: https://imamachi-n.github.io/Virtual-Youtuber-API/

License: MIT License

JavaScript 92.79% HTML 5.21% CSS 2.00%
nodejs expressjs knexjs rest-api react vtuber code-chrysalis postgresql

virtual-youtuber-api's Introduction

Virtual YouTuber REST API

This was created during my time as a student at Code Chrysalis.

Virtual YouTuber (VTuber) API is the data collection of 700+ Virtual YouTuber channels. The raw data was gotten from YouTube Data API v3 and then extracted the basic data for only Virtual TouTubers.

Architecture

architecture

Setup environment

1. PostgreSQL Database

You will need postgres installed. If you haven't installed it already, download and install the PostgresApp and verify its working by running the command psql in your terminal.

Create a database for this project by running:

echo "CREATE DATABASE vtuber_api TEMPLATE template0 ENCODING 'UTF-8' LC_COLLATE 'ja_JP.UTF-8' LC_CTYPE 'ja_JP.UTF-8';" | psql

Migrations

cd Server
yarn run migrate

Seeds

cd Server
yarn run seed

2. Starting REST API server

cd Server
yarn dev

3. Starting Front-end server

cd Client/react-client
yarn start

How to use API

1. Get the list of all Virtual YouTuber channels

Method URI
GET /api/channels

Example

[
    {
    "id": 1099,
    "channel_title_jp": "フブキCh。白上フブキ",
    "channel_title_en": "Shirakami Fubuki",
    "channel_id": "UCdn5BQ06XqgXoAxIhbqw5Rg",
    "channel_url": "https://youtube.com/channel/UCdn5BQ06XqgXoAxIhbqw5Rg",
    "thumbnail":
    "https://yt3.ggpht.com/a/AGF-l7-oeSvjxgdwMoDyT1LMH8nyqkWJCZH8MAOjzg=s800-c-k-c0xffffffff-no-rj-mo",
    "view_count": 18967436,
    "subscriber_count": 227000,
    "video_count": 429
    },
    ...
]

2. Post a new Virtual YouTuber channel to API

Method URI
POST /api/channels/:channelId

Example

{
  "channel_title_jp": "TEST YouTuber",
  "channel_title_en": "TEST YouTuber (English)",
  "channel_id": "XXXXXXXXXXXXXXXXXXXXXXXX",
  "thumbnail": "https://XYZ.com/xxxyyyzzz.png"
}

3. Modify a given Virtual YouTuber channel

Method URI
PATCH /api/channels/:channelId

Example

{
  "channel_title_jp": "MOD YouTuber",
  "channel_title_en": "MOD YouTuber (English)",
  "channel_id": "MOD_XYZ",
  "thumbnail": "https://MOD.com/xxxyyyzzz.png"
}

4. Delete a given Virtual YouTuber channel from API

Method URI
DELETE /api/channels/:channelId

DEMO: Front-end App

1. Get the list of all Virtual YouTuber channels

reactAppDemo1

2. Post a new Virtual YouTuber channel to API

reactAppDemo2

license

Copyright (c) 2019- Naoto Imamachi licensed under the MIT license.

virtual-youtuber-api's People

Contributors

imamachi-n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

assassindesign

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.