ClickPackageIndex
|
Size: 54
Comment:
|
Size: 7933
Comment: Missed most of it the first time; copied the rest.
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| Describe AppStore/Interfaces/ClickPackageIndex here. | = Click package index = ''Contact: James Tait (JamesTait)'' * Solr-backed repository for Click Application metadata * Public front-end will serve as access control, apply sane defaults and massage request and response for ease of use. * Interfaces with: * Software Centre Agent * App developer defines app in Software Centre website * App developer uploads packaged app * Software Centre Agent pushes metadata to Click Package Index * First iteration, metadata is entered by developer * Later to be harvested from Click Manifest * Dash * "Surfacing", i.e. first view of app lens before querying * "Search", i.e. list of apps that match search criteria * "Detail", i.e. full metadata for a given app === Solr Schema === ==== Field Types ==== || '''Name''' || '''Class''' || || string || solr.StrField || || boolean || solr.BoolField || || float || solr.TrieFloatField || || long || solr.TrieLongField || || date || solr.TrieDateField || || url || solr.StrField || || text_general || solr.TextField || || payloads || solr.TextField || ==== Fields ==== || '''Name''' || '''Type''' || '''Multi-value''' || '''Searchable''' || '''Retrievable''' || '''Required''' || '''Unique''' || || id || string || false || true || true || true || true || || title || text_general || false || true || true || true || false || || description || text_general || false || true || true || true || false || || price || float || false || true || true || false || false || || package_name || text_general || false || true || true || true || true || || binary_filesize || long || false || false || true || false || false || || icon_url || url || false || false || true || false || false || || icon_urls || payloads || true || true || true || false || false || || screenshot_url || url || false || false || true || false || false || || screenshot_urls || url || true || false || true || false || false || || terms_of_service || text_general || false || false || true || false || false || || support_url || url || false || false || true || false || false || || license || text_general || false || true || true || true || false || || date_published || date || false || true || true || false || false || || video_urls || url || true || false || true || false || false || || license_key_path || string || false || false || true || false || false || || requires_license_key || boolean || false || true || true || false || false || || version || string || false || true || true || true || false || || website || url || false || false || true || false || false || || company_name || text_general || false || true || true || false || false || || keywords || text_general || true || true || true || false || false || || click_version || string || false || true || true || true || false || || click_framework || string || true || true || true || true || false || || click_updown_url || url || false || false || true || true || false || || countries_to_distribute || string || true || true || false || false || false || || text || text_general || true || true || false || false || false || === API === Guiding principles: * JSON-based * Discoverable * Browseable ==== API Root ==== `/api/v1` Provides clickable links to the other endpoints for discoverability. ===== Request ===== {{{ GET /api/v1 HTTP/1.1 Host: click.ubuntu.com }}} ===== Response ===== {{{ HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "search": "http://click.ubuntu.com/api/v1/search", "package": "http://click.ubuntu.com/api/v1/package" } }}} ==== Search ==== `/api/v1/search` Proxies requests to Solr's SearchHandler. A subset of the standard Solr syntax is used for querying. ===== Request ===== {{{ GET /api/v1/search?q=click_framework:ubuntu-sdk-13.10,description:awesome&wt=json&fl=id,title,description,price,icon_url HTTP/1.1 Host: click.ubuntu.com }}} ===== Response ===== {{{ HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "responseHeader":{ "status":0, "QTime":1, "params":{ "fl": "id,title,description,price,icon_url", "indent":"on", "start":"0", "q":"click_framework:ubuntu-sdk-13.10,description:awesome", "wt":"json", "version":"2.2", "rows":"10" } }, "response":{ "numFound":2, "start":0, "docs":[ { "id": "1", "title": "Awesome Launcher", "description": "This is an awesome launcher.", "price": 1.99, "icon_url": "http://example.org/media/awesomelauncher/icons/icon16.png", "resource_url": "http://click.ubuntu.com/api/v1/package/1" }, { "id": "2", "title": "Awesome Widget", "description": "This is an awesome widget.", "price": 1.99, "icon_url": "http://example.org/media/awesomewidget/icons/icon16.png", "resource_url": "http://click.ubuntu.com/api/v1/package/2" } ] } } }}} ==== Details ==== `/api/v1/package` Requests details for a specific package. Cleans the query string to ensure the user cannot be tricked into installing the wrong package, and enforces a single item in the response. ===== Request ===== {{{ GET /api/v1/package/2?wt=json&fl=id,title,description,price,icon_url HTTP/1.1 Host: click.ubuntu.com }}} ===== Response ===== {{{ HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "responseHeader":{ "status":0, "QTime":1, "params":{ "fl": "id,title,description,price,icon_url", "indent":"on", "start":"0", "q":"id:2", "wt":"json", "version":"2.2", "rows":"1" } }, "response":{ "numFound":1, "start":0, "docs":[ { "id": "2", "title": "Awesome Widget", "description": "This is an awesome widget.", "price": 1.99, "icon_url": "http://example.org/media/awesomewidget/icons/icon16.png", } ] } } }}} |
Click package index
Contact: James Tait (JamesTait)
- Solr-backed repository for Click Application metadata
- Public front-end will serve as access control, apply sane defaults and massage request and response for ease of use.
- Interfaces with:
- Software Centre Agent
- App developer defines app in Software Centre website
- App developer uploads packaged app
- Software Centre Agent pushes metadata to Click Package Index
- First iteration, metadata is entered by developer
- Later to be harvested from Click Manifest
- Dash
- "Surfacing", i.e. first view of app lens before querying
- "Search", i.e. list of apps that match search criteria
- "Detail", i.e. full metadata for a given app
- Software Centre Agent
Solr Schema
Field Types
Name |
Class |
string |
solr.StrField |
boolean |
solr.BoolField |
float |
solr.TrieFloatField |
long |
solr.TrieLongField |
date |
solr.TrieDateField |
url |
solr.StrField |
text_general |
solr.TextField |
payloads |
solr.TextField |
Fields
Name |
Type |
Multi-value |
Searchable |
Retrievable |
Required |
Unique |
id |
string |
false |
true |
true |
true |
true |
title |
text_general |
false |
true |
true |
true |
false |
description |
text_general |
false |
true |
true |
true |
false |
price |
float |
false |
true |
true |
false |
false |
package_name |
text_general |
false |
true |
true |
true |
true |
binary_filesize |
long |
false |
false |
true |
false |
false |
icon_url |
url |
false |
false |
true |
false |
false |
icon_urls |
payloads |
true |
true |
true |
false |
false |
screenshot_url |
url |
false |
false |
true |
false |
false |
screenshot_urls |
url |
true |
false |
true |
false |
false |
terms_of_service |
text_general |
false |
false |
true |
false |
false |
support_url |
url |
false |
false |
true |
false |
false |
license |
text_general |
false |
true |
true |
true |
false |
date_published |
date |
false |
true |
true |
false |
false |
video_urls |
url |
true |
false |
true |
false |
false |
license_key_path |
string |
false |
false |
true |
false |
false |
requires_license_key |
boolean |
false |
true |
true |
false |
false |
version |
string |
false |
true |
true |
true |
false |
website |
url |
false |
false |
true |
false |
false |
company_name |
text_general |
false |
true |
true |
false |
false |
keywords |
text_general |
true |
true |
true |
false |
false |
click_version |
string |
false |
true |
true |
true |
false |
click_framework |
string |
true |
true |
true |
true |
false |
click_updown_url |
url |
false |
false |
true |
true |
false |
countries_to_distribute |
string |
true |
true |
false |
false |
false |
text |
text_general |
true |
true |
false |
false |
false |
API
Guiding principles:
- JSON-based
- Discoverable
- Browseable
API Root
/api/v1
Provides clickable links to the other endpoints for discoverability.
Request
GET /api/v1 HTTP/1.1 Host: click.ubuntu.com
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"search": "http://click.ubuntu.com/api/v1/search",
"package": "http://click.ubuntu.com/api/v1/package"
}
Search
/api/v1/search
Proxies requests to Solr's SearchHandler. A subset of the standard Solr syntax is used for querying.
Request
GET /api/v1/search?q=click_framework:ubuntu-sdk-13.10,description:awesome&wt=json&fl=id,title,description,price,icon_url HTTP/1.1 Host: click.ubuntu.com
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"responseHeader":{
"status":0,
"QTime":1,
"params":{
"fl": "id,title,description,price,icon_url",
"indent":"on",
"start":"0",
"q":"click_framework:ubuntu-sdk-13.10,description:awesome",
"wt":"json",
"version":"2.2",
"rows":"10"
}
},
"response":{
"numFound":2,
"start":0,
"docs":[
{
"id": "1",
"title": "Awesome Launcher",
"description": "This is an awesome launcher.",
"price": 1.99,
"icon_url": "http://example.org/media/awesomelauncher/icons/icon16.png",
"resource_url": "http://click.ubuntu.com/api/v1/package/1"
},
{
"id": "2",
"title": "Awesome Widget",
"description": "This is an awesome widget.",
"price": 1.99,
"icon_url": "http://example.org/media/awesomewidget/icons/icon16.png",
"resource_url": "http://click.ubuntu.com/api/v1/package/2"
}
]
}
}
Details
/api/v1/package
Requests details for a specific package. Cleans the query string to ensure the user cannot be tricked into installing the wrong package, and enforces a single item in the response.
Request
GET /api/v1/package/2?wt=json&fl=id,title,description,price,icon_url HTTP/1.1 Host: click.ubuntu.com
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"responseHeader":{
"status":0,
"QTime":1,
"params":{
"fl": "id,title,description,price,icon_url",
"indent":"on",
"start":"0",
"q":"id:2",
"wt":"json",
"version":"2.2",
"rows":"1"
}
},
"response":{
"numFound":1,
"start":0,
"docs":[
{
"id": "2",
"title": "Awesome Widget",
"description": "This is an awesome widget.",
"price": 1.99,
"icon_url": "http://example.org/media/awesomewidget/icons/icon16.png",
}
]
}
}AppStore/Interfaces/ClickPackageIndex (last edited 2018-04-01 09:09:46 by popey)