docs: function (client) {
  	/**
  	 * Upload a media file
  	 * @param {String} name The name of uploaded file.
  	 * @param {String|Buffer|Readable} data Data to upload. If data is string it should be path to file to upload.
  	 * @param {String} contentType Optional MIME type of uploaded data (default: application/octet-stream).
  	 * @param {Function} [callback] Callback for the operation
  	 * @return {Promise} A promise for the operation
  	 */
  	this.upload = function (name, data, contentType, callback) {
  		if (!callback && typeof contentType === "function") {
  			callback = contentType;
  			contentType = null;
  		}
  		return getReadStreamData(data)
  			.then(function (streamData) {
  				return new Promise(function (resolve, reject) {
  					var req = request(
  						client.createRequestOptions({
  							path   : encodeURI("media/" + name),
  							method :  "PUT"
  						})
  					);
  					req.headers["Content-Type"] =
  						contentType || "application/octet-stream";
  					req.headers["Content-Length"] = streamData.size;
  					req.on("error", reject);
  					req.on("response", resolve);
  					streamData.stream.pipe(req);
  				});
  			})
  			.then(client.handleResponse)
  			.asCallback(callback);
  	};
  
  	/**
  	 * Download a media file
  	 * @param {String} name The name of downloaded file.
  	 * @param {Function} [callback] Callback for the operation
  	 * @return {DownloadMediaFileResponse} A promise for the operation
  	 */
  	this.download = function (name, callback) {
  		return client
  			.makeRequest ({
  				path     : encodeURI("media/" + name),
  				method   : "GET",
  				encoding : "binary"
  			})
  			.then(function (response) {
  				return {
  					contentType : response.headers["content-type"],
  					content     : response.body
  				};
  			})
  			.asCallback(callback);
  	};
  
  	/**
  	 * Gets a list of your media files.
  	 * @param {Function} [callback] Callback for the operation
  	 * @return {Array<MediaFileResponse>} A promise for the operation
  	 */
  	this.list = function (callback) {
  		return client
  			.makeRequest({
  				path   : "media",
  				method : "GET"
  			})
  			.then(function (response) {
  				return response.body;
  			})
  			.asCallback(callback);
  	};
  
  	/**
  	 * Remove a media file
  	 * @param {String} name The name of file to remove.
  	 * @param {Function} [callback] Callback for the operation
  	 * @return {Promise} A promise for the operation
  	 */
  	this.delete = function (name, callback) {
  		return client
  			.makeRequest({
  				path   : encodeURI("media/" + name),
  				method : "DELETE"
  			})
  			.asCallback(callback);
  	};
  }