![]() |
VOOZH | about |
dotnet add package Universe.Lastfm.Api --version 0.9.9.875
NuGet\Install-Package Universe.Lastfm.Api -Version 0.9.9.875
<PackageReference Include="Universe.Lastfm.Api" Version="0.9.9.875" />
<PackageVersion Include="Universe.Lastfm.Api" Version="0.9.9.875" />Directory.Packages.props
<PackageReference Include="Universe.Lastfm.Api" />Project file
paket add Universe.Lastfm.Api --version 0.9.9.875
#r "nuget: Universe.Lastfm.Api, 0.9.9.875"
#:package Universe.Lastfm.Api@0.9.9.875
#addin nuget:?package=Universe.Lastfm.Api&version=0.9.9.875Install as a Cake Addin
#tool nuget:?package=Universe.Lastfm.Api&version=0.9.9.875Install as a Cake Tool
Here is a project of the Last.fm api, the purpose of which is to simplify the development of solutions in the C# programming language, such as scrobbler for example.
For convenience, the project should be cloned to the local path C:\P\Universe.Lastfm.API\ (but this is not at all necessary)
A separate branch is created for each development/bug fix task.
It is created directly from the task, it is necessary to include errors in the name of the task; before creating it, indicate in parentheses in English the not very long name of the branch.
The message also can be multi-line, for example: #89 [WebApp Auth]: Added authorization in the web application. #89 [Common]: Changed links to projects. #89 [Universe.Algorithm, Tests]: Removed artifact.
where:
#89 - issue number (usually the same as the branch number) - in gitlab it will turn into a link to the issue, and when you hover the mouse it will show the name of the task
"[WebApp Auth]:"" name of the functionality within which the commit is made. Must be indicated with a colon at the end.
"Authorization has been added to the web application." - text describing what was done. Be sure to have a period at the end to complete the sentence.
Several actions can be listed that are recorded in this manner e.g. "#89 WebApp Auth: The Unity container is connected in the WebApp project. The Unity container is connected in the Core project.""
[~] - we indicate it at the beginning of the commit line if we are merging files manually (git automatically generates a message). The message should look like: [~] Merge from develop to 20-build-ef-data-access-layer or [~] Merge from develop to #20
For a development, you should use VS 2017, VS2019, VS2022; also must additionally be installed:
throw ...; in the catch block, then you need to indicate a comment why it is not there, for example
as in the example below
If a new error instance is created in the catch block, then it is necessary to indicate the original error or comment
why the original error should not be stated.catch (Exception ex) {
_log.Unexpected(ex);
//throw; Whatever happens here should not affect the execution of everything else
}
The project uses a whole arsenal of filters for more convenient and flexible creation of database queries. Below is an examples of use.
Gets a track information:
string trackName = "Age Of Shadows";
string performer = "Ayreon";
IUnityContainer container = UnityAppConfig.Container;
UniverseLastApiScope scope = container.Resolve<IUniverseScope>() as UniverseLastApiScope;
ReqContext reqCtx = new ReqContext();
reqCtx.Track = trackName;
reqCtx.Performer = performer;
GetTrackInfoResponce responce = scope.GetQuery<GetTrackInfoQuery>().Execute(reqCtx.As<GetTrackInfoRequest>());
TrackFull track = responce.DataContainer.Track;
where:
container - the DI-container, that helps for an implenmentation of dependency ingections for your project and also storages was created before instances of classes. Important: you need to add UnityAppConfig as project 'Universe.Lastfm.Api.FormsApp' that lies in the folder 'Infrastracture';
scope - the object, which could execute queries and commands. This is an activity sphere other words;
reqCtx - the object was created for a development comfort. Inherits from object 'BaseRequest'. In this case replaced request usage was implemented in the class 'GetTrackInfoRequest'. Of course you might use the class GetTrackInfoRequest. The class GetTrackInfoRequest definates parameters 'TrackName' and 'Performer'. This is required parameters and they will be described below;
trackName - the track name;
performer - the artist name;
GetQuery<GetTrackInfoQuery>().Execute( - this is a method that generates a request and which takes GetTrackInfoRequest (BaseRequest) as an argument containing required parameters. In this case gets the metadata for a track on Last.fm using the artist/track name or a musicbrainz id;
responce - the responce with full information about track on the Last.fm. Inferites from BaseResponce;
track - the track information model. You might get it from the property 'DataContainer' that is deserializing property 'ServiceAnswer'.
Marks a track as the loved track:
string trackName = "Age Of Shadows";
string performer = "Ayreon";
IUnityContainer container = UnityAppConfig.Container;
UniverseLastApiScope scope = container.Resolve<IUniverseScope>() as UniverseLastApiScope;
ReqContext reqCtx = new ReqContext();
reqCtx.Track = trackName;
reqCtx.Performer = performer;
UpdateTrackAsLoveCommandResponce responce = Scope.GetCommand<UpdateTrackAsLoveCommand>().Execute(ReqCtx.As<UpdateTrackAsLoveRequest>());
var serviceAnswer = responce.ServiceAnswer;
where:
container - the DI-container, that helps for an implenmentation of dependency ingections for your project and also storages was created before instances of classes. Important: you need to add UnityAppConfig as project 'Universe.Lastfm.Api.FormsApp' that lies in the folder 'Infrastracture';
scope - the object, which could execute queries and commands. This is an activity sphere other words;
reqCtx - the object was created for a development comfort. Inherits from object 'BaseRequest'. In this case replaced request usage was implemented in the class 'UpdateTrackAsLoveRequest'. Of course you might use the class UpdateTrackAsLoveRequest. The class UpdateTrackAsLoveRequest definates parameters 'TrackName' and 'Performer'. This is required parameters and they will be described below;
trackName - the track name;
performer - the artist name;
GetQuery<UpdateTrackAsLoveCommand>().Execute( - this is a method that generates a request and which takes UpdateTrackAsLoveRequest (BaseRequest) as an argument containing required parameters. In this case gets the metadata for a track on Last.fm using the artist/track name or a musicbrainz id;
responce - the responce with answer of the command. Inferites from BaseResponce;
track - the track information model. You might get it from the property 'DataContainer' that is deserializing property 'ServiceAnswer'.
Gets an album information:
string performer = "Ayreon";
string album = "01011001";
IUnityContainer container = UnityAppConfig.Container;
UniverseLastApiScope scope = container.Resolve<IUniverseScope>() as UniverseLastApiScope;
ReqContext reqCtx = new ReqContext();
reqCtx.Album = album;
reqCtx.Performer = performer;
GetAlbumInfoResponce responce = scope.GetQuery<GetAlbumInfoQuery>().Execute(reqCtx.As<GetAlbumInfoRequest>());
Album albumInfo = responce.DataContainer.Album;
where:
container - the DI-container, that helps for an implenmentation of dependency ingections for your project and also storages was created before instances of classes. Important: you need to add UnityAppConfig as project 'Universe.Lastfm.Api.FormsApp' that lies in the folder 'Infrastracture';
scope - the object, which could execute queries and commands. This is an activity sphere other words;
reqCtx - the object was created for a development comfort. Inherits from object 'BaseRequest'. In this case replaced request usage was implemented in the class 'GetAlbumInfoRequest'. Of course you might use the class GetAlbumInfoRequest. The class GetAlbumInfoRequest definates parameters 'TrackName' and 'Performer'. This is required parameters and they will be described below;
album - the album name;
performer - the artist name;
GetQuery<GetAlbumInfoRequest>().Execute( - this is a method that generates a request and which takes GetAlbumInfoRequest (BaseRequest) as an argument containing required parameters. In this case gets the metadata for a album on Last.fm using the artist/album name or a musicbrainz id;
responce - the responce with full information about track on the Last.fm. Inferites from BaseResponce;
albumInfo - the album information model. You might get it from the property 'DataContainer' that is deserializing property 'ServiceAnswer'.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| MonoAndroid | monoandroid80 monoandroid80 is compatible. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.9.9.875 | 9,311 | 2/14/2024 | |
| 0.9.9.850 | 217 | 2/14/2024 | |
| 0.9.9.8 | 219 | 2/12/2024 | |
| 0.9.9.7 | 230 | 2/10/2024 | |
| 0.9.9.6 | 204 | 1/28/2024 | |
| 0.9.9.5 | 201 | 1/20/2024 | |
| 0.9.4 | 208 | 1/16/2024 | |
| 0.9.3.7 | 199 | 1/7/2024 | |
| 0.9.3.6 | 210 | 1/7/2024 | 0.9.3.6 is deprecated because it is no longer maintained and has critical bugs. |
| 0.9.3.5 | 215 | 1/6/2024 | 0.9.3.5 is deprecated because it is no longer maintained and has critical bugs. |