whitecube/cerepo-api-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

whitecube/cerepo-api-php

最新稳定版本:v0.1.1

Composer 安装命令:

composer require whitecube/cerepo-api-php

包简介

PHP client wrapper for the CeRepo Central Repository API (Infosanté & partners).

README 文档

README

This package provides a small PHP client around the Cerepo API.

Installation

composer require whitecube/cerepo-api-php

Configuration

Create a TokenClient instance.

use Whitecube\Cerepo\TokenClient;

$auth = new TokenClient(
    $tokenUrl,     // e.g. "https://token.cerepo.io/74ab26ad-6287-4bdc-8a6e-a770ae261d2c/oauth2/v2.0/token"
    $clientId,     // your client id
    $clientSecret  // your client secret
);

Then, create the main Client used to call the Cerepo API:

use Whitecube\Cerepo\Client;

$client = new Client($auth, 'https://acc.cerepo.io/api/');

Basic usage

Sources

// POST /sources - Add or update a Source
$response = $client->sources()->post([
    'lang'   => 'en',
    'title'  => 'Example article',
    'url'    => 'https://example.com/article',
    'content'=> 'Long content here…',
    'prod_ids' => ['product-1'],
    'val_ids'  => ['value-1'],
    'aud_ids'  => ['audience-1'],
    ...
]);
// GET /sources/{unf_id} - Get a specific source by unified-id (unf_id)
$source = $client->sources()->get('1234');

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固