include/externalAPI/ExternalAPIFactory.php
\ExternalAPIFactory
Provides a factory to list, discover and create external API calls
Main features are to list available external API's by supported features, modules and which ones have access for the user.
- Api
Methods

filterAPIList(
array $apiFullList
)
:
arrayFilter the list of APIs, removing disabled ones
| Name | Type | Description |
|---|---|---|
| $apiFullList | array |
| Type | Description |
|---|---|
| array | Filtered list |

getModuleDropDown(
string $moduleName, bool $ignoreAuth
=
false, bool $addEmptyEntry
=
false
)
:
voidGet the array of API names available for cetain module
| Name | Type | Description |
|---|---|---|
| $moduleName | string | |
| $ignoreAuth | bool | Ignore if we have authentication details or not |
| $addEmptyEntry | bool | Add empty entry? |

listAPI(
string $module
=
'', bool $ignoreAuth
=
false
)
:
\APILists the available API's for a module or all modules, and possibly ignoring if the user has auth information for that API even if it is required
| Name | Type | Description |
|---|---|---|
| $module | string | Which module name you are searching for, leave blank to find all API's |
| $ignoreAuth | bool | Ignore API's demands for authentication (used to get a complete list of modules |
| Type | Description |
|---|---|
| \API | class |

loadAPI(
string | bool $apiName, $ignoreAuth
=
false
)
:
\ExternalAPIBaseThis will hand back an initialized class for the requested external API, it will also load in the external API password information into the bean.
| Name | Type | Description |
|---|---|---|
| $apiName | string | bool | The name of the requested API ( known API's can be listed by the listAPI() call ) |
| $ignoreAuth |
| Type | Description |
|---|---|
| \ExternalAPIBase | API plugin |