Update README.md

add login,logout example to readme
This commit is contained in:
onyx-and-iris 2022-03-20 12:26:01 +00:00
parent 6c914dafbe
commit 80048d62bd

View File

@ -32,7 +32,6 @@ pip install -e .['development']
``` ```
#### Use with a context manager: #### Use with a context manager:
It is advised to use this code with a context manager.
Parameter coverage is not as extensive for the RT Packet Service as with the Remote API. Parameter coverage is not as extensive for the RT Packet Service as with the Remote API.
### Example 1 ### Example 1
@ -66,6 +65,31 @@ if __name__ == '__main__':
main() main()
``` ```
#### Or perform setup/teardown independently:
for example:
### Example 2
```python
import vbancmd
kind_id = 'potato'
ip = '<ip address>'
vban = vbancmd.connect(kind_id, ip=ip)
# call login() at the start of your code
vban.login()
# Toggle mute for leftmost input strip
vban.strip[0].mute = not vban.strip[0].mute
# Toggle eq for leftmost output bus
vban.bus[0].eq = not vban.bus[0].eq
# call logout() at the end of your code
vban.logout()
```
## API ## API
### Kinds ### Kinds
A *kind* specifies a major Voicemeeter version. Currently this encompasses A *kind* specifies a major Voicemeeter version. Currently this encompasses