Skip to content

Commit 931180a

Browse files
authored
Merge pull request #198 from lumapps/chore/fix-typos-in-sdk-docs
chore(sdk): fix additional typos in the SDK documentation
2 parents 7151467 + e9eab69 commit 931180a

File tree

4 files changed

+13
-38
lines changed

4 files changed

+13
-38
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ make docs-serve
103103
Then to deploy the doc you can run
104104

105105
```bash
106-
make doc-deploy
106+
make docs-deploy
107107
```
108108

109109

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ make docs-serve
103103
Then to deploy the doc you can run
104104

105105
```bash
106-
make doc-deploy
106+
make docs-deploy
107107
```
108108

109109

docs/authentication.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,9 @@ The first thing you'll need in order for you to be able to use the LumApps Api i
44

55
You can see them [here](https://apiv1.lumapps.com/#tag/Authentication)
66

7-
The LumApps sdk can help you when using a service account or a regular token, all you have to do is to give the sdk the credentials infos and the subsequent calls made by the tool will be authenticated using those credentials.
7+
The LumApps SDK requires an OAuth application to be set up on your LumApps platform (see how to do that in the [LumApps Developer Portal](https://developer.lumapps.com/documentation/oauth.html). Once it is done, all you have to do is to give the sdk the credentials infos and the subsequent calls made by the tool will be authenticated using those credentials.
88

9-
Be sure to target the right lumapps environment. Refer to the [environment documentation](https://lumapps.github.io/lumapps-sdk/environment) first.
10-
11-
## Using a regular token
12-
13-
To authenticate with a regular, short lived accesss token, instantiate the sdk like so:
14-
15-
```python
16-
from lumapps.api.base_client import BaseClient
17-
18-
client = base_client = BaseClient(
19-
api_info={"base_url": "https://your-cell.api.lumapps.com"},
20-
auth_info={
21-
"client_id": "your-client-id",
22-
"client_secret": "your-client-secret"
23-
}
24-
)
25-
```
9+
Be sure to target the right LumApps environment. Refer to the [environment documentation](https://lumapps.github.io/lumapps-sdk/environment) first.
2610

2711
## Using an application
2812

docs/index.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lumapps SDK
22

3-
<p align="center">
3+
<p style="text-align:center">
44
<a href="https://github.com/lumapps/lumapps-sdk/actions?query=workflow%3ACI"><img alt="Action Status" src="https://github.com/lumapps/lumapps-sdk/workflows/CI/badge.svg"></a>
55
<a href="https://pypi.org/project/lumapps-sdk/"><img alt="Pypi" src="https://img.shields.io/pypi/v/lumapps-sdk"></a>
66
<a href="https://codecov.io/gh/lumapps/lumapps-sdk/branch/master"><img alt="Coverage" src="https://codecov.io/gh/lumapps/lumapps-sdk/branch/master/graph/badge.svg"></a>
@@ -9,7 +9,7 @@
99
</p>
1010

1111

12-
LumApps SDK is a set of tools to manipulate the [LumApps API](https://api.lumapps.com/docs/start)
12+
LumApps SDK is a set of tools to manipulate the [LumApps API](https://apiv1.lumapps.com/)
1313

1414
This includes:
1515

@@ -29,29 +29,20 @@ Python >= 3.8
2929

3030
## Getting started
3131

32-
1. Get your token
32+
1. Set up your OAuth application
3333

34-
LumApps supports multiple ways of authentication.
35-
The fastest one to implement is the following:
36-
37-
Get your token by logging to your LumApps account.
38-
Once connected on your platform, open the javascript console of your browser and run:
39-
40-
```javascript
41-
fetch(window.location.origin+"/service/user/token", {method: "POST"})
42-
.then(data => {return data.json()})
43-
.then(res => {console.log(res.token)});
44-
```
45-
46-
This will generate your personal LumApps token that will be active for 60 minutes, and that we will use in the following steps
34+
Before anything else, you need to set up an OAuth application by following the steps in the [LumApps Developer Portal](https://developer.lumapps.com/documentation/oauth.html).
4735

4836
2. Authenticate
4937

38+
Once your application set up, get a hand on its client ID and secret, then you can write the following
39+
to get an access token for a particular user.
5040
```python
5141
from lumapps.api import BaseClient
5242

43+
token = "MY TOKEN"
5344
base_client = BaseClient(
54-
api_info={"base_url": "https://go-cell-001.api.lumapps.com"},
45+
api_info={"base_url": "https://your-cell.api.lumapps.com"}, # e.g. "https://go-cell-001.api.lumapps.com"
5546
auth_info={
5647
"client_id": "your-client-id",
5748
"client_secret": "your-client-secret"
@@ -76,7 +67,7 @@ The SDK documentation is available [here](https://lumapps.github.io/lumapps-sdk/
7667

7768
## Code convention
7869

79-
Docstring in PEP 484 type annotations format adapted to python 2.7 using comments.
70+
Docstring in PEP 484 type annotations format adapted to python 3.x using comments.
8071

8172
## How to get help, contribute, or provide feedback
8273

0 commit comments

Comments
 (0)