PHP code example of farshadff / zaya

1. Go to this page and download the library: Download farshadff/zaya library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

farshadff / zaya example snippets


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

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