spkm / isams
用于使用iSAMS公共REST API的PHP包装器
v4.1.2
2024-07-30 14:44 UTC
Requires
- php: ^8.2
- ext-json: *
- guzzlehttp/guzzle: ~6||~7
- illuminate/http: ~10||~11
- illuminate/support: ~10||~11
- intervention/image: ^2.7
- laravel/pint: ^1.16
Requires (Dev)
- phpunit/phpunit: ^10.0
Suggests
- laravel/framework: The Laravel Framework.
- dev-master
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.21
- v4.0.20
- v4.0.19
- v4.0.18
- v4.0.17
- v4.0.16
- v4.0.15
- v4.0.14
- v4.0.13
- v4.0.12
- v4.0.11
- v4.0.10
- v4.0.9
- v4.0.8
- v4.0.7
- v4.0.6
- v4.0.5
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.8
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.13
- v3.0.12
- v3.0.11
- v3.0.10
- v3.0.9
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- 3.0.0
- v2.4.16
- v2.4.15
- v2.4.14
- v2.4.13
- v2.4.12
- v2.4.11
- v2.4.10
- v2.4.9
- v2.4.8
- v2.4.7
- v2.4.6
- v2.4.5
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.18
- v2.3.17
- v2.3.16
- v2.3.15
- v2.3.14
- v2.3.13
- v2.3.12
- v2.3.11
- v2.3.10
- v2.3.9
- v2.3.8
- v2.3.7
- v2.3.6
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.10
- v2.2.9
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.12
- 2.1.11
- 2.1.10
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.1
- 2.0.0
- 1.9
- 1.8
- 1.7
- 1.6
- 1.5
- 1.4
- 1.3
- 1.2
- 1.1
- 1.0
- dev-develop
- dev-feature/pupiltimetable
This package is auto-updated.
Last update: 2024-09-30 15:11:26 UTC
README
此包是iSAMS(https://isams.com)的PHP包装器,使用其REST API。它将API返回的json对象转换为模型实例。
请参阅他们的API文档和https://developerdemo.isams.cloud/Main/swagger/ui/index & https://developer.isams.com/display/PRA/Getting+started+-+REST+API
安装和用法
此包需要PHP 8.1和Laravel 9.0或更高版本。请参阅tests/
文件夹中的文档。(我们非常希望有人编写一些正式的文档)
基本安装
您可以通过Composer使用以下命令安装此包:
composer require spkm/isams
该包将自动注册其服务提供者
要发布配置文件到config/isams.php
,请运行:
php artisan vendor:publish --provider="spkm\isams\IsamsServiceProvider"
更新配置文件并将REST API密钥添加到您的.env文件中
如果您正在使用School模型,实现接口\spkm\isams\Contracts\Institution
<?php namespace App; use Illuminate\Database\Eloquent\Model; class School extends Model implements \spkm\isams\Contracts\Institution { /** * Define the name used to identify this Schools entry in the config */ public function getConfigName(): string { return 'cranleighSandbox'; } }
在您的config/isams.php
文件中,将以下内容添加到schools
数组中
'cranleighSandbox' => [ 'api_key' => env('ISAMS_API_KEY'), 'api_secret' => env('ISAMS_API_SECRET'), 'api_url' => env('ISAMS_API_URL'), ],
否则,在您的自定义类中实现该接口(或复制示例spkm\isams\School
)
测试
composer test
变更日志
请参阅CHANGELOG了解最近更改的更多信息。
贡献
请参阅CONTRIBUTING了解详细信息。
安全性
如果您发现任何安全相关的问题,请通过电子邮件spkm@cranleigh.org而不是使用问题跟踪器。
鸣谢
许可
MIT许可证(MIT)。请参阅许可文件了解更多信息。