Skip to content

Commit

Permalink
Merge pull request #73 from tambait/patch-1
Browse files Browse the repository at this point in the history
Fix UnexpectedPart "invideoPromotion" error
  • Loading branch information
madcoda authored Jan 12, 2021
2 parents 78ceca5 + 07c52c3 commit eac4b82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Youtube.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public function getChannelByName($username, $optionalParams = false)
$API_URL = $this->getApi('channels.list');
$params = array(
'forUsername' => $username,
'part' => 'id,snippet,contentDetails,statistics,invideoPromotion'
'part' => 'id,snippet,contentDetails,statistics'
);
if ($optionalParams) {
$params = array_merge($params, $optionalParams);
Expand All @@ -329,7 +329,7 @@ public function getChannelById($id, $optionalParams = false)
$API_URL = $this->getApi('channels.list');
$params = array(
'id' => $id,
'part' => 'id,snippet,contentDetails,statistics,invideoPromotion'
'part' => 'id,snippet,contentDetails,statistics'
);
if ($optionalParams) {
$params = array_merge($params, $optionalParams);
Expand All @@ -348,7 +348,7 @@ public function getChannelsById($ids = array(), $optionalParams = false)
$API_URL = $this->getApi('channels.list');
$params = array(
'id' => implode(',', $ids),
'part' => 'id,snippet,contentDetails,statistics,invideoPromotion'
'part' => 'id,snippet,contentDetails,statistics'
);
if($optionalParams){
$params = array_merge($params, $optionalParams);
Expand Down Expand Up @@ -583,7 +583,7 @@ public function decodeList(&$apiData)
} else {
$this->page_info = array(
'resultsPerPage' => $resObj->pageInfo->resultsPerPage,
'totalResults' => $resObj->pageInfo->totalResults,
'totalResults' => isset($resObj->pageInfo->totalResults) ? $resObj->pageInfo->totalResults : null,
'kind' => $resObj->kind,
'etag' => $resObj->etag,
'prevPageToken' => null,
Expand Down

0 comments on commit eac4b82

Please sign in to comment.