adlio / trello

Trello API wrapper for Go
MIT License
220 stars 71 forks source link

update searchOptions Modifiers type #11

Closed luccacabra closed 6 years ago

luccacabra commented 6 years ago

I can't find this exactly in documentation as Trello doesn't document expected API responses (🤦‍♂️ ), but when calling the search endpoint locally and via this repo, I'm getting JSON errors:

json: cannot unmarshal object into Go struct field SearchOptions.modifiers of type string

and upon further inspection of the data returned by that endpoint:

$ > curl "https://api.trello.com/1/search?query=board:test&key=XXX&token=XXX" | jq .
{
  "options": {
    "terms": [],
    "modifiers": [
      {
        "text": "board:test"
      }
    ],
    "modelTypes": [],
    "partial": false
  }
}

it appears that the modifiers data type is indeed no longer an array of strings, but an array of map[string][string]s. I've updated the SearchOptions.modifiers type to reflect that change.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 70.072% when pulling 092a6c0745e50b5bd2829bb9fe0d79a470c315a2 on luccacabra:master into 47013893283bbc3b8d98f5f612c04a18f8ef227b on adlio:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 70.072% when pulling 092a6c0745e50b5bd2829bb9fe0d79a470c315a2 on luccacabra:master into 47013893283bbc3b8d98f5f612c04a18f8ef227b on adlio:master.

luccacabra commented 6 years ago

PR off of wrong branch - closing this one and opening correct one