changed keyword order
This commit is contained in:
parent
e43580f3f9
commit
19a2066fc2
15 changed files with 41 additions and 40 deletions
|
|
@ -6,7 +6,7 @@ use App\Helpers\Wrappers;
|
|||
use App\Models\DiscoverTemplate;
|
||||
|
||||
class DiscoverController {
|
||||
static public function get() {
|
||||
public static function get() {
|
||||
$api = Wrappers::api();
|
||||
$data = $api->discover();
|
||||
if ($data->meta->success) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use App\Helpers\Wrappers;
|
|||
use App\Models\VideoTemplate;
|
||||
|
||||
class EmbedController {
|
||||
static public function v2(int $id) {
|
||||
public static function v2(int $id) {
|
||||
$api = Wrappers::api();
|
||||
$video = $api->video($id);
|
||||
$video->feed();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use App\Helpers\Wrappers;
|
|||
use App\Models\FullTemplate;
|
||||
|
||||
class MusicController {
|
||||
static public function get(string $music_id) {
|
||||
public static function get(string $music_id) {
|
||||
$cursor = Misc::getCursor();
|
||||
|
||||
$api = Wrappers::api();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class ProxyController {
|
|||
"tiktokcdn.com", "tiktokcdn-us.com", "tiktok.com"
|
||||
];
|
||||
|
||||
static public function stream() {
|
||||
public static function stream() {
|
||||
self::checkUrl();
|
||||
$url = $_GET['url'];
|
||||
$config['user_agent'] = Misc::env("USER_AGENT", TikScraperUserAgents::DEFAULT);
|
||||
|
|
@ -18,7 +18,7 @@ class ProxyController {
|
|||
$streamer->url($url);
|
||||
}
|
||||
|
||||
static public function download() {
|
||||
public static function download() {
|
||||
self::checkUrl();
|
||||
$method = Cookies::downloader();
|
||||
$downloader = new \TikScraper\Download($method);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use App\Helpers\UrlBuilder;
|
|||
* Used to be compatible with HTML forms
|
||||
*/
|
||||
class RedirectController {
|
||||
static public function search() {
|
||||
public static function search() {
|
||||
$endpoint = '/';
|
||||
if (isset($_GET['type'], $_GET['term'])) {
|
||||
$term = trim($_GET['term']);
|
||||
|
|
@ -49,7 +49,7 @@ class RedirectController {
|
|||
header("Location: {$url}");
|
||||
}
|
||||
|
||||
static public function download() {
|
||||
public static function download() {
|
||||
if (!(isset($_GET['videoId'], $_GET['authorUsername'], $_GET['playAddr']))) {
|
||||
ErrorHandler::showText(400, 'Request incomplete');
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ use App\Helpers\Wrappers;
|
|||
use App\Models\SettingsTemplate;
|
||||
|
||||
class SettingsController {
|
||||
static public function index() {
|
||||
public static function index() {
|
||||
Wrappers::latte('settings', new SettingsTemplate());
|
||||
}
|
||||
|
||||
static public function general() {
|
||||
public static function general() {
|
||||
if (isset($_POST['theme'])) {
|
||||
$theme = $_POST['theme'];
|
||||
Cookies::set('theme', $theme);
|
||||
|
|
@ -19,7 +19,7 @@ class SettingsController {
|
|||
self::redirect();
|
||||
}
|
||||
|
||||
static public function api() {
|
||||
public static function api() {
|
||||
// TODO, ADD COUNT
|
||||
if (isset($_POST['api-test_endpoints'])) {
|
||||
$test_endpoints = $_POST['api-test_endpoints'];
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use App\Models\FullTemplate;
|
|||
use App\Models\RSSTemplate;
|
||||
|
||||
class TagController {
|
||||
static public function get(string $name) {
|
||||
public static function get(string $name) {
|
||||
$cursor = Misc::getCursor();
|
||||
$api = Wrappers::api();
|
||||
$hashtag = $api->hashtag($name);
|
||||
|
|
@ -23,7 +23,7 @@ class TagController {
|
|||
}
|
||||
}
|
||||
|
||||
static public function rss(string $name) {
|
||||
public static function rss(string $name) {
|
||||
$api = Wrappers::api();
|
||||
$hashtag = $api->hashtag($name);
|
||||
$hashtag->feed();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use App\Helpers\Wrappers;
|
|||
use App\Models\RSSTemplate;
|
||||
|
||||
class TrendingController {
|
||||
static public function get() {
|
||||
public static function get() {
|
||||
$api = Wrappers::api();
|
||||
$cursor = Misc::getTtwid();
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ class TrendingController {
|
|||
}
|
||||
}
|
||||
|
||||
static public function rss() {
|
||||
public static function rss() {
|
||||
$api = Wrappers::api();
|
||||
$trending = $api->trending();
|
||||
$trending->feed();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use App\Models\RSSTemplate;
|
|||
use App\Models\VideoTemplate;
|
||||
|
||||
class UserController {
|
||||
static public function get(string $username) {
|
||||
public static function get(string $username) {
|
||||
$cursor = Misc::getCursor();
|
||||
$api = Wrappers::api();
|
||||
$user = $api->user($username);
|
||||
|
|
@ -24,7 +24,7 @@ class UserController {
|
|||
}
|
||||
}
|
||||
|
||||
static public function video(string $username, string $video_id) {
|
||||
public static function video(string $username, string $video_id) {
|
||||
$api = Wrappers::api();
|
||||
$video = $api->video($video_id);
|
||||
$video->feed();
|
||||
|
|
@ -37,7 +37,7 @@ class UserController {
|
|||
}
|
||||
}
|
||||
|
||||
static public function rss(string $username) {
|
||||
public static function rss(string $username) {
|
||||
$api = Wrappers::api();
|
||||
$user = $api->user($username);
|
||||
$user->feed();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace App\Controllers;
|
||||
|
||||
class VideoController {
|
||||
static public function get(string $video_id) {
|
||||
public static function get(string $video_id) {
|
||||
UserController::video('placeholder', $video_id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue