Skip to content

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

Description

@kelvinwelter

@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)```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions