Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTO's not working #26

Open
HuckinB opened this issue May 30, 2022 · 5 comments
Open

DTO's not working #26

HuckinB opened this issue May 30, 2022 · 5 comments

Comments

@HuckinB
Copy link

HuckinB commented May 30, 2022

On several of the API's they are no longer working with our system, as it no longer returns the DTO.

Any ideas when this will be updated?

@Vaalyn
Copy link
Member

Vaalyn commented May 30, 2022

Well you could share some actual errors from your logs in order to help us to figure out what is not working.
Or at least tell us which DTOs / endpoints are not working.

Just with "several are not working" I can't do much apart from going through everything.

@HuckinB
Copy link
Author

HuckinB commented May 30, 2022

Ofc lemme just grab them

@HuckinB
Copy link
Author

HuckinB commented May 30, 2022

For the media()->list() endpoint

Invalid argument supplied for foreach()                                                                  
                                                                                                           
  at W:\SimulatorHits\simulatorhits-panel-v2\vendor\azuracast\php-api-client\src\Station\MediaClient.php:52
    48|             sprintf('station/%s/files', $this->stationId)                                          
    49|         );                                                                                         
    50|                                                                                                    
    51|         $mediaFileDtoArray = [];                                                                   
  > 52|         foreach ($mediaFilesDataArray as $mediaFileData) {                                         
    53|             $mediaFileDtoArray[] = Dto\MediaFileDto::fromArray($mediaFileData);                    
    54|         }                                                                                          
    55|         return $mediaFileDtoArray;                                                                 
    56|     }                                                                                              

  1   W:\SimulatorHits\simulatorhits-panel-v2\vendor\azuracast\php-api-client\src\Station\MediaClient.php:52                                                                                                             
      Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Invalid argument supplied for foreach()", "W:\SimulatorHits\simulatorhits-panel-v2\vendor\azuracast\php-api-client\src\Station\MediaClient.php", [])
                                                                                                                                                                                                                         
  2   W:\SimulatorHits\simulatorhits-panel-v2\app\Console\Commands\SyncMeta.php:45                                                                                                                                       
      AzuraCast\Api\Station\MediaClient::list() 

@HuckinB
Copy link
Author

HuckinB commented May 30, 2022

streamers()->list() endpoint

Invalid argument supplied for foreach()

  at W:\SimulatorHits\simulatorhits-panel-v2\vendor\azuracast\php-api-client\src\Station\StreamersClient.php:26
    22|             sprintf('station/%s/streamers', $this->stationId)
    23|         );
    24| 
    25|         $streamers = [];
  > 26|         foreach ($streamersData as $streamerData) {
    27|             $streamers[] = Dto\StreamerDto::fromArray($streamerData);
    28|         }
    29|         return $streamers;
    30|     }

  1   W:\SimulatorHits\simulatorhits-panel-v2\vendor\azuracast\php-api-client\src\Station\StreamersClient.php:26
      Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Invalid argument supplied for foreach()", "W:\SimulatorHits\simulatorhits-panel-v2\vendor\azuracast\php-api-client\src\Station\StreamersClient.php", [])

  2   W:\SimulatorHits\simulatorhits-panel-v2\app\Console\Commands\SyncMeta.php:45
      AzuraCast\Api\Station\StreamersClient::list()

@HuckinB
Copy link
Author

HuckinB commented May 30, 2022

I also ran phpunit

And this is another error

AzuraCast\Api\AzuraCastApiClientTest::testSettingsSuccessful
Undefined index: timezone

W:\packages\php-api-client\src\Dto\SettingsDto.php:557

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants