<commit_before><?php
/**
 * @service captureSpace
 * @package plugins.captureSpace
 * @subpackage api.services
 */
class CaptureSpaceService extends KalturaBaseService
{
	/**
	 * Returns latest version and URL
	 *
	 * @action clientUpdates
	 * @param string $os
	 * @param string $version
	 * @return KalturaCaptureSpaceUpdateResponse
	 * @throws CaptureSpaceErrors::ALREADY_LATEST_VERSION
	 * @throws CaptureSpaceErrors::NO_UPDATE_IS_AVAILABLE
	 */
	function clientUpdatesAction ($os, $version)
	{
		$hashValue = kCaptureSpaceVersionManager::getUpdateHash($os, $version);
		if (!$hashValue) {
			throw new KalturaAPIException(CaptureSpaceErrors::NO_UPDATE_IS_AVAILABLE, $version, $os);
		}
			
		$path = "/api_v3/service/captureSpace_captureSpace/action/serve/serveUpdateAction/os/$os/version/$version";
		$downloadUrl = myPartnerUtils::getCdnHost(null) . $path;
		
		$info = new KalturaCaptureSpaceUpdateResponseInfo();
		$info->url = $downloadUrl;
		$info->hash = new KalturaCaptureSpaceUpdateResponseInfoHash();
		$info->hash->algorithm = KalturaCaptureSpaceHashAlgorithm::MD5;
		$info->hash->value = $hashValue;
		
		$response = new KalturaCaptureSpaceUpdateResponse();
		$response->info = $info;
		
		return $response;
	}

	/**
	 * Serve installation file
	 *
	 * @action serveInstall
	 * @param string $os
	 * @return file
	 * @throws CaptureSpaceErrors::NO_INSTALL_IS_AVAILABLE
	 */
	public function serveInstallAction($os)
	{
		$filename = kCaptureSpaceVersionManager::getInstallFile($os);
		if (!$filename) {
			throw new KalturaAPIException(CaptureSpaceErrors::NO_INSTALL_IS_AVAILABLE, $os);<commit_msg>Fixed server path<commit_after><?php
/**
 * @service captureSpace
 * @package plugins.captureSpace
 * @subpackage api.services
 */
class CaptureSpaceService extends KalturaBaseService
{
	/**
	 * Returns latest version and URL
	 *
	 * @action clientUpdates
	 * @param string $os
	 * @param string $version
	 * @return KalturaCaptureSpaceUpdateResponse
	 * @throws CaptureSpaceErrors::ALREADY_LATEST_VERSION
	 * @throws CaptureSpaceErrors::NO_UPDATE_IS_AVAILABLE
	 */
	function clientUpdatesAction ($os, $version)
	{
		$hashValue = kCaptureSpaceVersionManager::getUpdateHash($os, $version);
		if (!$hashValue) {
			throw new KalturaAPIException(CaptureSpaceErrors::NO_UPDATE_IS_AVAILABLE, $version, $os);
		}
			
		$path = "/api_v3/service/captureSpace_captureSpace/action/serveUpdate/os/$os/version/$version";
		$downloadUrl = myPartnerUtils::getCdnHost(null) . $path;
		
		$info = new KalturaCaptureSpaceUpdateResponseInfo();
		$info->url = $downloadUrl;
		$info->hash = new KalturaCaptureSpaceUpdateResponseInfoHash();
		$info->hash->algorithm = KalturaCaptureSpaceHashAlgorithm::MD5;
		$info->hash->value = $hashValue;
		
		$response = new KalturaCaptureSpaceUpdateResponse();
		$response->info = $info;
		
		return $response;
	}

	/**
	 * Serve installation file
	 *
	 * @action serveInstall
	 * @param string $os
	 * @return file
	 * @throws CaptureSpaceErrors::NO_INSTALL_IS_AVAILABLE
	 */
	public function serveInstallAction($os)
	{
		$filename = kCaptureSpaceVersionManager::getInstallFile($os);
		if (!$filename) {
			throw new KalturaAPIException(CaptureSpaceErrors::NO_INSTALL_IS_AVAILABLE, $os);
{'fraction_non_alphanumeric': 0.11894409937888199, 'fraction_numerical': 0.0012422360248447205, 'mean_word_length': 5.390873015873016, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5447191', 'n_tokens_mistral': 1078, 'n_tokens_neox': 983, 'n_words': 183}