|
1 |
| -SpotifyAPI-NET |
2 |
| -=== |
3 | 1 |
|
4 |
| -[](https://ci.appveyor.com/project/JohnnyCrazy/spotifyapi-net) |
| 2 | +<h1 align="center"> |
| 3 | + <p align="center">SpotifyAPI-NET</p> |
| 4 | + <a href="https://johnnycrazy.github.io/SpotifyAPI-NET/"> |
| 5 | + <img |
| 6 | + height="128" |
| 7 | + width="128" |
| 8 | + src="SpotifyAPI.Docs/static/img/logo.svg" |
| 9 | + alt="SpotifyAPI-NET"> |
| 10 | + </a> |
| 11 | +</h1> |
| 12 | + |
| 13 | +> ℹ This README targets Version >= 6.X, which is currently in beta status. For the documentation of version 5.1.1, visit [the docs](https://johnnycrazy.github.io/SpotifyAPI-NET/docs/home) |
| 14 | +
|
| 15 | +[](https://ci.appveyor.com/project/JohnnyCrazy/spotifyapi-net) |
| 16 | + |
| 17 | +[](https://www.nuget.org/packages/SpotifyAPI.Web/) |
| 18 | +[](https://www.nuget.org/packages/SpotifyAPI.Web/) |
| 19 | + |
| 20 | +This open source library for the Spotify Web API provides an easy to use interface for .NET based languages, like C# and VisualBasic .NET. By using it you can query general spotify catalog information (tracks, albums and playlists), manage user-related content ("My Library", create and edit playlists) and control the users music players (play, stop, transfer playback, play specific track). |
| 21 | + |
| 22 | +### Features |
| 23 | + |
| 24 | + |
| 25 | +* ✅ Typed responses and requests to over 74 endpoints. Complete and always up to date. |
| 26 | +* ✅ Supports `.NET Standard 2.X`, which includes all major platforms, including mobile: |
| 27 | + * `.NET Framework` |
| 28 | + * `UWP` |
| 29 | + * `.NET Core` |
| 30 | + * `Xamarin.Forms` |
| 31 | +* ✅ Included `HTTPClient`, but feel free to bring your own! |
| 32 | +* ✅ Logging supported |
| 33 | +* ✅ Retry Handlers supported |
| 34 | +* ✅ Proxy support |
| 35 | +* ✅ Pagination support |
| 36 | +* ✅ All OAuth2 Authentications supported for use in `ASP .NET` **and** `CLI` apps |
| 37 | +* ✅ Modular structure, for easy unit testing |
5 | 38 |
|
6 |
| -A Wrapper for Spotify's Web API, written in .NET |
7 |
| - |
8 |
| -**Spotify's Web API** ([link](https://developer.spotify.com/web-api/)) |
9 |
| -> Based on simple REST principles, our Web API endpoints return metadata in JSON format about artists, albums, and tracks directly from the Spotify catalogue. |
10 |
| -> The API also provides access to user-related data such as playlists and music saved in a “Your Music” library, subject to user’s authorization. |
11 |
| -
|
12 |
| -**SpotifyAPI.Web** [](https://www.nuget.org/packages/SpotifyAPI.Web/) |
13 |
| -> A wrapper around Spotify's Web API, providing sync and async methods to query all possible endpoints. Results are returned as typed class instances, allowing property-based access. |
| 39 | +### Example |
14 | 40 |
|
15 |
| -**SpotifyAPI.Web.Auth** [](https://www.nuget.org/packages/SpotifyAPI.Web.Auth/) |
16 |
| -> A library providing C# implementations of the 3 supported Authentication modes, including `ImplicitGrantAuth`, `AuthorizationCodeAuth` and `CredentialsAuth` |
| 41 | +```csharp |
| 42 | +using System; |
| 43 | +using SpotifyAPI.Web; |
17 | 44 |
|
18 |
| -### Docs and Usage |
19 |
| - |
20 |
| -More Information, Installation-Instructions, Examples and API-Reference can be found at [github.io/SpotifyAPI-Net/](http://johnnycrazy.github.io/SpotifyAPI-NET/) |
| 45 | +class Program |
| 46 | +{ |
| 47 | + static async Task Main() |
| 48 | + { |
| 49 | + var spotify = new SpotifyClient("YourAccessToken"); |
21 | 50 |
|
22 |
| -### NuGet |
23 |
| -You can add the API to your project via [nuget-package](https://www.nuget.org/packages/SpotifyAPI.Web/): |
| 51 | + var track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH"); |
| 52 | + Console.WriteLine(track.Name); |
| 53 | + } |
| 54 | +} |
24 | 55 | ```
|
25 |
| -Install-Package SpotifyAPI.Web |
26 |
| -Install-Package SpotifyAPI.Web.Auth |
27 | 56 |
|
28 |
| -//or |
| 57 | +More examples can be found on [the website](https://johnnycrazy.github.io/SpotifyAPI-NET/docs/next/introduction) and in the `SpotifyAPI.Web.Examples` directory. |
29 | 58 |
|
30 |
| -Install-Package SpotifyAPI.Web -pre |
31 |
| -Install-Package SpotifyAPI.Web.Auth -pre |
32 |
| -``` |
33 | 59 |
|
34 |
| -### Example |
| 60 | +### Docs and Usage |
35 | 61 |
|
36 |
| -```c# |
37 |
| -using SpotifyAPI.Web.Enums; |
38 |
| -using SpotifyAPI.Web.Models; |
| 62 | +More Information, Installation-Instructions, Examples, Guides can be found at [johnnycrazy.github.io/SpotifyAPI-NET/](http://johnnycrazy.github.io/SpotifyAPI-NET/) |
39 | 63 |
|
40 |
| -public static async void Example() |
41 |
| -{ |
42 |
| - SpotifyWebAPI api = new SpotifyWebAPI |
43 |
| - { |
44 |
| - AccessToken = "XX?X?X", |
45 |
| - TokenType = "Bearer" |
46 |
| - }; |
47 |
| - |
48 |
| - FullTrack track = await api.GetTrackAsync("1eV81a6H4xDdpi8r2C4tQT"); |
49 |
| - if(!track.HasError()) { |
50 |
| - Console.WriteLine(track.Name); |
51 |
| - } |
52 |
| -} |
53 |
| -``` |
| 64 | +### Installation |
| 65 | + |
| 66 | +Installation Instructions can be found in the [Getting Started Guide](https://johnnycrazy.github.io/SpotifyAPI-NET/docs/next/getting_started) |
54 | 67 |
|
55 | 68 | ### Donations
|
56 | 69 |
|
|
0 commit comments