mirror of
https://github.com/socialwifi/RouterOS-api.git
synced 2025-09-01 07:30:13 +02:00
Reformat connection section to one block of code not individual lines.
parent
658a036112
commit
4044e525a5
1 changed files with 6 additions and 4 deletions
|
@ -1,10 +1,12 @@
|
||||||
## Connection
|
## Connection
|
||||||
`#! /usr/bin/python`
|
```
|
||||||
|
#! /usr/bin/python`
|
||||||
|
|
||||||
`import routeros_api`
|
import routeros_api
|
||||||
|
|
||||||
`connection = routeros_api.RouterOsApiPool('IP', username='admin', password='')`
|
connection = routeros_api.RouterOsApiPool('IP', username='admin', password='')
|
||||||
`api = connection.get_api()`
|
api = connection.get_api()
|
||||||
|
```
|
||||||
|
|
||||||
## Execute Commands Example:
|
## Execute Commands Example:
|
||||||
`api.get_binary_resource('/').call('tool/fetch',{ 'url': "https://dummy.url" })`
|
`api.get_binary_resource('/').call('tool/fetch',{ 'url': "https://dummy.url" })`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue