2021-03-08 18:45:06 +00:00
|
|
|
<?php
|
|
|
|
$data = json_decode(file_get_contents("php://input"));
|
2021-09-21 10:40:54 +00:00
|
|
|
|
|
|
|
$path = "../config/config.json";
|
|
|
|
if(!file_exists($path)) {
|
|
|
|
fopen($path, "w");
|
|
|
|
}
|
2021-03-08 18:45:06 +00:00
|
|
|
$config = json_decode(file_get_contents("../config/config.json"));
|
|
|
|
|
|
|
|
if (empty($config)) {
|
2021-03-13 22:40:46 +00:00
|
|
|
echo json_encode(array("message" => "Plex Wrapped is not configured.", "error" => true));
|
2021-03-08 18:45:06 +00:00
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
$functions = array("get_user_movie_stats" => $config->get_user_movie_stats,
|
|
|
|
"get_user_show_stats" => $config->get_user_show_stats,
|
|
|
|
"get_user_show_buddy" => $config->get_user_show_buddy,
|
|
|
|
"get_year_stats" => $config->get_year_stats
|
|
|
|
);
|
|
|
|
echo json_encode($functions);
|
|
|
|
exit(0);
|
|
|
|
?>
|