We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

How to search OpenRepos from command line?

asked 2014-03-29 03:12:20 +0200

00prometheus gravatar image

updated 2014-07-31 14:23:06 +0200

jiit gravatar image

I come from the n900, so the way OpenRepos works - with one repository for each maintainer - is new to me. One thing I haven't figured out yet is how to search all Sailfish apps in OpenRepos from the command line. The Warehouse app is nice and all, and it does the job, but sometimes you just want to quickly check from the command line. Is there an 'all OpenRepos Sailfish apps repo' that I missed? Is there another way? Could anyone tell me how?

edit retag flag offensive close delete

Comments

Doesn't pkcon search name [package] do the job?

gabriel ( 2014-03-29 20:40:09 +0200 )edit

It just searches the repos I currently have subscribed to, but since each maintainer has their own repo, that just gives me apps that those maintainers have published, not all the rest

00prometheus ( 2014-03-29 20:42:09 +0200 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2014-03-30 11:30:21 +0200

Basil gravatar image

updated 2014-03-30 13:56:29 +0200

OpenRepos have web json API for clients (thats how Warehouse does work). It is not yet ready to go public, but some api calls you can use now. Some docs will be available here

You should pass request headers to get refined results:

  • "Warehouse-Platform: SailfishOS" to get sailfishos results, i.e. during search or category browse.
  • "Accept-Language: en" for your locale. if any specific content available, like desc or names, it will be used for response.

Base API url is https://openrepos.net/api/v1/

Sample calls:

  • apps/[id] for getting application info by it's id
  • search/apps for searching content. you should provide variables keys=my_search_word and optional page number page=1

Example: searhing for warehouse application: https://openrepos.net/api/v1/search/apps?keys=warehouse and you recieve json with some search results.

So, you can curl for search from console: curl --header "Warehouse-Platform: SailfishOS" https://openrepos.net/api/v1/search/apps?keys=warehouse+basil

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2014-03-29 03:12:20 +0200

Seen: 585 times

Last updated: Mar 30 '14