php-youtube-api icon indicating copy to clipboard operation
php-youtube-api copied to clipboard

'part' optional params

Open VetSoftKeith opened this issue 7 years ago • 3 comments

This library has everything I am looking for, however, would it be possible to support passing parts as an optional parameter?

I ask because I only would need the snippet part (2 quota) but your default call for Youtube#getVideoInfo() calls 6 different parts (8 quota per call). Quota is precious with YT, so I'd like to be able to use as little as possible when it is feasible.

Thanks!

VetSoftKeith avatar Jan 23 '18 08:01 VetSoftKeith

You Can use,

$yt->searchAdvanced($parts);

the (array) $parts holds your part.

litefast avatar Feb 12 '18 20:02 litefast

With this today quota limits, how many request / traffic we can handle?

chadul avatar Apr 02 '18 06:04 chadul

@chadul That depends on how many parts you are sending.Also use varnish to avoid API limit bypass. A search term's content on youtube API takes time.So you can Cache your contents...

rayhanz avatar Apr 02 '18 19:04 rayhanz