pebble-dev / rebblestore-api

Rebble Store api code.
MIT License
39 stars 8 forks source link

Added AppsHandler endpoint #26

Closed phpeter closed 7 years ago

phpeter commented 7 years ago

In this pull request I've added the AppsHandler endpoint, which serves a list of apps.

It has 3 parameters: page, limit, sortby, and order.

Page and limit are used together to determine the pagination. For example, if you set page to 3 and limit to 20, it will give you 20 results, and skip the first 40 (assuming you've gone through 2 previous pages with a limit of 20).

Sortby and order allow you to sort by thumbs_up or published_date, ascending or descending.

Also, I changed the imports for local packages to have the "github.com/" prefix. I'm also open to changing this, but I believe this way is more idiomatic. Again, open to other opinions.

azertyfun commented 7 years ago

Oops, tried fixing the merge conflict but I realized you have an older version of collection.go. Please merge origin/master and you'll be set ^^

phpeter commented 7 years ago

It should be merged now.