public UnloveTrackMethod(UserApiClient client, LastFmApi.Track track) : base(client, "track.unlove") { SetParameters(new Dictionary <ParameterKey, string> { { ParameterKey.Track, track.Title }, { ParameterKey.Artist, track.Artist } }); }
public IsLovedMethod(ApiClient client, LastFmApi.Track track, string username) : base(client, "track.getInfo") { SetParameters(new Dictionary <ParameterKey, string> { { ParameterKey.Track, track.Title }, { ParameterKey.Artist, track.Artist }, { ParameterKey.Album, track.Album }, { ParameterKey.AlbumArtist, track.AlbumArtist }, { ParameterKey.Username, username } }); }
public UpdateNowPlayingMethod(UserApiClient client, LastFmApi.Track track, int duration) : base(client, "track.updateNowPlaying") { SetParameters(new Dictionary <ParameterKey, string> { { ParameterKey.Track, track.Title }, { ParameterKey.Artist, track.Artist }, { ParameterKey.Album, track.Album }, { ParameterKey.AlbumArtist, track.AlbumArtist }, { ParameterKey.Duration, duration.ToString() } }); }
public ScrobbleMethod(UserApiClient client, LastFmApi.Track track, DateTime timePlayed) : base(client, "track.scrobble") { var scrobbleTime = timePlayed.ToUniversalTime(); var unixTimeStamp = (scrobbleTime.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; SetParameters(new Dictionary <ParameterKey, string> { { ParameterKey.Track, track.Title }, { ParameterKey.Artist, track.Artist }, { ParameterKey.Album, track.Album }, { ParameterKey.AlbumArtist, track.AlbumArtist }, { ParameterKey.Timestamp, unixTimeStamp.ToString() } }); }