Access the full API documentation here.
Getting Started as on Getting Started
- Request an API key on the Contact Us page
- The API key and associated secret will be used to identify your application when making requests to the API
- All requests must be signed using the oAuth standard
- Send any API support questions to [email protected]
- iOS 8.0+
- Xcode 10+
- Swift 4.0+
AudiomackSwiftLibrary is available through CocoaPods. To integrate AudiomackSwiftLibrary into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'AudiomackSwiftLibrary', '~> 4.7'
end
Then, run the following command:
$ pod install
Audiomack only supports Oauth 1.0. To initialize and use AudiomackSwiftLibrary,
import AudiomackSwiftLibrary
let client = AudiomackClient(consumerKey: "YOUR_CONSUMER_KEY", consumerSecret: "YOUR_CONSUMER_SECRET")
//TO GET ARTIST DETAILS
client.getArtistDetails(slug: "eminem") { (result) in
switch result{
case let .success(response):
print(response)
//response - AudiomackUser Object
case let .failure(error):
print("error \(error.localizedDescription)")
if (error.audiomackError != nil) {
print(error.audiomackError)
}
}
}
//TO GET MUSIC DETAILS
client.getMusic(id: "2077853") { (result) in
switch result{
case let .success(response):
print(response)
//response - AudiomackMusic Object
case let .failure(error):
print("error \(error.localizedDescription)")
if (error.audiomackError != nil) {
print(error.audiomackError)
}
}
}
// TO GET ARTIST UPLOADS
client.getArtistUploads(slug: "eminem") { (result) in
switch result{
case let .success(response):
print(response)
case let .failure(error):
print("error \(error.localizedDescription)")
if (error.audiomackError != nil) {
print(error.audiomackError!.message)
}
}
}
To run the example project, clone the repo, and run pod install
from the Example directory first.
- Get Music Details
- Get Most Recent Music
- Get Genre-specific Most Recent Music
- Get Trending Music
- Get Genre-specific Trending Music
- Flag Unplayable Track
- Play Track
- Get Artist Details
- Get Artist Uploads
- Get Artist Favorites
- Search Artist Favorites
- Get Artist Playlists
- Get Artist Following / Followers
- Get Artist Feed
- Get Playlist Details
- Get Trending Playlists
- Get Genre-specific Trending Playlists
- Get Chart Tracks
- Get Gender Specific Chart Tracks
- Search Song / Artist / Playlist / Album
- Search Autosuggest
- Favorite / Unfavorite a song / album
- Repost / Unrepost a song / album
- Follow / Unfollow an artist
- Create playlist
- Edit playlist
- Delete playlist
- Add song(s) to playlist
- Remove song from playlist
- Favorite / Unfavorite playlist
- Register user
- Get User Details
- Forgot Password
- Get User Playlists
- Get User Uploads
- Get User Favorites
- Get User Notifications
- Getting Artist Pinned Content
- Marking User Notifications as Seen
- Getting Aggregations Lists for Notifications
- Getting list of activities for an Aggregation
Fitzafful, [email protected]
AudiomackSwiftLibrary is available under the MIT license. See the LICENSE file for more info.