API/Content Access Protocol/addItem

From ickStream Wiki
Jump to: navigation, search

The purpose of the addItem method is to add an item (artist, album, track, ...) to a content service, typically this is used as follows:

  1. Search in allMusic context
  2. Call addItem to add the interesting item to the myMusic context
  3. Browse myMusic context to list favorite artists, albums, tracks which have been added above

Request:

{
	"jsonrpc": 2.0,
	"id": < A unique number used to correlate requests with responses, see JSON-RPC specification for more information >,
	"method": "addItem",
	"params": {
		"contextId": < Context which the item should be added to>
		"itemId": < Item identifier for the item to add, this corresponds to the *id* attribute returned from findItems method>
	}
}

Specific information

Response:

{
	"jsonrpc": 2.0,
	"id": < A unique number used to correlate requests with responses, see JSON-RPC specification for more information >,
	"result": < true or false >
}

Specific information

  • result will be set to true if the item is successfully added or if the item already existed in the content service context and didn't have to be added again.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox