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).
|
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**
|
> 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)
|
||||||
>
|
|
||||||
> - **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.
|
|
||||||
|
|
||||||
## Step 1: Install client SDK
|
## Step 1: Install client SDK
|
||||||
|
|
||||||
|
@ -3,12 +3,7 @@ id: go_sdk
|
|||||||
title: GO SDK
|
title: GO SDK
|
||||||
---
|
---
|
||||||
|
|
||||||
> **Required details**
|
> 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)
|
||||||
>
|
|
||||||
> - **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.
|
|
||||||
|
|
||||||
### 1. Install unleash-client-go
|
### 1. Install unleash-client-go
|
||||||
|
|
||||||
@ -38,7 +33,7 @@ func init() {
|
|||||||
unleash.WithListener(&unleash.DebugListener{}),
|
unleash.WithListener(&unleash.DebugListener{}),
|
||||||
unleash.WithAppName("my-application"),
|
unleash.WithAppName("my-application"),
|
||||||
unleash.WithUrl("http://unleash.herokuapp.com/api/"),
|
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
|
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)
|
- [Java SDK](./java_sdk)
|
||||||
- [Node.js SDK](./node_sdk)
|
- [Node.js SDK](./node_sdk)
|
||||||
@ -17,7 +15,9 @@ We have examples for all official client SDKs:
|
|||||||
- [Ruby SDK](./ruby_sdk)
|
- [Ruby SDK](./ruby_sdk)
|
||||||
- [Python SDK](./python_sdk)
|
- [Python SDK](./python_sdk)
|
||||||
- [.Net SDK](./dot_net_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:
|
### 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).
|
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**
|
> 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)
|
||||||
>
|
|
||||||
> - **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.
|
|
||||||
|
|
||||||
## Step 1: Install the client SDK
|
## 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).
|
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**
|
> 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)
|
||||||
>
|
|
||||||
> - **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.
|
|
||||||
|
|
||||||
## Step 1: Install the client SDK
|
## Step 1: Install the client SDK
|
||||||
|
|
||||||
|
@ -3,12 +3,7 @@ id: python_sdk
|
|||||||
title: Python SDK
|
title: Python SDK
|
||||||
---
|
---
|
||||||
|
|
||||||
> **Required details**
|
> 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)
|
||||||
>
|
|
||||||
> - **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.
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from UnleashClient import UnleashClient
|
from UnleashClient import UnleashClient
|
||||||
@ -16,7 +11,7 @@ from UnleashClient import UnleashClient
|
|||||||
client = UnleashClient(
|
client = UnleashClient(
|
||||||
url="<API url>",
|
url="<API url>",
|
||||||
app_name="my-python-app",
|
app_name="my-python-app",
|
||||||
custom_headers={'Authorization': '<Client secret>'})
|
custom_headers={'Authorization': '<API token>'})
|
||||||
|
|
||||||
client.initialize_client()
|
client.initialize_client()
|
||||||
|
|
||||||
|
@ -3,12 +3,7 @@ id: ruby_sdk
|
|||||||
title: Ruby SDK
|
title: Ruby SDK
|
||||||
---
|
---
|
||||||
|
|
||||||
> **Required details**
|
> 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)
|
||||||
>
|
|
||||||
> - **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.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
require 'unleash'
|
require 'unleash'
|
||||||
@ -16,7 +11,7 @@ title: Ruby SDK
|
|||||||
@unleash = Unleash::Client.new(
|
@unleash = Unleash::Client.new(
|
||||||
url: '<API url>',
|
url: '<API url>',
|
||||||
app_name: 'simple-test',
|
app_name: 'simple-test',
|
||||||
custom_http_headers = {'Authorization': '<Client secret>'},
|
custom_http_headers = {'Authorization': '<API token>'},
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user