Skip to content

Commit 1daa8fb

Browse files
authored
Merge pull request #36 from kzosabe/develop
Release v0.3.0
2 parents e50c9ef + 3466e59 commit 1daa8fb

23 files changed

Lines changed: 1326 additions & 273 deletions

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
labels:
8+
- "github-actions"
9+
- "dependencies"
10+
11+
- package-ecosystem: "pip"
12+
directory: "/"
13+
schedule:
14+
interval: "monthly"
15+
labels:
16+
- "pip"
17+
- "dependencies"

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
__pycache__/
22
*.py[cod]
33
*$py.class
4-
build/
5-
dist/
4+
/build/
5+
/dist/
6+
/docs/_build
67
/.tox
78
.idea
89
!.keep

.readthedocs.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-20.04
5+
tools:
6+
python: "3.9"
7+
8+
sphinx:
9+
configuration: docs/conf.py

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
0.3.0, 2021-11-27
2+
-------------------------
3+
4+
- API Interface Change
5+
- Use SwitchBotClient instead of SwitchBotAPIClient in all public method arguments
6+
- Add control and status methods for each device classes
7+
18
0.2.0, 2021-10-30
29
-------------------------
310

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ https://github.com/OpenWonderLabs/SwitchBotAPI#get-device-status
116116
### Control Device
117117

118118
```python
119-
from switchbot_client import SwitchBotAPIClient
119+
from switchbot_client import SwitchBotClient
120120
from switchbot_client.devices import Light
121121

122-
client = SwitchBotAPIClient()
122+
client = SwitchBotClient()
123123
device_id = "12345" # My Light(virtual infrared remote devices)
124124
device = Light.create_by_id(client, device_id)
125125
print(device.turn_on())

docs/conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import os
2+
import sys
3+
sys.path.insert(0, os.path.abspath("../switchbot_client"))
4+
5+
project = "switchbot-client"
6+
copyright = "2021, kzosabe"
7+
author = "kzosabe"
8+
release = "0.3.0"
9+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"]
10+
templates_path = ["_templates"]
11+
exclude_patterns = ["_build", ".DS_Store"]
12+
html_theme = "alabaster"
13+
html_static_path = []

docs/index.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.. switchbot-client documentation master file, created by
2+
sphinx-quickstart on Sat Nov 20 11:59:46 2021.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
switchbot-client
7+
==================
8+
9+
An unofficial Python client implementation of the SwitchBot API.
10+
11+
https://github.com/kzosabe/switchbot-client
12+
13+
14+
.. toctree::
15+
:maxdepth: 2
16+
:caption: Contents:
17+
18+
modules
19+
20+
Indices and tables
21+
==================
22+
23+
* :ref:`genindex`
24+
* :ref:`modindex`
25+
* :ref:`search`

docs/modules.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
switchbot_client
2+
================
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
switchbot_client

docs/switchbot_client.devices.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
switchbot\_client.devices package
2+
=================================
3+
4+
Submodules
5+
----------
6+
7+
switchbot\_client.devices.base module
8+
-------------------------------------
9+
10+
.. automodule:: switchbot_client.devices.base
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
switchbot\_client.devices.factory module
16+
----------------------------------------
17+
18+
.. automodule:: switchbot_client.devices.factory
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
switchbot\_client.devices.physical module
24+
-----------------------------------------
25+
26+
.. automodule:: switchbot_client.devices.physical
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
switchbot\_client.devices.remote module
32+
---------------------------------------
33+
34+
.. automodule:: switchbot_client.devices.remote
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
switchbot\_client.devices.status module
40+
---------------------------------------
41+
42+
.. automodule:: switchbot_client.devices.status
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
Module contents
48+
---------------
49+
50+
.. automodule:: switchbot_client.devices
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:

docs/switchbot_client.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
switchbot\_client package
2+
=========================
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
switchbot_client.devices
11+
switchbot_client.scenes
12+
13+
Submodules
14+
----------
15+
16+
switchbot\_client.api module
17+
----------------------------
18+
19+
.. automodule:: switchbot_client.api
20+
:members:
21+
:undoc-members:
22+
:show-inheritance:
23+
24+
switchbot\_client.client module
25+
-------------------------------
26+
27+
.. automodule:: switchbot_client.client
28+
:members:
29+
:undoc-members:
30+
:show-inheritance:
31+
32+
switchbot\_client.constants module
33+
----------------------------------
34+
35+
.. automodule:: switchbot_client.constants
36+
:members:
37+
:undoc-members:
38+
:show-inheritance:
39+
40+
switchbot\_client.enums module
41+
------------------------------
42+
43+
.. automodule:: switchbot_client.enums
44+
:members:
45+
:undoc-members:
46+
:show-inheritance:
47+
48+
switchbot\_client.types module
49+
------------------------------
50+
51+
.. automodule:: switchbot_client.types
52+
:members:
53+
:undoc-members:
54+
:show-inheritance:
55+
56+
Module contents
57+
---------------
58+
59+
.. automodule:: switchbot_client
60+
:members:
61+
:undoc-members:
62+
:show-inheritance:

0 commit comments

Comments
 (0)