public AddShoutCommand(ILastAuth auth, string album, string artist, string message) : base(auth) { Album = album; Artist = artist; Message = message; }
public GetTagsByUserCommand(ILastAuth auth, string artist, string album, string username) : base(auth) { ArtistName = artist; AlbumName = album; Username = username; }
public GetRecentScrobblesCommand(ILastAuth auth, string username, DateTime from) : base(auth) { Method = "user.getRecentTracks"; Username = username; From = from; }
public UpdateNowPlayingCommand(ILastAuth auth, string artist, string album, string track) : base(auth) { Artist = artist; Album = album; Track = track; }
/// <summary> /// Constructor. /// </summary> /// <param name="windowManager">WindowManager used to display dialogs.</param> /// <param name="displayName">Display name.</param> /// <param name="trackAPI">Last.fm API object for getting track information.</param> /// <param name="albumAPI">Last.fm API object for getting album information.</param> /// <param name="lastAuth">Last.fm authentication object.</param> public MediaPlayerScrobbleViewModelBase(IExtendedWindowManager windowManager, string displayName, ITrackApi trackAPI, IAlbumApi albumAPI, ILastAuth lastAuth) : base(windowManager, displayName) { _trackAPI = trackAPI; _albumAPI = albumAPI; _lastAuth = lastAuth; }
public GetSimilarArtistsCommand(ILastAuth auth, string artistName) : base(auth) { Method = "artist.getSimilar"; ArtistName = artistName; }
public MainViewModel(ILastAuth lastAuth) { _lastAuth = lastAuth; GenerateProgressReportCommand = new AsyncDelegateCommand(GenerateProgressReport); OpenReportCommand = new DelegateCommand(OpenProgressReport); ExecuteSelectedCommandCommand = new AsyncDelegateCommand(ExecuteSelectedCommand); DeleteConfigCommand = new DelegateCommand(() => { if (_configPath != null && File.Exists(_configPath)) { File.Delete(_configPath); } InitialiseState(); }); var currentDir = AppDomain.CurrentDomain.BaseDirectory; SolutionDir = Path.GetFullPath(currentDir + "../../../../"); // assuming this is running in debug dir _configPath = Path.GetFullPath(SolutionDir + SYRO_CONFIG_FILENAME); BaseCommandTypes = new List <Type> { typeof(DummyGetAsyncCommand <>), typeof(DummyPostAsyncCommand <>) }; LastObjectTypes = Reflektor.FindClassesCastableTo(typeof(ILastfmObject)); LastResponseTypes = Reflektor.FindClassesCastableTo(typeof(LastResponse)); InitialiseState(); Application.Current.Exit += OnAppExit; }
public SearchAlbumsCommand(ILastAuth auth, string albumName) : base(auth) { Method = "album.search"; AlbumName = albumName; }
public AddShoutCommand(ILastAuth auth, string artist, string message) : base(auth) { Method = "artist.shout"; Artist = artist; Message = message; }
public AddShoutCommand(ILastAuth auth, string track, string artist, string message) : base(auth) { Method = "track.shout"; Track = track; Artist = artist; Message = message; }
public GetTracksCommand(ILastAuth auth, string username, string artist, string album, DateTimeOffset from) : base(auth) { Username = username; Artist = artist; Album = album; From = from; }
public AddShoutCommand(ILastAuth auth, string recipient, string message) : base(auth) { Method = "user.shout"; Recipient = recipient; Message = message; }
public ArtistGetTagsByUserCommand(ILastAuth auth, string artist, string username) : base(auth) { Method = "artist.getTags"; ArtistName = artist; Username = username; }
public GetAlbumShoutsCommand(ILastAuth auth, string albumname, string artistname) : base(auth) { Method = "album.getShouts"; AlbumName = albumname; ArtistName = artistname; }
public GetTrackShoutsCommand(ILastAuth auth, string trackname, string artistname) : base(auth) { Method = "track.getShouts"; TrackName = trackname; ArtistName = artistname; }
public UnloveTrackCommand(ILastAuth auth, string trackname, string artistname) : base(auth) { Method = "track.unlove"; TrackName = trackname; ArtistName = artistname; }
public GetSimilarTracksCommand(ILastAuth auth, string trackName, string artistName) : base(auth) { Method = "track.getSimilar"; ArtistName = artistName; TrackName = trackName; }
public TrackUpdateNowPlayingCommand(ILastAuth auth, string artist, string album, string track) : base(auth) { Method = "track.updateNowPlaying"; Artist = artist; Album = album; Track = track; }
public GetUserTagsForAlbumCommand(ILastAuth auth, string album, string artist, string username) : base(auth) { Method = "album.getTags"; AlbumName = album; ArtistName = artist; UserName = username; }
public AlbumGetTagsByUserCommand(ILastAuth auth, string artist, string album, string username) : base(auth) { Method = "album.getTags"; ArtistName = artist; AlbumName = album; Username = username; }
public GetTracksCommand(ILastAuth auth, string username, string artist, string album, DateTimeOffset since) : base(auth) { Username = username; Artist = artist; Album = album; Since = since; Page = 1; }
public ScrobbleCommand(ILastAuth auth, IList <Scrobble> scrobbles) : base(auth) { if (scrobbles.Count > 50) { throw new ArgumentOutOfRangeException("scrobbles", "Only 50 scrobbles can be sent at a time"); } Scrobbles = scrobbles; }
public LibraryGetTracksCommand(ILastAuth auth, string username, string artist, string album, DateTimeOffset from) : base(auth) { Method = "library.getTracks"; Username = username; Artist = artist; Album = album; From = from; }
public TrackScrobbleCommand(ILastAuth auth, string artist, string album, string track, string albumArtist, DateTimeOffset?timeplayed) : base(auth) { Method = "track.scrobble"; Artist = artist; Album = album; Track = track; AlbumArtist = albumArtist; TimePlayed = timeplayed; }
public LastFmLoginService( ISettingsService settingsService, ILastAuth lastAuth, INavigationService navigationService, IPlayerService playerService, IPurchaseService purchaseService) { _settingsService = settingsService; _lastAuth = lastAuth; _navigationService = navigationService; _playerService = playerService; _purchaseService = purchaseService; }
public async Task <bool> Scrobble(ILastAuth Auth, params string[] data) { IFolder rootFolder = FileSystem.Current.LocalStorage; IFolder folder = await rootFolder.CreateFolderAsync("db", CreationCollisionOption.OpenIfExists); IFile file = await folder.CreateFileAsync("scrobbles.db", CreationCollisionOption.ReplaceExisting); IScrobbler _scrobbler = new BreadScrobbler(Auth, file.Path); return((await _scrobbler.ScrobbleAsync(new IF.Lastfm.Core.Objects.Scrobble(data[0], data[1], data[2], DateTimeOffset.Now))).Success); }
/// <summary> /// Constructor. /// Deserializes the users. /// </summary> /// <param name="windowManager">WindowManager used to display dialogs.</param> /// <param name="lastAuth">Last.fm authentication object.</param> /// <param name="fileOperator">FileOperator used to write to disk.</param> /// <param name="directoryOperator">DirectoryOperator used to check and create directories.</param> /// <param name="userSerializer">Serializer used to serialize <see cref="User"/>.</param> public UserViewModel(IExtendedWindowManager windowManager, ILastAuth lastAuth, IFileOperator fileOperator, IDirectoryOperator directoryOperator, ISerializer <User> userSerializer) { _windowManager = windowManager; _lastAuth = lastAuth; _fileOperator = fileOperator; _directoryOperator = directoryOperator; _userSerializer = userSerializer; AvailableUsers = new ObservableCollection <User>(); if (!_directoryOperator.Exists(USERSFOLDER)) { _directoryOperator.CreateDirectory(USERSFOLDER); } DeserializeUsers(); }
/// <summary> /// Constructor. /// Deserializes the users. /// </summary> /// <param name="windowManager">WindowManager used to display dialogs.</param> /// <param name="lastAuth">Last.fm authentication object.</param> /// <param name="userApi">Api to get recent scrobbles with.</param> /// <param name="fileOperator">FileOperator used to write to disk.</param> /// <param name="directoryOperator">DirectoryOperator used to check and create directories.</param> /// <param name="userSerializer">Serializer used to serialize <see cref="User"/>.</param> public UserViewModel(IExtendedWindowManager windowManager, ILastAuth lastAuth, IUserApi userApi, IFileOperator fileOperator, IDirectoryOperator directoryOperator, ISerializer userSerializer) { _windowManager = windowManager; _lastAuth = lastAuth; _userApi = userApi ?? throw new ArgumentNullException(nameof(userApi)); _fileOperator = fileOperator; _directoryOperator = directoryOperator; _userSerializer = userSerializer; AvailableUsers = new ObservableCollection <User>(); if (!_directoryOperator.Exists(USERSFOLDER)) { _directoryOperator.CreateDirectory(USERSFOLDER); } DeserializeUsers(); LoadLastUser(); }
public MainViewModel(ILastAuth lastAuth) { _lastAuth = lastAuth; GenerateProgressReportCommand = new AsyncDelegateCommand(GenerateProgressReport); OpenReportCommand = new DelegateCommand(OpenProgressReport); ExecuteSelectedCommandCommand = new AsyncDelegateCommand(ExecuteSelectedCommand); var currentDir = AppDomain.CurrentDomain.BaseDirectory; SolutionDir = Path.GetFullPath(currentDir + "../../../../"); // assuming this is running in debug dir BaseCommandTypes = new List <Type> { typeof(DummyGetAsyncCommand <>), typeof(DummyPostAsyncCommand <>) }; LastObjectTypes = Reflektor.FindClassesCastableTo(typeof(ILastfmObject)); LastResponseTypes = Reflektor.FindClassesCastableTo(typeof(LastResponse)); SelectedBaseCommandType = BaseCommandTypes.FirstOrDefault(); SelectedLastObjectType = LastObjectTypes.FirstOrDefault(); SelectedResponseType = LastResponseTypes.FirstOrDefault(); CommandParameters = new ObservableCollection <Pair <string, string> >(new List <Pair <string, string> > { new Pair <string, string>(), new Pair <string, string>(), new Pair <string, string>(), new Pair <string, string>(), new Pair <string, string>() }); CommandMethodName = "album.getInfo"; CommandPageNumber = "0"; CommandItemCount = "20"; }
public AlbumApi(ILastAuth auth, HttpClient httpClient = null) : base(httpClient) { Auth = auth; }
protected ScrobblerBase(ILastAuth auth, HttpClient httpClient = null) : base(httpClient) { _auth = auth; MaxBatchSize = 50; }
public LibraryApi(ILastAuth auth, HttpClient httpClient = null) : base(httpClient) { Auth = auth; }
public MainViewModel(ILastAuth lastAuth) { _lastAuth = lastAuth; GenerateProgressReportCommand = new AsyncDelegateCommand(GenerateProgressReport); OpenReportCommand = new DelegateCommand(OpenProgressReport); ExecuteSelectedCommandCommand = new AsyncDelegateCommand(ExecuteSelectedCommand); DeleteConfigCommand = new DelegateCommand(() => { if (_configPath != null && File.Exists(_configPath)) { File.Delete(_configPath); } InitialiseState(); }); var currentDir = AppDomain.CurrentDomain.BaseDirectory; SolutionDir = Path.GetFullPath(currentDir + "../../../../"); // assuming this is running in debug dir _configPath = Path.GetFullPath(SolutionDir + SYRO_CONFIG_FILENAME); BaseCommandTypes = new List<Type> { typeof(DummyGetAsyncCommand<>), typeof(DummyPostAsyncCommand<>) }; LastObjectTypes = Reflektor.FindClassesCastableTo(typeof(ILastfmObject)); LastResponseTypes = Reflektor.FindClassesCastableTo(typeof(LastResponse)); InitialiseState(); Application.Current.Exit += OnAppExit; }
public TrackApi(ILastAuth auth, HttpClient httpClient = null) : base(httpClient) { Auth = auth; }
public SQLiteScrobbler(ILastAuth auth, string databasePath, HttpClient client = null) : base(auth, client) { DatabasePath = databasePath; CacheEnabled = true; }
public ChartApi(ILastAuth auth, HttpClient httpClient = null) : base(httpClient) { Auth = auth; }
public Scrobbler(ILastAuth auth, HttpClient httpClient = null) : base(auth, httpClient) { CacheEnabled = false; }
public GetInfoCommand(ILastAuth auth, string album, string artist) : this(auth) { AlbumName = album; ArtistName = artist; }
public void Initialise() { _auth = new LastAuth("user", "pass"); }