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

update searchOptions Modifiers type #12

Merged
merged 1 commit into from
Mar 21, 2018

Conversation

luccacabra
Copy link

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
Copy link

coveralls commented Mar 14, 2018

Coverage Status

Coverage remained the same at 70.072% when pulling 092a6c0 on luccacabra:searchOptions-modifier into 4701389 on adlio:master.

@adlio
Copy link
Owner

adlio commented Mar 14, 2018

Thanks for the contribution. Bug me if I don't review for merge within a few days. Hoping to review it today or tomorrow.

@adlio
Copy link
Owner

adlio commented Mar 21, 2018

Looks good. Some additional test coverage for this would be great, but it dovetails with some testing I'm planning to do. Going to merge as-is.

@adlio adlio merged commit 69735ad into adlio:master Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants