src/Client.php
public function grant($ttl, $id = 0)
    {
        $params = [
            'TTL' => $ttl,
            'ID' => $id,
        ];


        $body = $this->request(self::URI_GRANT, $params);

        return $body;
    }
public function grant($ttl, $id = 0)
    {
        $params = [
            'TTL' => $ttl,
            'ID' => $id,
        ];


        $body = $this->request(self::URI_GRANT, $params);

        return $body;
    }
public function grant ( $ ttl , $ id = 0 ) { $ params = [ 'TTL' => $ ttl , 'ID' => $ id , ] ; $ body = $ this -> request ( self :: URI_GRANT , $ params ) ; return $ body ; }
LeaseGrant creates a lease which expires if the server does not receive a
keepAlive\nwithin a given time to live period. All keys attached to the lease
will be expired and\ndeleted if the lease expires.
Each expired key generates a delete event in the event history.",

@param int $ttl  TTL is the advisory time-to-live in seconds.
@param int $id   ID is the requested ID for the lease.
If ID is set to 0, the lessor chooses an ID.
@return array
@throws \GuzzleHttp\Exception\BadResponseException
LeaseGrant creates a lease which expires if the server does not receive a keepAlive \ nwithin a given time to live period . All keys attached to the lease will be expired and \ ndeleted if the lease expires . Each expired key generates a delete event in the event history .