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.
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 andlimit
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.