Benjamin-Loison/YouTube-operational-API
소개
YouTube Data API v3가 작동하지 않을 때도 YouTube operational API는 작동합니다.
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalYouTube operational API
YouTube operational API works when YouTube Data API v3 fails.
Install your own instance of the API:
If you do not own a server, then I recommend Oracle always free VPS (see https://docs.oracle.com/en-us/iaas/Content/FreeTier/freetier_topic-Always_Free_Resources.htm). Note that at account creation only some home regions, including Marseille (France), propose more powerful Ampere A1 shapes.
If not already hosting a website (click here if you prefer nginx), run in a terminal:
On Linux (Debian, Mint and Ubuntu):
sudo apt install apache2 php git
sudo a2enmod rewrite headers
Replace AllowOverride None with AllowOverride All in <Directory /var/www/> in /etc/apache2/apache2.conf.
Then run:
sudo service apache2 restart
On Windows:
Download and run WampServer 3.
On MacOS:
Install brew by following https://brew.sh#install.
On MacOS (Intel) use /usr/local/ instead of /opt/homebrew/.
brew install apache2 php
echo 'LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so
Include /opt/homebrew/etc/httpd/extra/httpd-php.conf' >> /opt/homebrew/etc/httpd/httpd.conf
echo '<IfModule php_module>
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>
</IfModule>' >> /opt/homebrew/etc/httpd/extra/httpd-php.conf
sed -i '' 's/#LoadModule rewrite_module/LoadModule rewrite_module/' /opt/homebrew/etc/httpd/httpd.conf
Replace AllowOverride None with AllowOverride All in <Directory "/opt/homebrew/var/www"> in /opt/homebrew/etc/httpd/httpd.conf.
Then run:
brew services start httpd
- Now that you are hosting a website, get the current working directory of your terminal into the folder that is online.
- On Linux, use
cd /var/www/html/ - On Windows, use
cd C:\wamp64\www\ - On MacOS, use
cd /opt/homebrew/var/www/
- Clone this repository by using:
git clone https://github.com/Benjamin-Loison/YouTube-operational-API
- Install Protobuf dependency:
On Linux (Ubuntu, Debian and Mint):
sudo apt install composer protobuf-compiler
On Windows:
Download composer.
Download protoc.
On MacOS:
brew install composer protobuf
In YouTube-operational-API/ clone folder:
composer require google/protobuf
Generate code of PHP objects from .proto prototypes:
On Linux and MacOS:
protoc --php_out=proto/php/ --proto_path=proto/prototypes/ $(find proto/prototypes/ -type f)
On Windows:
for /f "usebackq tokens=*" %a in (`dir /S /B "proto/prototypes"`) do protoc --php_out=proto/php/ --proto_path=proto/prototypes/ %a
- Verify that your API instance is reachable by trying to access:
- On Linux and Windows: http://localhost/YouTube-operational-API/
- On MacOS: http://localhost:8080/YouTube-operational-API/
If you want me to advertise your instance (if you have opened your port, and have a fixed IP address or a domain name), please use below contacts.
Run the API with Docker
Install Docker and make sure that its daemon is running.
Create a
.envfile and update it with your preferred port:
cp .env.sample .env
- Start the container with
docker-compose:
# start in the foreground
docker-compose up
# start in the background
docker-compose up -d
- Verify that your API instance is reachable by trying to access:
- http://localhost:8080 (update preferred port if not 8080)
Contact:
Contributing:
See CONTRIBUTING.md.
관련 프로젝트 살펴보기
불러오는 중…