0

I have the endpoint which lists all games which include {name} parameter and what I want to implement currently is to give user an option of choosing the ordering of the results.

games?name={game}

Something similar as:

games?name={game}&order={order}

you can see the partial implementation of my endpoint. Currently api:orderBy is statically written.

api:selector [
    api:where " ?item a epic:Game . ?item epic:Name ?name . FILTER (regex(?name, ?game, 'i')) " ;
    api:orderBy "DESC(?name)"
]
.

I am using ELDA.

mr. Holiday
  • 1,780
  • 2
  • 19
  • 37
  • 1
    See the [Elda cribsheet](http://epimorphics.github.io/elda/current/cribsheet.html) either _sort or _orderBy parameters look like they might be what you are looking for. – chrisis Dec 01 '15 at 13:49
  • @chrisis Not actually what i was looking for but yeah I ended up using them – mr. Holiday Dec 01 '15 at 13:50

0 Answers0