Skip to content

Commit 7acffd9

Browse files
author
Jonas Dellinger
committed
Update documentation
1 parent 1876a10 commit 7acffd9

File tree

9 files changed

+3514
-4874
lines changed

9 files changed

+3514
-4874
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"[javascript]": {
3+
"editor.codeActionsOnSave": {
4+
"source.organizeImports": false
5+
}
6+
}
7+
}

SpotifyAPI.Docs/docs/example_cli_custom_html.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,24 @@
22
id: example_cli_custom_html
33
title: CLI - Custom HTML
44
---
5+
6+
import useBaseUrl from '@docusaurus/useBaseUrl';
7+
8+
## Description
9+
10+
An example to show how you can display your own HTML resource after the user went through the authentication process of either [Implicit Grant](implicit_grant.md), [Authorization Code](authorization_code.md) or [PKCE](pkce.md).
11+
12+
<img alt="CLI Custom HTML Example" src={useBaseUrl('img/cli_custom_html.jpeg')} />
13+
14+
## Run it
15+
16+
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5001` is a redirect uri of it.
17+
18+
```bash
19+
# Assumes linux and current working directory is the cloned repository
20+
cd SpotifyAPI.Web.Examples/Example.CLI.CustomHTML
21+
dotnet restore
22+
23+
SPOTIFY_CLIENT_ID=YourClientId SPOTIFY_CLIENT_SECRET=YourClientSecret dotnet run
24+
# A browser window should appear
25+
```

SpotifyAPI.Docs/docs/example_cli_persistent_config.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,25 @@
22
id: example_cli_persistent_config
33
title: CLI - Persistent Config
44
---
5+
6+
## Description
7+
8+
An example to show how an obtained access and refresh token can be stored persistently and re-used across application restarts. This results in fewer requests to spotifys authentication endpoints and a faster experience for the user. The example uses [PKCE](pkce.md) in combination with the `PKCEAuthenticator`, which automatically refreshes expired tokens.
9+
10+
The access and refresh token is saved in a `credentials.json` file of the current working directory.
11+
12+
## Run it
13+
14+
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5000` is a redirect uri of it.
15+
16+
```bash
17+
# Assumes linux and current working directory is the cloned repository
18+
cd SpotifyAPI.Web.Examples/Example.CLI.PersistentConfig
19+
dotnet restore
20+
21+
SPOTIFY_CLIENT_ID=YourClientId dotnet run
22+
# A browser window should appear
23+
# Restarting the process should NOT open a new authentication window
24+
# Instead, the local `crendentials.json` file is used
25+
SPOTIFY_CLIENT_ID=YourClientId dotnet run
26+
```

SpotifyAPI.Docs/src/install_instructions.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import TabItem from '@theme/TabItem';
33
import Tabs from '@theme/Tabs';
44
import React from 'react';
55

6-
// Will be removed after beta releases
7-
const VERSION = '6.0.0';
6+
const VERSION = '6.2.2';
87

98
const installCodeNuget = `Install-Package SpotifyAPI.Web
109
# Optional Auth module, which includes an embedded HTTP Server for OAuth2
@@ -33,17 +32,17 @@ const InstallInstructions = () => {
3332
]}
3433
>
3534
<TabItem value="cli">
36-
<CodeBlock metastring="shell" className="shell">
35+
<CodeBlock language="shell" className="shell">
3736
{installCodeCLI}
3837
</CodeBlock>
3938
</TabItem>
4039
<TabItem value="nuget">
41-
<CodeBlock metastring="shell" className="shell">
40+
<CodeBlock language="shell" className="shell">
4241
{installCodeNuget}
4342
</CodeBlock>
4443
</TabItem>
4544
<TabItem value="reference">
46-
<CodeBlock metastring="xml" className="xml">
45+
<CodeBlock language="xml" className="xml">
4746
{installReference}
4847
</CodeBlock>
4948
</TabItem>

SpotifyAPI.Docs/src/pages/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
33
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
44
import CodeBlock from '@theme/CodeBlock';
55
import Layout from '@theme/Layout';
6-
import TabItem from '@theme/TabItem';
7-
import Tabs from '@theme/Tabs';
86
import classnames from 'classnames';
97
import React from 'react';
108
import GitHubButton from 'react-github-btn';
@@ -131,7 +129,7 @@ function Home() {
131129
</div>
132130
</div>
133131
<div className={classnames('col col--7', styles.exampleCode)}>
134-
<CodeBlock metastring="csharp" className="csharp">
132+
<CodeBlock language="csharp" className="csharp">
135133
{exampleCode}
136134
</CodeBlock>
137135
</div>
79.3 KB
Loading

0 commit comments

Comments
 (0)