Skip to content

Commit eb0309c

Browse files
committed
Added docs for proxy usage
1 parent dd77be8 commit eb0309c

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

SpotifyAPI.Docs/docs/SpotifyLocalAPI/index.md

+15
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ _spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig
5252
});
5353
```
5454

55+
## Proxy Settings
56+
57+
You can forward your proxy settings to the local api by using a field in the `SpotifyLocalAPIConfig`.
58+
59+
```cs
60+
_spotify = new SpotifyLocalAPI(new SpotifyLocalAPIConfig
61+
{
62+
ProxyConfig = new ProxyConfig() {
63+
Host = "127.0.0.1",
64+
Port = 8080
65+
// Additional values like Username and Password are available
66+
}
67+
});
68+
```
69+
5570
## Anti-Virus Blocking Response
5671

5772
Some Anti-Virus Software blocks the response from spotify due wrong headers.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Proxy Settings
2+
3+
You can forward your proxy settings to the web api by using a field in the `SpotifyLocalAPIConfig`.
4+
5+
```cs
6+
ProxyConfig proxyConfig = new ProxyConfig()
7+
{
8+
Host = "127.0.0.1",
9+
Port = 8080
10+
// Additional values like Username and Password are available
11+
};
12+
13+
SpotifyWebAPI api = new SpotifyWebAPI(proxyConfig);
14+
// or
15+
WebAPIFactory webApiFactory = new WebAPIFactory(..., proxyConfig);
16+
SpotifyWebAPI api = await webApiFactory.GetWebApi();
17+
18+
```

SpotifyAPI.Docs/docs/index.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SpotifyAPI-NET Documentation
22

33
##About
4+
45
This Library, written in C#/.NET, combines two independent SpotifyAPIs into one.
56

67
**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.
1617
---
1718

1819
##Installing
20+
1921
* Via NuGet Package:
2022
```cs
2123
Install-Package SpotifyAPI-NET
@@ -28,6 +30,13 @@ Install-Package SpotifyAPI-NET -pre
2830
---
2931

3032
##Projects
33+
3134
###[Spofy](https://github.com/eltoncezar/Spofy) by [@eltoncezar](https://github.com/eltoncezar)
3235

3336
> A Spotify mini player and notifier for Windows
37+
38+
###[Toastify](https://github.com/aleab/toastify) by [@aleab](https://github.com/aleab)
39+
40+
> Toastify adds global hotkeys and toast notifications to Spotify
41+
>
42+
> *Forked from [nachmore/toastify](https://github.com/nachmore/toastify)*

SpotifyAPI.Docs/mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pages:
66
- 'Getting started': 'SpotifyWebAPI/gettingstarted.md'
77
- 'Examples': 'SpotifyWebAPI/examples.md'
88
- 'Authentication': 'SpotifyWebAPI/auth.md'
9+
- 'Proxy': 'SpotifyWebAPI/proxy.md'
910
- '- Albums': 'SpotifyWebAPI/albums.md'
1011
- '- Artists': 'SpotifyWebAPI/artists.md'
1112
- '- Browse': 'SpotifyWebAPI/browse.md'

0 commit comments

Comments
 (0)