From eb0309c7ccd34a026fe690c184e3ed4a31fa33e9 Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Sun, 25 Mar 2018 19:56:59 +0200 Subject: [PATCH] Added docs for proxy usage --- SpotifyAPI.Docs/docs/SpotifyLocalAPI/index.md | 15 +++++++++++++++ SpotifyAPI.Docs/docs/SpotifyWebAPI/proxy.md | 18 ++++++++++++++++++ SpotifyAPI.Docs/docs/index.md | 9 +++++++++ SpotifyAPI.Docs/mkdocs.yml | 1 + 4 files changed, 43 insertions(+) create mode 100644 SpotifyAPI.Docs/docs/SpotifyWebAPI/proxy.md diff --git a/SpotifyAPI.Docs/docs/SpotifyLocalAPI/index.md b/SpotifyAPI.Docs/docs/SpotifyLocalAPI/index.md index cd3cbb9a..cee0acde 100644 --- a/SpotifyAPI.Docs/docs/SpotifyLocalAPI/index.md +++ b/SpotifyAPI.Docs/docs/SpotifyLocalAPI/index.md @@ -52,6 +52,21 @@ _spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig }); ``` +## Proxy Settings + +You can forward your proxy settings to the local api by using a field in the `SpotifyLocalAPIConfig`. + +```cs +_spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig +{ + ProxyConfig = new ProxyConfig() { + Host = "127.0.0.1", + Port = 8080 + // Additional values like Username and Password are available + } +}); +``` + ## Anti-Virus Blocking Response Some Anti-Virus Software blocks the response from spotify due wrong headers. diff --git a/SpotifyAPI.Docs/docs/SpotifyWebAPI/proxy.md b/SpotifyAPI.Docs/docs/SpotifyWebAPI/proxy.md new file mode 100644 index 00000000..f46e5dd6 --- /dev/null +++ b/SpotifyAPI.Docs/docs/SpotifyWebAPI/proxy.md @@ -0,0 +1,18 @@ +## Proxy Settings + +You can forward your proxy settings to the web api by using a field in the `SpotifyLocalAPIConfig`. + +```cs +ProxyConfig proxyConfig = new ProxyConfig() +{ + Host = "127.0.0.1", + Port = 8080 + // Additional values like Username and Password are available +}; + +SpotifyWebAPI api = new SpotifyWebAPI(proxyConfig); +// or +WebAPIFactory webApiFactory = new WebAPIFactory(..., proxyConfig); +SpotifyWebAPI api = await webApiFactory.GetWebApi(); + +``` diff --git a/SpotifyAPI.Docs/docs/index.md b/SpotifyAPI.Docs/docs/index.md index 846f1cf3..513b0165 100644 --- a/SpotifyAPI.Docs/docs/index.md +++ b/SpotifyAPI.Docs/docs/index.md @@ -1,6 +1,7 @@ # SpotifyAPI-NET Documentation ##About + This Library, written in C#/.NET, combines two independent SpotifyAPIs into one. **Spotify's Web API** ([link](https://developer.spotify.com/web-api/)) @@ -16,6 +17,7 @@ Both combined can be used for any kind of application. --- ##Installing + * Via NuGet Package: ```cs Install-Package SpotifyAPI-NET @@ -28,6 +30,13 @@ Install-Package SpotifyAPI-NET -pre --- ##Projects + ###[Spofy](https://github.com/eltoncezar/Spofy) by [@eltoncezar](https://github.com/eltoncezar) > A Spotify mini player and notifier for Windows + +###[Toastify](https://github.com/aleab/toastify) by [@aleab](https://github.com/aleab) + +> Toastify adds global hotkeys and toast notifications to Spotify +> +> *Forked from [nachmore/toastify](https://github.com/nachmore/toastify)* diff --git a/SpotifyAPI.Docs/mkdocs.yml b/SpotifyAPI.Docs/mkdocs.yml index 0212d9f3..274ae20c 100644 --- a/SpotifyAPI.Docs/mkdocs.yml +++ b/SpotifyAPI.Docs/mkdocs.yml @@ -6,6 +6,7 @@ pages: - 'Getting started': 'SpotifyWebAPI/gettingstarted.md' - 'Examples': 'SpotifyWebAPI/examples.md' - 'Authentication': 'SpotifyWebAPI/auth.md' + - 'Proxy': 'SpotifyWebAPI/proxy.md' - '- Albums': 'SpotifyWebAPI/albums.md' - '- Artists': 'SpotifyWebAPI/artists.md' - '- Browse': 'SpotifyWebAPI/browse.md'