socialwifi / RouterOS-api

Python API to RouterBoard devices produced by MikroTik.
MIT License
255 stars 98 forks source link

Parameter after print #40

Closed marcelosantoro closed 4 years ago

marcelosantoro commented 5 years ago

Hi friends....

I Would like to know... how can i send parameters to "list = api.get_resource()" or "list.get()" commands

Example /interface print stats-detail or /ppp active print count-only

How can i get above results with RouterOS-api ???

marcelosantoro commented 5 years ago

nobody ??? :(

fernandolcx commented 5 years ago

Have you figured out how to do it?

marcelosantoro commented 5 years ago

Have you figured out how to do it?

Cara infelizmente ainda não consegui. :(

fernandolcx commented 5 years ago

Está tudo certo:

result = api.get_resource('interface/pppoe-server').call('print', arguments={'count-only': ''}, queries={'service': 'service10'})
print(json.dumps(result, indent=4))

mas retorna vazio. Se alterar count-only para detail funciona.

Behoston commented 4 years ago

THX @fernandolcx for the solution. I'm closing this issue for now. If you still have questions, feel free to reopen/comment.