Spotify 0.2.1

Spotify 0.2.1

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最新发布2017年3月
SwiftSwift版本3.0
SPM支持SPM

Miklos Kristyan维护。



Spotify 0.2.1

  • 作者
  • Kristyán Miklós

Spotify

适用于控制macOS上Spotify的Spotify包装类。

此包装类最初是为SpotMenu创建的。

安装

要使用CocoaPods将Spotify集成到您的Xcode项目中,请在您的Podfile中指定它

platform :osx, '10.10'
use_frameworks!

target '<Your Target Name>' do
    pod 'Spotify', '~> 0.1'
end

然后,运行以下命令

$ pod install

使用示例

import Spotify


// Get current artist
if let artist = Spotify.currentTrack.artist {
    print(artist)
}

// Get current track title
if let title = Spotify.currentTrack.title {
    print(title)
}

// Play next song
Spotify.playNext()

有关实际示例,请参阅SpotMenu