Skip to content

Commit

Permalink
Fix and Update examples.py
Browse files Browse the repository at this point in the history
Signed-off-by: Musilah <nataleigh.nk@gmail.co>
  • Loading branch information
Musilah committed Aug 24, 2023
1 parent 77203fe commit f504709
Show file tree
Hide file tree
Showing 8 changed files with 573 additions and 144 deletions.
20 changes: 10 additions & 10 deletions docs/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L9"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L8"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `Channels`




<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L14"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L13"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `__init__`

Expand All @@ -35,7 +35,7 @@ __init__(url: str)

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L17"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L16"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `create`

Expand All @@ -47,7 +47,7 @@ Creates channel entity in the database

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L34"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L33"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `create_bulk`

Expand All @@ -59,7 +59,7 @@ Creates multiple channels in a bulk

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L116"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L115"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `disable`

Expand All @@ -71,7 +71,7 @@ Deletes a channel entity from database

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L51"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L50"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `get`

Expand All @@ -83,7 +83,7 @@ Gets a channel entity for a logged-in user

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L67"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L66"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `get_all`

Expand All @@ -95,7 +95,7 @@ Gets all channels from database

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L84"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L83"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `get_by_thing`

Expand All @@ -107,7 +107,7 @@ Gets all channels to which a specific thing is connected to

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L131"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L129"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `identify_thing`

Expand All @@ -119,7 +119,7 @@ Validates thing's key and returns it's ID if key is valid

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L101"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/channels.py#L100"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `update`

Expand Down
12 changes: 6 additions & 6 deletions docs/groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ __init__(url: str)

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L154"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L152"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `assign`

Expand Down Expand Up @@ -71,7 +71,7 @@ Creates group entity in the database

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L186"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L184"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `disable`

Expand Down Expand Up @@ -107,7 +107,7 @@ Gets all groups from database

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L119"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L118"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `members`

Expand All @@ -119,7 +119,7 @@ Get list of members ID's from group

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L136"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L135"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `memberships`

Expand All @@ -143,7 +143,7 @@ Gets parents for a specific group from database

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L200"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L198"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `share_groups`

Expand All @@ -155,7 +155,7 @@ Adds access rights on thing groups to the user group

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L170"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/groups.py#L168"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `unassign`

Expand Down
70 changes: 65 additions & 5 deletions docs/things.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,19 @@ __init__(url: str)

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L166"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L271"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `authorise_thing`

```python
authorise_thing(access_request: dict, token: str)
```

Authorises thing

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L217"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `connect`

Expand All @@ -47,7 +59,7 @@ Connects thing and channel

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L130"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L183"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `connects`

Expand Down Expand Up @@ -83,7 +95,7 @@ Creates multiple things in a bulk

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L116"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L169"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `disable`

Expand All @@ -95,7 +107,7 @@ Deletes a thing entity from database

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L185"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L235"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `disconnect`

Expand All @@ -107,7 +119,7 @@ Disconnect thing and channel

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L149"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L201"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `disconnects`

Expand Down Expand Up @@ -155,6 +167,18 @@ Gets all things to which a specific thing is connected to

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L251"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `share_thing`

```python
share_thing(user_id: str, channel_id: str, actions: dict, token: str)
```

Share thing

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L101"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `update`
Expand All @@ -165,6 +189,42 @@ update(thing_id: str, thing: dict, token: str)

Updates thing entity

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L152"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `update_thing_owner`

```python
update_thing_owner(thing_id: str, thing: dict, token: str)
```

Updates thing secret

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L118"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `update_thing_secret`

```python
update_thing_secret(thing_id: str, thing: dict, token: str)
```

Updates thing secret

---

<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/things.py#L135"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `update_thing_tags`

```python
update_thing_tags(thing_id: str, thing: dict, token: str)
```

Updates thing secret




Expand Down
Loading

0 comments on commit f504709

Please sign in to comment.