Difference between revisions of "Content Service"
From MythTV Official Wiki
Iamlindoro (talk | contribs) (Created page with '=Content Service API List= <center> {| cellpadding="4" border="1" | align="center" |<b>API Command</b> | align="center" |<b>POST Required?</b> | align="center" |<b>Descrip…') |
Iamlindoro (talk | contribs) |
||
Line 108: | Line 108: | ||
The return for this command is a ''binary file'' which will be interpreted by your browser and downloaded or displayed as appropriate. | The return for this command is a ''binary file'' which will be interpreted by your browser and downloaded or displayed as appropriate. | ||
+ | |||
+ | ==GetFileList== | ||
+ | |||
+ | The <span style="color:LimeGreen">GetFileList</span> API takes the following arguments: | ||
+ | |||
+ | :<span style="color:SteelBlue">StorageGroup</Span> ('''Required''') | ||
+ | :: '''Parameter Type:''' String | ||
+ | :: The Storage Group name for which you wish to see a list of files. | ||
+ | |||
+ | Example Query: | ||
+ | |||
+ | <code>http://BackendServerIP:6544/Content/GetFileList?StorageGroup=Fanart</code> | ||
+ | |||
+ | Example Return: | ||
+ | |||
+ | <pre> | ||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <QStringList> | ||
+ | <String>10020_fanart.jpg</String> | ||
+ | <String>10074_fanart.jpg</String> | ||
+ | <String>10126_fanart.jpg</String> | ||
+ | <String>10138_fanart.jpg</String> | ||
+ | <String>10139_fanart.jpg</String> | ||
+ | <String>10140_fanart.jpg</String> | ||
+ | <String>10189_fanart.jpg</String> | ||
+ | <String>10191_fanart.jpg</String> | ||
+ | <String>10192_fanart.jpg</String> | ||
+ | <String>10196_fanart.jpg</String> | ||
+ | </QStringList> | ||
+ | </pre> |
Revision as of 20:49, 2 October 2011
Content Service API List
API Command | POST Required? | Description |
GetFile | No | Download a given file from a given storage group. |
GetImageFile | No | Display, and optionally scale, an image file from a given storage group. |
GetFileList | No | Get a list of files in a specified storage group. |
GetRecordingArtwork | No | Display, and optionally scale, an image file of a given type (coverart, banner, fanart) for a given recording's inetref and season number. |
GetVideoArtwork | No | Display, and optionally scale, an image file of a given type (coverart, banner, fanart) for a given video's database id number. |
GetAlbumArt | No | Display, and optionally scale, the album art for a given music file's database id number. |
GetPreviewImage | No | Display, and optionally scale, an preview thumbnail for a given recording by timestamp, chanid and starttime. |
GetRecording | No | Download a given recording file by chanid and starttime. |
GetMusic | No | Download a given music file by database id. |
GetVideo | No | Download a given video by database id. |
GetHash | No | Perform a unique identifying hash on a given file in a given storage group. |
DownloadFile | No | Instruct the backend to download a remote file into a storage group. |
Content APIs
GetFile
The GetFile API takes the following arguments:
- StorageGroup (Required)
- Parameter Type: String
- The Storage Group name in which you wish to search for the file.
- Filename (Required)
- Parameter Type: String
- The filename (and relative path if necessary) of the file you wish to receive.
Example Query:
Example Return:
The return for this command is a binary file which will be interpreted by your browser and downloaded or displayed as appropriate.
GetImageFile
The GetImageFile API takes the following arguments:
- StorageGroup (Required)
- Parameter Type: String
- The Storage Group name in which you wish to search for the file.
- Filename (Required)
- Parameter Type: String
- The filename (and relative path if necessary) of the file you wish to receive.
- Width (Optional)
- Parameter Type: Integer
- The scaled width to return the image. To preserve proper aspect, you may want to specify only one of width or height.
- Height (Optional)
- Parameter Type: Integer
- The scaled height to return the image. To preserve proper aspect, you may want to specify only one of width or height.
Example Query:
Example Return:
The return for this command is a binary file which will be interpreted by your browser and downloaded or displayed as appropriate.
GetFileList
The GetFileList API takes the following arguments:
- StorageGroup (Required)
- Parameter Type: String
- The Storage Group name for which you wish to see a list of files.
Example Query:
http://BackendServerIP:6544/Content/GetFileList?StorageGroup=Fanart
Example Return:
<?xml version="1.0" encoding="UTF-8"?> <QStringList> <String>10020_fanart.jpg</String> <String>10074_fanart.jpg</String> <String>10126_fanart.jpg</String> <String>10138_fanart.jpg</String> <String>10139_fanart.jpg</String> <String>10140_fanart.jpg</String> <String>10189_fanart.jpg</String> <String>10191_fanart.jpg</String> <String>10192_fanart.jpg</String> <String>10196_fanart.jpg</String> </QStringList>