Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter parameter doesn't working for list() functions #13

Open
kelvinwelter opened this issue Sep 6, 2019 · 0 comments
Open

Filter parameter doesn't working for list() functions #13

kelvinwelter opened this issue Sep 6, 2019 · 0 comments
Labels

Comments

@kelvinwelter
Copy link
Contributor

kelvinwelter commented Sep 6, 2019

@felipefdl

Problem: I was trying to create a function to list devices by tag with a Python parsing. However, every attempt I made to create this function returned all devices to me. Like I'm not passing a filter to the function. The code for this is below:

from tago import Tago
import json
ACCOUNT_TOKEN = '9740f4d7-6031-4195-8ad4-4bc73e25c79e'
account_devices = Devices(ACCOUNT_TOKEN)
tags = [{
  'key': 'analysis',
  'value': 'geotraq',
}]

my_filter = {
  'tags': tags
}

devices = account_devices.list(1, ['id', 'tags'], my_filter, 1000)
print(devices)```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant