Package Data | |
---|---|
Maintainer Username: | Maras0830 |
Maintainer Contact: | Maras0830@gmail.com (Maras Chen) |
Package Create Date: | 2016-05-06 |
Package Last Update: | 2017-10-19 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-18 03:04:01 |
Package Statistics | |
---|---|
Total Downloads: | 382 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 3 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Laravel 5, Twitch Api v3.
See official documentation Twitch restful api link
適用於 Laravel 5 的 v3 版 API (2016.05.06)
查看官方文件 Twitch restful api link
2016.05.06 - 新增 Twitch post 功能。
將 package 加入 composer.json
Require the package in composer.json :
"maras0830/laravel5-twitch-api": "dev-master"
在 ``config/app.php加入 providers In
config/app.phpadd
providers```
Maras0830\TwitchApi\Providers\ApiServiceProvider::class
In config/app.php
add aliases
'TwitchApi' => Maras0830\TwitchApi\Facades\ApiServiceFacade::class,
發行設定
Publish the config
php artisan vendor:publish --force
創建一個 twitch 的名稱於config/twitch-api.php
,並且根據 twitch 上所開的應用程式進行設定
Create a twitch application ( in your twitch settings page, Connections tab )
Create a client secret
Add both client secret, client id to the twitch-api.php config
Change the scopes that the application needs to better suit your needs
Waiting ... 待補..
Twitch api uses OAuth 2.0 protocol for authentication.
Twitch api 使用 OAuth 2.0 protocol 認證。
you need to sign up application with your domain on Twitch and you will get client_id & client_secret and can set up redirect_url.
您必須先在 Twitch 註冊一個專屬於這個域名的應用程式,接著將會得到 client_id
and client_secret
並且建立 redirect_url
。