edfi/resources

Ed-Fi ODS / API 允许应用程序通过安全的 REST 接口读取和写入存储在 Ed-Fi ODS 中的教育数据。*** > *注意:ODS / API 信息的使用者应对所有数据进行清理,以便显示和存储。ODS / API 提供了合理的保护措施,以防止跨站脚本攻击和其他恶意内容,但平台不能也不能保证其包含的数据完全无害。

v7.1 2024-06-21 08:37 UTC

This package is not auto-updated.

Last update: 2024-09-17 13:54:35 UTC


README

Ed-Fi ODS / API 允许应用程序通过安全的 REST 接口读取和写入存储在 Ed-Fi ODS 中的教育数据。

注意:ODS / API 信息的使用者应对所有数据进行清理,以便显示和存储。ODS / API 提供了合理的保护措施,以防止跨站脚本攻击和其他恶意内容,但平台不能也不能保证其包含的数据完全无害。

安装与使用

需求

PHP 7.3 及以上版本。也应该与 PHP 8.0 兼容,但尚未进行测试。

Composer

要通过 Composer 安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

入门

请按照 安装说明 进行操作,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: oauth2_client_credentials
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AcademicWeeksApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | A resource identifier that uniquely identifies the resource.
$if_match = 'if_match_example'; // string | The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.

try {
    $apiInstance->deleteAcademicWeekById($id, $if_match);
} catch (Exception $e) {
    echo 'Exception when calling AcademicWeeksApi->deleteAcademicWeekById: ', $e->getMessage(), PHP_EOL;
}

API 端点

所有 URI 都相对于 https://api.ed-fi.org:443/v7.1/api/data/v3

模型

授权

oauth2_client_credentials

  • 类型: OAuth
  • 流程: application
  • 授权URL: ``
  • 作用域: N/A

测试

要运行测试,使用

composer install
vendor/bin/phpunit

作者

关于此包

此PHP包是由OpenAPI Generator项目自动生成的

  • API版本: 3
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen