alaouy / YouTube

🔥 Laravel PHP Facade/Wrapper for the Youtube Data API
MIT License
778 stars 204 forks source link

getVideoInfo with single string returns 'Object of class stdClass could not be converted to string' #172

Closed kristiana-s closed 1 year ago

kristiana-s commented 3 years ago

this $video= Youtube::getVideoInfo('rie-hPVJ7Sw') returns an error of Object of class stdClass could not be converted to string whereas $video= Youtube::getVideoInfo(['rie-hPVJ7Sw']) returns correct data, albeit in an array. Should the readme be updated or is there a genuine here?

alaouy commented 2 years ago

@kristiana-s Did you manage to resolve the issue?

kristiana-s commented 2 years ago

@alaouy Apologies for the delay, I've just resorted to fetching the data from the array as is returned when passing the id ['rie-hPVJ7Sw'] like so. However, as I said, wasn't obvious from the readme that it is the case.