本文整理汇总了PHP中Playlist::AddPlaylist方法的典型用法代码示例。如果您正苦于以下问题:PHP Playlist::AddPlaylist方法的具体用法?PHP Playlist::AddPlaylist怎么用?PHP Playlist::AddPlaylist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist::AddPlaylist方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Playlist
/**
* Created by PhpStorm.
* User: idz
* Date: 4/6/15
* Time: 12:19 AM
*/
require_once 'classes/playlist.php';
// session_start();
$playlist = new Playlist();
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
if (property_exists($request, "playlistName") && property_exists($request, "athTokenPl")) {
$playlistName = $request->playlistName;
$encrypted_user_id = $request->athTokenPl;
$return_code = $playlist->AddPlaylist($playlistName, $encrypted_user_id);
if ($return_code == 1) {
echo "Playlist added successfully";
} else {
if ($return_code == 2) {
echo "Something went wrong in database";
} else {
echo "Something's wrong";
}
}
}
if (property_exists($request, "athTokenPlModel")) {
$encrypted_user_id = $request->athTokenPlModel;
$playlist_object = $playlist->GetPlaylists($encrypted_user_id);
echo json_encode($playlist_object);
}