artemio/hypem

此包已被弃用且不再维护。未建议替代包。

hypem.com 公共API的包装器

dev-master 2017-07-07 17:09 UTC

This package is not auto-updated.

Last update: 2020-01-20 03:56:22 UTC


README

Build Status

hypem.com 公共API的PHP包装器

Composer

$ composer require artemio/hypem

快速入门和示例

require '../vendor/autoload.php';

use \Hypem\Playlist as Playlist;
use \Hypem\Track as Track;
use \Hypem\User as User;

// available Playlist static methods
$latest  = Playlist::latest('noremix')->get();
$popular = Playlist::popular()->get(3); // provide page number
$artist  = Playlist::artist('Placebo')->get();
$blog    = Playlist::blog(16746)->get(); // "Cruel Rythm" blog_id
$tags    = Playlist::tags('electro house')->get();
$search  = Playlist::search('Woodkid Iron')->get();

// get track by id
$track = new Track('264xq');

// get tracks of specific user
$user            = new User('username');
$feed            = $user->feed();
$favorites       = $user->favorites(5); // provide page number
$history         = $user->history();
$obsessed        = $user->obsessed();
$friendFavorites = $user->friendFavorites();
$friendObsessed  = $user->friendObsessed(2);

最新播放列表的可用过滤器

  • all(默认)
  • 新鲜
  • 混音
  • 无混音

热门播放列表的可用过滤器

  • now(默认)
  • 上周
  • 混音
  • 无混音
  • 艺术家
  • 推特