Skip to content

Commit 3437363

Browse files
committed
Api keys more content
1 parent 461c261 commit 3437363

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tutorial/api_keys.rst

+23
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ The following snippet shows an example of the creation and setup of the ``ApiCli
3333

3434
.. code-block:: python
3535
36+
# Python
37+
3638
import os
3739
from dotenv import load_dotenv()
3840
@@ -50,3 +52,24 @@ The following snippet shows an example of the creation and setup of the ``ApiCli
5052
}
5153
5254
api_client = sim.ApiClient(configuration)
55+
56+
57+
.. code-block:: csharp
58+
59+
// C#
60+
61+
using System;
62+
using SimScale.Sdk.Api;
63+
using SimScale.Sdk.Client;
64+
using SimScale.Sdk.Model;
65+
using dotenv.net;
66+
67+
DotEnv.Load();
68+
69+
var API_KEY = System.Environment.GetEnvironmentVariable("SIMSCALE_API_KEY")
70+
var API_HOST_URL = "https://api.simscale.com/v0"
71+
72+
Configuration configuration = new Configuration();
73+
74+
configuration.BasePath = API_HOST_URL
75+
configuration.ApiKey.Add("X-API-KEY", API_KEY)

0 commit comments

Comments
 (0)