mirror of
https://github.com/socialwifi/RouterOS-api.git
synced 2025-08-31 15:19:25 +02:00
Created How to use (markdown)
parent
d744d653c3
commit
9a823deb51
1 changed files with 16 additions and 0 deletions
16
How-to-use.md
Normal file
16
How-to-use.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
## Connection
|
||||||
|
`#! /usr/bin/python`
|
||||||
|
|
||||||
|
`import routeros_api`
|
||||||
|
`import collections`
|
||||||
|
|
||||||
|
`connection = routeros_api.RouterOsApiPool('api.megabit.mx', username='admin', password='Frecuencia@5.8')`
|
||||||
|
`api = connection.get_api()`
|
||||||
|
|
||||||
|
## Get Lists Queues
|
||||||
|
|
||||||
|
`list_queues = api.get_resource('/queue/simple', structure=collections.defaultdict(routeros_api.api_structure.StringField, disabled=routeros_api.api_structure.BooleanField())) `
|
||||||
|
|
||||||
|
`print (list_queues.get())`
|
||||||
|
|
||||||
|
`raw_input()`
|
Loading…
Add table
Add a link
Reference in a new issue