cyclestreets / cyclescape

Cyclescape - cycle campaign group toolkit
https://www.cyclescape.org/
MIT License
33 stars 15 forks source link

API for search issues #921

Closed mvl22 closed 4 years ago

mvl22 commented 4 years ago

The StreetFocus integration needs an API so that we can search for issues.

nikolai-b commented 4 years ago

So you want to add a search term to: https://www.cyclescape.org/api#!/issues/getApiIssues

Do you want the title and the issue body searched?

mvl22 commented 4 years ago

Sorry, yes, spec wasn't clear. Basically just a name search, giving the same result as the Issues tab at:

https://camcycle.cyclescape.org/overview/search?utf8=%E2%9C%93&query=chisholm+trail&button=#issue-results

which presumably searches title and issue body indeed. Essentially we just need an API equivalent to that UI result.

nikolai-b commented 4 years ago

This is not equivalent as the order will not be the same but I've added a search term.

mvl22 commented 4 years ago

A search for 'chisholm trail' seems to give the same result 6 times over. I wonder if this is getting each thread rather than the issue itself.

/api/issues?per_page=10&term=chisholm%20trail