|
| 1 | +# Application Launching v1.0 |
| 2 | + |
| 3 | +## Query Available Applications |
| 4 | +Get a list of all available SDL applications for use with a specific head unit and phone. By default applications that are in development mode, disabled, black listed, or with unsupported SDL versions will not be included in the list. You can alter the defaults by adding optional query parameters in the request. |
| 5 | + |
| 6 | +### Request |
| 7 | + |
| 8 | + GET /applications/available/:moduleId |
| 9 | + |
| 10 | +#### Query Parameters |
| 11 | +Optional key/value pairs that can be included in the request URL to override the default parameter values. |
| 12 | + |
| 13 | + |
| 14 | + | Parameter | Description | Acceptable Input | |
| 15 | + | --------- | ----------- | ---------------- | |
| 16 | + | **android** | Include only android applications in the response. Default is false. | _true_ or _false_ | |
| 17 | + | **ios** | Include only iOS applications in response. Default is false. | _true_ or _false_ | |
| 18 | + | **sdlVersion** | Exclude applications that do not support a specific SDL version. | Any positive decimal or integer values that are also valid SDL version numbers. | |
| 19 | + | **sdlMaxVersion** | Exclude applications with SDL versions outside the max range specified. | Any positive decimal or integer values that are also valid SDL version numbers. | |
| 20 | + | **sdlMinVersion** | Exclude applications with SDL versions outside the min range specified. | Any positive decimal or integer values that are also valid SDL version numbers. | |
| 21 | + | **development** | Include development applications in the response. Default is false. | _true_ or _false_ | |
| 22 | + |
| 23 | + |
| 24 | +### Response |
| 25 | + |
| 26 | +The successful response will contain a JSON object that contains a property named _response_. The response property value will always be an array of Application JSON objects. |
| 27 | + |
| 28 | + { |
| 29 | + status: "200 ok", |
| 30 | + responseType: "array", |
| 31 | + response: [ {}, {}, {} ] |
| 32 | + } |
| 33 | + |
| 34 | +#### Application Object Properties |
| 35 | + |
| 36 | +The following is a list of all the possible properties contained in each Application response object. Not every Application object will contain every property. |
| 37 | + |
| 38 | +| Property | Type | Description | |
| 39 | +| -------- | ---- | ----------- | |
| 40 | +| **_id** | String | An Object ID uniquely identifying the application. | |
| 41 | +| **development** | Boolean | Indicates whether or not the application is in development mode. | |
| 42 | +| **iconUrl** | String | A link to a valid application icon URL or an empty string. | |
| 43 | +| **name** | String | Name of the application. | |
| 44 | +| **android** | Object | An object containing information about the android version of the application. | |
| 45 | +| **android.category** | String | Play Store category for the application. | |
| 46 | +| **android.packageName** | String | Android package name for the application. | |
| 47 | +| **android.playStoreUrl** | String | Play Store URL to the application. | |
| 48 | +| **android.sdlMaxVersion** | String | Maximum version of SDL supported by the application. | |
| 49 | +| **android.sdlMinVersion** | String | Minimum version of SDL supported by the application. | |
| 50 | +| **ios** | Object | An object containing information about the iOS version of the application. | |
| 51 | +| **ios.category** | String | App Store category for the application. | |
| 52 | +| **ios.itunesUrl** | String | App Store URL to the application. | |
| 53 | +| **ios.sdlMaxVersion** | String | Maximum version of SDL supported by the application. | |
| 54 | +| **ios.sdlMinVersion** | String | Minimum version of SDL supported by the application. | |
| 55 | +| **ios.urlSchema** | String | URL schema for the iOS application. | |
| 56 | + |
| 57 | +### Example |
| 58 | +The following example requests will demonstrate common use-cases for the endpoint. |
| 59 | + |
| 60 | +#### Example Android Request |
| 61 | + |
| 62 | +The following request will return all applications that are available for the module with the ID _55f75cfb891ab712302d3588_ that are also _android_ applications and support SDL version _2.0_ |
| 63 | + |
| 64 | + GET /applications/available/55f75cfb891ab712302d3588?android=true&sdlVersion=2.0 |
| 65 | + |
| 66 | +#### Example Android Response |
| 67 | + |
| 68 | + { |
| 69 | + status: "200 ok", |
| 70 | + responseType: "array", |
| 71 | + response: [{ |
| 72 | + _id: "53f75cfb891ec700002d3592", |
| 73 | + development: false, |
| 74 | + iconUrl: "http://i.imgur.com/S0FAk3.png", |
| 75 | + android: { |
| 76 | + category: "MusicAndAudio", |
| 77 | + packageName: "com.awesome.fake", |
| 78 | + playStoreUrl: "http://play.google.com/store/apps/details?id=com.awesome.fake", |
| 79 | + sdlMaxVersion: "3.0", |
| 80 | + sdlMinVersion: "1.0" |
| 81 | + }, |
| 82 | + name: "Awesome Music App" |
| 83 | + }, { |
| 84 | + _id: "45275cfb891ec700002d3845", |
| 85 | + android: { |
| 86 | + category: "MusicAndAudio", |
| 87 | + packageName: "com.crappy.fake", |
| 88 | + playStoreUrl: "http://play.google.com/store/apps/details?id=com.crappy.fake", |
| 89 | + sdlMaxVersion: "2.0", |
| 90 | + sdlMinVersion: "1.0" |
| 91 | + }, |
| 92 | + development: false, |
| 93 | + iconUrl: "http://i.imgur.com/R3a11YFAk3.png", |
| 94 | + name: "Crappy Music App" |
| 95 | + }] |
| 96 | + } |
| 97 | + |
| 98 | +#### Example iOS Request |
| 99 | + |
| 100 | +The following request will return all applications that are available for the module with the ID _55f75cfb891ab712302d3588_ that are also _iOS_ applications and support SDL version _1.0_ |
| 101 | + |
| 102 | + GET /applications/available/55f75cfb891ab712302d3588?ios=true&sdlVersion=1.0 |
| 103 | + |
| 104 | +#### Example iOS Response |
| 105 | + |
| 106 | + { |
| 107 | + status: "200 ok", |
| 108 | + responseType: "array", |
| 109 | + response: [{ |
| 110 | + _id: "53f75cfb891ec700002d3592", |
| 111 | + development: false, |
| 112 | + iconUrl: "http://i.imgur.com/S0FAk3.png", |
| 113 | + ios: { |
| 114 | + category: "Music", |
| 115 | + itunesUrl: "http://itunes.apple.com/app/awesome-music-app/id324384482?mt=8", |
| 116 | + sdlMaxVersion: "3.0", |
| 117 | + sdlMinVersion: "1.0", |
| 118 | + urlSchema: "awesomemusicapp://" |
| 119 | + }, |
| 120 | + name: "Awesome Music App" |
| 121 | + }] |
| 122 | + } |
0 commit comments