zelloptt / zellowork-server-api-libs

Client libraries for Zello Work server API
https://zellowork.com/api/
MIT License
24 stars 13 forks source link

PHP Lib: Zello object data not cleared out between calls #14

Open turbo2ltr opened 3 years ago

turbo2ltr commented 3 years ago

Make a call to getUsers for a user that doesn't exist. A 404 is returned as expected.

ZelloServerAPI Object
(
    [version] => 1.1.0
    [data] => Array
        (
        )

    [errorCode] => 404
    [errorDescription] => User not found
    [curlErrorDescription] => 
    [sid] => ***
    [lastUrl] => ***//user/get/login/mm%40aol.com?rnd=***&sid=***
    [host:protected] => https://***.zellowork.com/
    [api_key:protected] => ***
    [curlConnectionTimeout:protected] => 
    [curlExecutionTimeout:protected] => 
)

Using the same object, create a new API call to getChannels for a channel that does exist and the 200 is returned but still containing the 404 error code.

ZelloServerAPI Object
(
    [version] => 1.1.0
    [data] => Array
        (
            [status] => OK
            [code] => 200
            [channels] => Array
                (
                    [name] => Peoria E2
                    *** SNIP ***
                )
        )

    [errorCode] => 404
    [errorDescription] => User not found
    [curlErrorDescription] => 
    [sid] => ***
    [lastUrl] => https://***.zellowork.com//channel/get/name/Peoria+E2?rnd=***&sid=***
    [host:protected] => https://***.zellowork.com/
    [api_key:protected] => ***
    [curlConnectionTimeout:protected] => 
    [curlExecutionTimeout:protected] => 
)

I would expect the object to be reset on a new API call or am I mistaken?