mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2025-01-10 21:57:46 +00:00
Adapted readme for version 6 beta
This commit is contained in:
parent
fb5b81b747
commit
98e29294d9
89
README.md
89
README.md
@ -1,57 +1,70 @@
|
||||
SpotifyAPI-NET
|
||||
===
|
||||
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/mxpjhw3uli4q0yx1?svg=true)](https://ci.appveyor.com/project/JohnnyCrazy/spotifyapi-net)
|
||||
<h1 align="center">
|
||||
<p align="center">SpotifyAPI-NET</p>
|
||||
<a href="https://johnnycrazy.github.io/SpotifyAPI-NET/">
|
||||
<img
|
||||
height="128"
|
||||
width="128"
|
||||
src="SpotifyAPI.Docs/static/img/logo.svg"
|
||||
alt="SpotifyAPI-NET">
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
A Wrapper for Spotify's Web API, written in .NET
|
||||
> ℹ 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)
|
||||
|
||||
**Spotify's Web API** ([link](https://developer.spotify.com/web-api/))
|
||||
> Based on simple REST principles, our Web API endpoints return metadata in JSON format about artists, albums, and tracks directly from the Spotify catalogue.
|
||||
> 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.
|
||||
[![Build status](https://img.shields.io/appveyor/build/JohnnyCrazy/SpotifyAPI-NET/master?style=flat-square)](https://ci.appveyor.com/project/JohnnyCrazy/spotifyapi-net)
|
||||
![License](https://img.shields.io/github/license/JohnnyCrazy/SpotifyAPI-NET?style=flat-square)
|
||||
[![SpotifyAPI.Web NuGET](https://img.shields.io/nuget/vpre/SpotifyAPI.Web?label=SpotifyAPI.Web&style=flat-square)](https://www.nuget.org/packages/SpotifyAPI.Web/)
|
||||
[![SpotifyAPI.Web.Auth NuGET](https://img.shields.io/nuget/vpre/SpotifyAPI.Web.Auth?label=SpotifyAPI.Web.Auth&style=flat-square)](https://www.nuget.org/packages/SpotifyAPI.Web/)
|
||||
|
||||
**SpotifyAPI.Web** [![Nuget SpotifyAPI.Web](https://badge.fury.io/nu/SpotifyAPI.Web.svg)](https://www.nuget.org/packages/SpotifyAPI.Web/)
|
||||
> 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.
|
||||
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).
|
||||
|
||||
**SpotifyAPI.Web.Auth** [![Nuget SpotifyAPI.Web.Auth](https://badge.fury.io/nu/SpotifyAPI.Web.Auth.svg)](https://www.nuget.org/packages/SpotifyAPI.Web.Auth/)
|
||||
> A library providing C# implementations of the 3 supported Authentication modes, including `ImplicitGrantAuth`, `AuthorizationCodeAuth` and `CredentialsAuth`
|
||||
### Features
|
||||
|
||||
### Docs and Usage
|
||||
|
||||
More Information, Installation-Instructions, Examples and API-Reference can be found at [github.io/SpotifyAPI-Net/](http://johnnycrazy.github.io/SpotifyAPI-NET/)
|
||||
|
||||
### NuGet
|
||||
You can add the API to your project via [nuget-package](https://www.nuget.org/packages/SpotifyAPI.Web/):
|
||||
```
|
||||
Install-Package SpotifyAPI.Web
|
||||
Install-Package SpotifyAPI.Web.Auth
|
||||
|
||||
//or
|
||||
|
||||
Install-Package SpotifyAPI.Web -pre
|
||||
Install-Package SpotifyAPI.Web.Auth -pre
|
||||
```
|
||||
* ✅ Typed responses and requests to over 74 endpoints. Complete and always up to date.
|
||||
* ✅ Supports `.NET Standard 2.X`, which includes all major platforms, including mobile:
|
||||
* `.NET Framework`
|
||||
* `UWP`
|
||||
* `.NET Core`
|
||||
* `Xamarin.Forms`
|
||||
* ✅ Included `HTTPClient`, but feel free to bring your own!
|
||||
* ✅ Logging supported
|
||||
* ✅ Retry Handlers supported
|
||||
* ✅ Proxy support
|
||||
* ✅ Pagination support
|
||||
* ✅ All OAuth2 Authentications supported for use in `ASP .NET` **and** `CLI` apps
|
||||
* ✅ Modular structure, for easy unit testing
|
||||
|
||||
### Example
|
||||
|
||||
```c#
|
||||
using SpotifyAPI.Web.Enums;
|
||||
using SpotifyAPI.Web.Models;
|
||||
```csharp
|
||||
using System;
|
||||
using SpotifyAPI.Web;
|
||||
|
||||
public static async void Example()
|
||||
class Program
|
||||
{
|
||||
SpotifyWebAPI api = new SpotifyWebAPI
|
||||
{
|
||||
AccessToken = "XX?X?X",
|
||||
TokenType = "Bearer"
|
||||
};
|
||||
static async Task Main()
|
||||
{
|
||||
var spotify = new SpotifyClient("YourAccessToken");
|
||||
|
||||
FullTrack track = await api.GetTrackAsync("1eV81a6H4xDdpi8r2C4tQT");
|
||||
if(!track.HasError()) {
|
||||
Console.WriteLine(track.Name);
|
||||
}
|
||||
var track = await spotify.Tracks.Get("1s6ux0lNiTziSrd7iUAADH");
|
||||
Console.WriteLine(track.Name);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
More examples can be found on [the website](https://johnnycrazy.github.io/SpotifyAPI-NET/docs/next/introduction) and in the `SpotifyAPI.Web.Examples` directory.
|
||||
|
||||
|
||||
### Docs and Usage
|
||||
|
||||
More Information, Installation-Instructions, Examples, Guides can be found at [johnnycrazy.github.io/SpotifyAPI-NET/](http://johnnycrazy.github.io/SpotifyAPI-NET/)
|
||||
|
||||
### Installation
|
||||
|
||||
Installation Instructions can be found in the [Getting Started Guide](https://johnnycrazy.github.io/SpotifyAPI-NET/docs/next/getting_started)
|
||||
|
||||
### Donations
|
||||
|
||||
If you want to support this project or my work in general, you can donate a buck or two via the link below. However, this will be always optional!
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 640 640" width="640" height="640"><defs><path d="M640 320C640 496.61 496.61 640 320 640C143.39 640 0 496.61 0 320C0 143.39 143.39 0 320 0C496.61 0 640 143.39 640 320Z" id="c13R1oM98p"></path><text id="m3ff3NvNon" x="492.83" y="122.48" font-size="1009" font-family="Rochester" font-weight="normal" font-style="normal" letter-spacing="0" alignment-baseline="before-edge" transform="matrix(1 0 0 1 -172.83229358717756 -456.15866719943267)" style="line-height:100%" xml:space="preserve" dominant-baseline="text-before-edge"><tspan x="492.83" dy="0em" alignment-baseline="before-edge" dominant-baseline="text-before-edge" text-anchor="middle">#</tspan></text><style id="rochesternormalnormal">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 640 640" width="640" height="640"><defs><style type="text/css">@import url(https://fonts.googleapis.com/css2?family=Rochester);</style><path d="M640 320C640 496.61 496.61 640 320 640C143.39 640 0 496.61 0 320C0 143.39 143.39 0 320 0C496.61 0 640 143.39 640 320Z" id="c13R1oM98p"></path><text id="m3ff3NvNon" x="492.83" y="122.48" font-size="1009" font-family="Rochester" font-weight="normal" font-style="normal" letter-spacing="0" alignment-baseline="before-edge" transform="matrix(1 0 0 1 -172.83229358717756 -456.15866719943267)" style="line-height:100%" xml:space="preserve" dominant-baseline="text-before-edge"><tspan x="492.83" dy="0em" alignment-baseline="before-edge" dominant-baseline="text-before-edge" text-anchor="middle">#</tspan></text><style id="rochesternormalnormal">
|
||||
@font-face {
|
||||
font-family: "Rochester";
|
||||
font-weight: normal;
|
||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Loading…
Reference in New Issue
Block a user