Skip to content

Commit

Permalink
Add extra information in README
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuDeBuck committed Feb 14, 2021
1 parent 73b2a97 commit d10faa1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Go to your settings, under the *Connections*-tab, to create and edit API keys. M

```python
from journyio-sdk import HttpClientRequests
config = Config("api-key-secret", "https://api.journy.io") # second argument is not mandatory, defaults to this
config = Config("api-key-secret")
http_client = HttpClientRequests() # If wanted, an own implementation of the HttpClient interface can be created
client = Client(http_client, config)
```
Expand Down Expand Up @@ -93,6 +93,29 @@ if isinstance(result, Success):
print(result.data) # None
```

To get the cookies you can use:

*Flask*

```python
@app.route('/...')
def method():
device_id = request.cookies.get('__journey')
if device_id:
...
...
```

*Django*

```python
def method(request):
device_id = request.COOKIES.get('__journey')
if device_id:
...
...
```

#### Add event

```python
Expand Down

0 comments on commit d10faa1

Please sign in to comment.