1.3.0 2024-05-19 13:49 UTC

This package is auto-updated.

Last update: 2024-09-19 14:28:40 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

使用此包,您可以在Laravel应用程序中轻松实现zaya.io链接缩短器

安装

您可以通过Composer安装此包

composer require farshadff/zaya

然后添加开发API密钥到您的env

ZAYA_API_KEY=W******************************7

用法

您可以使用此包中的4个外观函数,以实现不同的功能

ZayaLinkFacade::
ZayaSpaceFacade::
ZayaDomainFacade::
ZayaAccountFacade::

v.1.0.0版本的可用方法列表

链接的可用方法

ZayaLinkFacade::create($yourlink,$params); 
ZayaLinkFacade::list(); //this will give you all links you have
ZayaLinkFacade::get($id); //this will give you detail of a given link
ZayaLinkFacade::update($id,$link); //this will update a link for a given id
ZayaLinkFacade::delete($id); //this will remove a link by a given id

空间的可用方法

ZayaSpaceFacade::create($name,$color); //this will create an space for you :https://zaya.io/developers/spaces?section=create#create
ZayaSpaceFacade::list(); //this will give you all spaces you have
ZayaSpaceFacade::get($id); //this will give detail of a given space
ZayaSpaceFacade::update($id,$name,$color); //this will update an space for a given id
ZayaSpaceFacade::delete($id); //this will remove an space by a given id

域名的可用方法

ZayaDomainFacade::list(); //this will give you all domains you have
ZayaDomainFacade::create($name,$index,$notFound); //this will create a domain for you :https://zaya.io/developers/domains?section=create#create
ZayaDomainFacade::get($id); //this will give detail of a given domain
ZayaDomainFacade::update($id,$name,$index_page = null,$not_found_page = null); //this will update a domain for a given id note that 2 params at last are optional
ZayaDomainFacade::delete($id); //this will remove a domain by a given id

账户的可用方法

ZayaAccountFacade::detail(); //this will give you account information

测试

composer test

变更日志

请参阅CHANGELOG以获取更多信息,了解最近有哪些变更。

贡献

请参阅CONTRIBUTING以获取详细信息。

安全

如果您发现任何安全相关的问题,请通过电子邮件farshad.badiee@gmail.com联系,而不是使用问题跟踪器。

致谢

许可

MIT许可(MIT)。请参阅许可文件以获取更多信息。

Laravel包模板

此包使用Laravel包模板生成。