Get WAV files for MOH.
Returns exist WAV files.
@return ApiResponse&lt;GetMOHFilesResponse&gt;
@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
359205
public ApiResponse<GetMOHFilesResponse> getMOHFilesWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = getMOHFilesValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<GetMOHFilesResponse>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
1337021
public function getTrash()
    {
        $oHttpCodes = Factory::service('HttpCodes');

        if (!userHasPermission('admin:cdn:manager:object:browse')) {
            throw new ApiException(
                'You do not have permission to access this resource',
                $oHttpCodes::STATUS_UNAUTHORIZED
            );
        }

        $oInput   = Factory::service('Input');
        $oModel   = Factory::model('ObjectTrash', 'nails/module-cdn');
        $iPage    = (int) $oInput->get('page') ?: 1;
        $aResults = $oModel->getAll(
            $iPage,
            static::MAX_OBJECTS_PER_REQUEST,
            ['sort' => [['trashed', 'desc']]]
        );

        $oResponse = Factory::factory('ApiResponse', 'nails/module-api');
        $oResponse->setData(array_map(
            function ($oObj) {
                $oObj->is_img = isset($oObj->img);
                $oObj->url    = (object) [
                    'src'     => cdnServe($oObj->id),
                    'preview' => isset($oObj->img) ? cdnCrop($oObj->id, 400, 400) : null,
                ];
                return $oObj;
            },
            $aResults
        ));
        return $oResponse;
    }
59671
private Api getApiInternal(String apiOrgId, String apiId, String apiVersion) {
        String key = getApiIndex(apiOrgId, apiId, apiVersion);
        Api api;
        synchronized (mutex) {
            api = (Api) getMap().get(key);
        }
        return api;
    }
1030544
@TargetApi(Build.VERSION_CODES.FROYO)
    public static File getExternalFilesDirForRingtones(Context context) {
        return context.getExternalFilesDir(Environment.DIRECTORY_RINGTONES);
    }
563203
protected Api getApi(String orgId, String apiId, String version) throws SQLException {
        String apiIdx = getApiId(orgId, apiId, version);
        Api api;
        synchronized (mutex) {
            api = apiCache.get(apiIdx);
        }

        if (api == null) {
            api = super.getApiInternal(orgId, apiId, version);
            synchronized (mutex) {
                if (api != null) {
                    apiCache.put(apiIdx, api);
                }
            }
        }

        return api;
    }
935290
public ApiResponse<GetEnabledResponse> getEnabledWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = getEnabledValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<GetEnabledResponse>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
158919
public ArrayList<PayloadType.Audio> getAudioPayloadTypesList() {
        ArrayList<PayloadType.Audio> result = new ArrayList<>();
        Iterator<JinglePayloadType> jinglePtsIter = getJinglePayloadTypes();

        while (jinglePtsIter.hasNext()) {
            JinglePayloadType jpt = jinglePtsIter.next();
            if (jpt instanceof JinglePayloadType.Audio) {
                JinglePayloadType.Audio jpta = (JinglePayloadType.Audio) jpt;
                result.add((PayloadType.Audio) jpta.getPayloadType());
            }
        }

        return result;
    }
65503
public ApiResponse<String> getPingWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = getPingValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<String>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }
784673
public function getRandomNoiseFile()
    {
        $return = false;

        if ( ($dh = opendir($this->audio_noise_path)) !== false ) {
            $list = array();

            while ( ($file = readdir($dh)) !== false ) {
                if ($file == '.' || $file == '..') continue;
                if (strtolower(substr($file, -4)) != '.wav') continue;

                $list[] = $file;
            }

            closedir($dh);

            if (sizeof($list) > 0) {
                $file   = $list[array_rand($list, 1)];
                $return = $this->audio_noise_path . DIRECTORY_SEPARATOR . $file;

                if (!is_readable($return)) $return = false;
            }
        }

        return $return;
    }
1074080
public function getFiles()
    {

        $filenames = array();

        if ( ! $this->exists() ) {
            throw new \Exception("file '" . $this->m_sPath . "' does not exist.");
        }

        if ($oDirectoryHandle = opendir($this->m_sPath)) {
            while (false !== ($filename = readdir($oDirectoryHandle))) {
                if ($filename != "." && $filename != ".." && (!is_dir($this->m_sPath . "/" . $filename))) {
	                array_push($filenames, $filename);
                }
            }
	        asort($filenames);

	        $filewebfiles = array();
	        foreach ($filenames as $filename) {
		        $filewebfile = new MFile($this->getPath() . "/" . $filename);
		        array_push($filewebfiles, $filewebfile);
	        }
	        return $filewebfiles;
        }


    }
80023
@Override
    public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException {
        LOG.log(Level.FINE, "getAudioFileFormat(URL url)");
        InputStream inputStream = url.openStream();
        try {
            return getAudioFileFormat(inputStream);
        } finally {
            if (inputStream != null) {
                inputStream.close();
            }
        }
    }
742818
public function multipartRequest($apiMethod, array $options = [], array $files = [], $httpMethod = 'POST')
    {
        $config = [RequestOptions::MULTIPART => []];
        $options = $this->prepareRequestOptions($options, $apiMethod);

        foreach ($options as $key => $value) {
            $config[RequestOptions::MULTIPART][] = ['name' => $key, 'contents' => (string) $value];
        }

        foreach ($files as $key => $file) {
            $config[RequestOptions::MULTIPART][] = ['name' => $key, 'contents' => fopen($file->getRealPath(), 'r')];
        }

        return $this->apiRequest($httpMethod, $this->getApiUrl($apiMethod), $config);
    }
452902
public APIState getAPIState() {
		APIStateRequest request = new APIStateRequest();
		APIStateResponse response = resolveApitraryClient().send(request);

		APIState apiState = null;
		if (HttpStatus.OK.ordinal() == response.getStatusCode()) {
			String result = response.getResult();

			ObjectMapper objectMapper = new ObjectMapper();
			try {
				apiState = objectMapper.readValue(result, APIState.class);
			} catch (Exception e) {
				throw new MappingException(e);
			}
		} else {
			throw new CommunicationErrorException(HttpStatus.getStatus(response.getStatusCode()));
		}
		return apiState;
	}
72029
private function getFiles()
    {
        $file = $this->event->get('document');

        $response = $this->http->get($this->buildApiUrl('getFile'), [
            'file_id' => $file['file_id'],
        ]);

        $responseData = json_decode($response->getContent());

        if ($response->getStatusCode() !== 200) {
            throw new TelegramAttachmentException('Error retrieving file url: '.$responseData->description);
        }

        $url = $this->buildFileApiUrl($responseData->result->file_path);

        return [new File($url, $file)];
    }
1231888
public function getArray()
    {
        try {
            $parsed = TomlParser::ParseFile($this->context);
        } catch (ParseException $e) {
            throw new InvalidFileException($e->getMessage());
        }

        // if (! is_array($parsed)) {
        //     throw new InvalidFileException('Unable to parse invalid TOML file at ' . $this->context);
        // }

        return $parsed;
    }
870651
public ApiResponse<Void> swaggerDocWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = swaggerDocValidateBeforeCall(null, null);
        return apiClient.execute(call);
    }
429438
@Override
  public Type[] getAudioFileTypes() {
    AudioFileFormat.Type[] localArray = new AudioFileFormat.Type[flacTypes.length];
    System.arraycopy(flacTypes, 0, localArray, 0, flacTypes.length);
    return localArray;
  }