mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: update SDK examples
This commit is contained in:
parent
bcc2d913cc
commit
360defe625
@ -5,12 +5,7 @@ title: .net SDK
|
||||
|
||||
In this guide we explain how to use feature toggles in a .NET application using Unleash-hosted. We will be using the open source Unleash [.net Client SDK](https://github.com/Unleash/unleash-client-dotnet).
|
||||
|
||||
> **Required details**
|
||||
>
|
||||
> - **API URL** – Where you should connect your client SDK
|
||||
> - **API Secret** – [Your API secret required to connect to your instance](../user_guide/api-token).
|
||||
>
|
||||
> You can find this information in the “Admin” section Unleash management UI.
|
||||
> You will need your `API URL` and your `API token` in order to connect the Client SDK to you Unleash instance. You can find this information in the “Admin” section Unleash management UI. [Read more](../user_guide/api-token)
|
||||
|
||||
## Step 1: Install client SDK
|
||||
|
||||
|
@ -3,12 +3,7 @@ id: go_sdk
|
||||
title: GO SDK
|
||||
---
|
||||
|
||||
> **Required details**
|
||||
>
|
||||
> - **API URL** – Where you should connect your client SDK
|
||||
> - **API Secret** – [Your API secret required to connect to your instance](../user_guide/api-token).
|
||||
>
|
||||
> You can find this information in the “Admin” section Unleash management UI.
|
||||
> You will need your `API URL` and your `API token` in order to connect the Client SDK to you Unleash instance. You can find this information in the “Admin” section Unleash management UI. [Read more](../user_guide/api-token)
|
||||
|
||||
### 1. Install unleash-client-go
|
||||
|
||||
@ -38,7 +33,7 @@ func init() {
|
||||
unleash.WithListener(&unleash.DebugListener{}),
|
||||
unleash.WithAppName("my-application"),
|
||||
unleash.WithUrl("http://unleash.herokuapp.com/api/"),
|
||||
unleash.WithCustomHeaders(http.Header{"Authorization": {"<Client secret>"}}),
|
||||
unleash.WithCustomHeaders(http.Header{"Authorization": {"<API token>"}}),
|
||||
)
|
||||
}
|
||||
```
|
||||
|
@ -3,13 +3,11 @@ id: index
|
||||
title: Introduction
|
||||
---
|
||||
|
||||
In order to connect your application to Unleash you need to use a client SDK (software developer kit) for your programming language. The SDK will handle connecting to the Unleash server instance and retrieve feature toggles based upon your configuration. Both open-source and the Unleash enterprise offering utilize the same set of client SDKs.
|
||||
In order to connect your application to Unleash you need to use a client SDK (software developer kit) for your programming language. In addition you will need a [API token](../user_guide/api-token). The SDK will handle connecting to the Unleash server instance and retrieve feature toggles based upon your configuration. Both open-source and the Unleash enterprise offering utilize the same set of client SDKs.
|
||||
|
||||
If you are an Unleash customer, our hosted instances will always be a protected instance, you will therefore have to specify a client secret as the authorization header when you are connecting your client SDK, which you will receive from us when you sign up for one of our packages. In the open source version you must generate your own secret.
|
||||
On this page you will find examples for connecting your application to the demo instance. If you are connecting to your own private instance you will have to remember to replace the `API token` and the `API url` given in the examples.
|
||||
|
||||
On this page you will find examples for connecting your application to the demo instance. If you are connecting to your own private instance you will have to remember to replace the client secret and the API url given in the examples.
|
||||
|
||||
We have examples for all official client SDKs:
|
||||
We have examples for all _official client SDKs_:
|
||||
|
||||
- [Java SDK](./java_sdk)
|
||||
- [Node.js SDK](./node_sdk)
|
||||
@ -17,7 +15,9 @@ We have examples for all official client SDKs:
|
||||
- [Ruby SDK](./ruby_sdk)
|
||||
- [Python SDK](./python_sdk)
|
||||
- [.Net SDK](./dot_net_sdk)
|
||||
- [Javascript SDK](https://github.com/unleash-hosted/unleash-proxy-client-js) (Used by single-page applications)
|
||||
- [Javascript SDK](./proxy-javascript) (Used by single-page applications)
|
||||
- Android SDK (coming soon)
|
||||
- iOS SDK (coming soon)
|
||||
|
||||
### Clients written by awesome enthusiasts:
|
||||
|
||||
|
@ -5,12 +5,7 @@ title: Java SDK
|
||||
|
||||
In this guide we explain how to use feature toggles in a Java application using Unleash-hosted. We will be using the open source Unleash [Java Client SDK](https://github.com/Unleash/unleash-client-java).
|
||||
|
||||
> **Required details**
|
||||
>
|
||||
> - **API URL** – Where you should connect your client SDK
|
||||
> - **API Secret** – [Your API secret required to connect to your instance](../user_guide/api-token).
|
||||
>
|
||||
> You can find this information in the “Admin” section Unleash management UI.
|
||||
> You will need your `API URL` and your `API token` in order to connect the Client SDK to you Unleash instance. You can find this information in the “Admin” section Unleash management UI. [Read more](../user_guide/api-token)
|
||||
|
||||
## Step 1: Install the client SDK
|
||||
|
||||
|
@ -5,12 +5,7 @@ title: Node SDK
|
||||
|
||||
In this guide we explain how to use feature toggles in a Node application using Unleash-hosted. We will be using the open source Unleash [Node.js Client SDK](https://github.com/Unleash/unleash-client-node).
|
||||
|
||||
> **Required details**
|
||||
>
|
||||
> - **API URL** – Where you should connect your client SDK
|
||||
> - **API Secret** – [Your API secret required to connect to your instance](../user_guide/api-token).
|
||||
>
|
||||
> You can find this information in the “Admin” section Unleash management UI.
|
||||
> You will need your `API URL` and your `API token` in order to connect the Client SDK to you Unleash instance. You can find this information in the “Admin” section Unleash management UI. [Read more](../user_guide/api-token)
|
||||
|
||||
## Step 1: Install the client SDK
|
||||
|
||||
|
@ -3,12 +3,7 @@ id: python_sdk
|
||||
title: Python SDK
|
||||
---
|
||||
|
||||
> **Required details**
|
||||
>
|
||||
> - **API URL** – Where you should connect your client SDK
|
||||
> - **API Secret** – [Your API secret required to connect to your instance](../user_guide/api-token).
|
||||
>
|
||||
> You can find this information in the “Admin” section Unleash management UI.
|
||||
> You will need your `API URL` and your `API token` in order to connect the Client SDK to you Unleash instance. You can find this information in the “Admin” section Unleash management UI. [Read more](../user_guide/api-token)
|
||||
|
||||
```python
|
||||
from UnleashClient import UnleashClient
|
||||
@ -16,7 +11,7 @@ from UnleashClient import UnleashClient
|
||||
client = UnleashClient(
|
||||
url="<API url>",
|
||||
app_name="my-python-app",
|
||||
custom_headers={'Authorization': '<Client secret>'})
|
||||
custom_headers={'Authorization': '<API token>'})
|
||||
|
||||
client.initialize_client()
|
||||
|
||||
|
@ -3,12 +3,7 @@ id: ruby_sdk
|
||||
title: Ruby SDK
|
||||
---
|
||||
|
||||
> **Required details**
|
||||
>
|
||||
> - **API URL** – Where you should connect your client SDK
|
||||
> - **API Secret** – [Your API secret required to connect to your instance](../user_guide/api-token).
|
||||
>
|
||||
> You can find this information in the “Admin” section Unleash management UI.
|
||||
> You will need your `API URL` and your `API token` in order to connect the Client SDK to you Unleash instance. You can find this information in the “Admin” section Unleash management UI. [Read more](../user_guide/api-token)
|
||||
|
||||
```sh
|
||||
require 'unleash'
|
||||
@ -16,7 +11,7 @@ title: Ruby SDK
|
||||
@unleash = Unleash::Client.new(
|
||||
url: '<API url>',
|
||||
app_name: 'simple-test',
|
||||
custom_http_headers = {'Authorization': '<Client secret>'},
|
||||
custom_http_headers = {'Authorization': '<API token>'},
|
||||
)
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user