【文件属性】:
文件名称:sanity-php:用于Sanity APIPHP库
文件大小:53KB
文件格式:ZIP
更新时间:2021-05-24 13:49:00
PHP
健全PHP
用于PHP库
要求
sanity-php需要PHP> = 5.6,并安装了json模块。
作曲家
您可以通过安装该库。 运行以下命令:
composer require sanity/sanity-php
要使用该库,请使用Composer的 :
require_once 'vendor/autoload.php' ;
用法
实例化新客户
use Sanity \ Client as SanityClient ;
$ client = new SanityClient ([
'projectId' => 'your-project-id' ,
'dataset' => 'your-dataset-name' ,
// Whether or not to use the API CDN for queries. Default is false.
'u
【文件预览】:
sanity-php-main
----composer.json(742B)
----phpunit.xml(477B)
----.github()
--------workflows()
----test()
--------bootstrap.php(74B)
--------PatchTest.php(8KB)
--------ClientTest.php(40KB)
--------BlockContentMigrationTest.php(4KB)
--------BlockContentHtmlTest.php(15KB)
--------BlockContentTreeTest.php(15KB)
--------Serializers()
--------TransactionTest.php(4KB)
--------TestCase.php(351B)
--------fixtures()
----phpcs.xml(148B)
----LICENSE(1KB)
----.gitignore(131B)
----lib()
--------Patch.php(5KB)
--------Selection.php(2KB)
--------BlockContent()
--------Version.php(72B)
--------Client.php(21KB)
--------BlockContent.php(3KB)
--------Util()
--------Transaction.php(4KB)
--------ParameterSerializer.php(287B)
--------Exception()
----README.md(10KB)
----.editorconfig(205B)