thigas88 / alfresco-api-php-client
用于Alfresco API的PHP库
dev-master
2024-02-14 16:58 UTC
Requires
- php: >=5.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-14 18:20:49 UTC
README
该项目是从rhuanbarreto/alfresco-api-php-client分支出来,并进行了一些改进。
API 提供对Alfresco内容服务功能的访问。
要求
PHP 5.4.0及以后版本
安装与使用
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{
"require": {
"thigas88/alfresco-api-php-client": "@dev"
}
}
然后运行composer install
或者运行composer require thigas88/alfresco-api-php-client
手动安装
下载文件并包含autoload.php
require_once('/path/to/AlfrescoAPI/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门 - 核心API
请遵循安装过程,然后运行以下命令使用核心API
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); Alfresco\Configuration::getDefaultConfiguration()->setHost('http://[YOUR_ALFRESCO_HOSTNAME]:[YOUR_ALFRESCO_PORT]/alfresco/api/-default-/public/alfresco/versions/1'); $api_instance = new Alfresco\Api\ActivitiesApi(); $person_id = "person_id_example"; // string | The identifier of a person. $skip_count = 0; // int | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. $max_items = 100; // int | The maximum number of items to return in the list. If not supplied then the default value is 100. $who = "who_example"; // string | A filter to include the user's activities only `me`, other user's activities only `others`' $site_id = "site_id_example"; // string | Include only activity feed entries relating to this site. $fields = array("fields_example"); // string[] | A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter. try { $result = $api_instance->listActivitiesForPerson($person_id, $skip_count, $max_items, $who, $site_id, $fields); print_r($result); } catch (Exception $e) { echo 'Exception when calling ActivitiesApi->listActivitiesForPerson: ', $e->getMessage(), PHP_EOL; } ?>
入门 - 搜索API
请遵循安装过程,然后运行以下命令使用搜索API
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); Alfresco\Configuration::getDefaultConfiguration()->setHost('http://[YOUR_ALFRESCO_HOSTNAME]:[YOUR_ALFRESCO_PORT]/alfresco/api/-default-/public/search/versions/1'); $api_instance = new Alfresco\Api\SearchApi(); $query_body = new \Alfresco\Model\SearchRequest(); // \Alfresco\Model\SearchRequest | Generic query API $query_body->setQuery(["query" => "foo"]); try { $result = $api_instance->search($query_body); print_r($result); } catch (Exception $e) { echo 'Exception when calling SearchApi->search: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有核心API URI相对于https:///alfresco/api/-default-/public/alfresco/versions/1
所有搜索API URI相对于https:///alfresco/api/-default-/public/search/versions/1
模型文档
- 活动
- 活动条目
- 活动分页
- 活动分页列表
- 关联
- 关联体
- 关联条目
- 关联信息
- 审计应用
- 审计应用条目
- 审计应用分页
- 审计应用分页列表
- 审计体更新
- 审计条目
- 审计条目条目
- 审计条目分页
- 审计条目分页列表
- 子关联
- 子关联体
- 子关联条目
- 子关联信息
- 客户端体
- 评论
- 评论体
- 评论条目
- 评论分页
- 评论分页列表
- 公司
- 内容信息
- 已删除节点
- 已删除节点条目
- 已删除节点分页
- 已删除节点分页列表
- 下载
- 下载体创建
- 下载条目
- 错误
- 错误错误
- 收藏
- 收藏体创建
- 收藏条目
- 收藏分页
- 收藏分页列表
- 收藏站点
- 收藏站点体创建
- 收藏站点条目
- 通用桶
- 通用桶桶信息
- 通用分面响应
- 通用度量
- 组
- 组体创建
- 组体更新
- 组条目
- 组成员
- 组成员条目
- 组成员分页
- 组成员分页列表
- 组成员关系体创建
- 组分页
- 组分页列表
- 网络配额
- 节点
- 节点关联
- 节点关联条目
- 节点关联分页
- 节点关联分页列表
- 节点体复制
- 节点体创建
- 节点体创建关联
- 节点体锁定
- 节点体移动
- 节点体更新
- 节点子关联
- 节点子关联条目
- 节点子关联分页
- 节点子关联分页列表
- 节点条目
- 节点分页
- 节点分页列表
- 分页
- 密码重置体
- 路径元素
- 路径信息
- 权限元素
- 权限体更新
- 权限信息
- 人员
- 人员体创建
- 人员体更新
- 人员条目
- 人员网络
- 人员网络条目
- 人员网络分页
- 人员网络分页列表
- 人员分页
- 人员分页列表
- 偏好
- 偏好条目
- 偏好分页
- 偏好分页列表
- 评分
- 评分聚合
- 评分体
- 评分条目
- 评分分页
- 评分分页列表
- 呈现
- 呈现体创建
- 呈现条目
- 呈现分页
- 呈现分页列表
- 请求默认值
- 请求面面相向字段
- 请求面面相向字段列表
- 请求面面相向区间
- 请求面面相向区间区间
- 请求面面相向查询
- 请求面面相向查询内部
- 请求面面相向集合
- 请求字段
- 请求过滤查询
- 请求过滤查询内部
- 请求高亮
- 请求高亮字段
- 请求包含
- 请求限制
- 请求本地化
- 请求分页
- 请求轮播
- 请求查询
- 请求范围
- 请求作用域
- 请求排序定义
- 请求排序定义内部
- 请求拼写检查
- 请求统计
- 请求模板
- 请求模板内部
- 响应一致性
- 结果桶
- 结果桶桶
- 结果节点
- 结果集上下文
- 结果集上下文面面相向查询
- 结果集上下文拼写检查
- 结果集分页
- 结果集分页列表
- 结果集行条目
- 还原体
- 搜索条目
- 搜索条目高亮
- 搜索请求
- 共享链接
- 共享链接体创建
- 共享链接体电子邮件
- 共享链接条目
- 共享链接分页
- 共享链接分页列表
- 网站
- 网站体创建
- 网站体更新
- 网站容器
- 网站容器条目
- 网站容器分页
- 网站容器分页列表
- 网站条目
- 网站成员
- 网站成员条目
- 网站成员分页
- 网站成员分页列表
- 网站成员资格体创建
- 网站成员资格体更新
- 网站成员资格请求
- 网站成员资格请求体创建
- 网站成员资格请求体更新
- 网站成员资格请求条目
- 网站成员资格请求分页
- 网站成员资格请求分页列表
- 网站分页
- 网站分页列表
- 网站角色
- 网站角色条目
- 网站角色分页
- 网站角色分页列表
- 标签
- 标签体
- 标签条目
- 标签分页
- 标签分页列表
- 用户信息
- 版本
- 版本条目
- 版本分页
- 版本分页列表
授权文档
基本认证
- 类型:HTTP基本认证
作者
Rhuan Barreto - rhuan@rhuan.com.br