"Fossies" - the Fresh Open Source Software Archive

Member "seopanel/libs/google-api-php-client/vendor/google/apiclient-services/src/Google/Service/YouTube/Resource/Activities.php" (22 Dec 2019, 5482 Bytes) of package /linux/www/seopanel.v.4.3.0.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Activities.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 /*
    3  * Copyright 2016 Google Inc.
    4  *
    5  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
    6  * use this file except in compliance with the License. You may obtain a copy of
    7  * the License at
    8  *
    9  * http://www.apache.org/licenses/LICENSE-2.0
   10  *
   11  * Unless required by applicable law or agreed to in writing, software
   12  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
   13  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   14  * License for the specific language governing permissions and limitations under
   15  * the License.
   16  */
   17 
   18 /**
   19  * The "activities" collection of methods.
   20  * Typical usage is:
   21  *  <code>
   22  *   $youtubeService = new Google_Service_YouTube(...);
   23  *   $activities = $youtubeService->activities;
   24  *  </code>
   25  */
   26 class Google_Service_YouTube_Resource_Activities extends Google_Service_Resource
   27 {
   28   /**
   29    * Posts a bulletin for a specific channel. (The user submitting the request
   30    * must be authorized to act on the channel's behalf.)
   31    *
   32    * Note: Even though an activity resource can contain information about actions
   33    * like a user rating a video or marking a video as a favorite, you need to use
   34    * other API methods to generate those activity resources. For example, you
   35    * would use the API's videos.rate() method to rate a video and the
   36    * playlistItems.insert() method to mark a video as a favorite.
   37    * (activities.insert)
   38    *
   39    * @param string $part The part parameter serves two purposes in this operation.
   40    * It identifies the properties that the write operation will set as well as the
   41    * properties that the API response will include.
   42    * @param Google_Service_YouTube_Activity $postBody
   43    * @param array $optParams Optional parameters.
   44    * @return Google_Service_YouTube_Activity
   45    */
   46   public function insert($part, Google_Service_YouTube_Activity $postBody, $optParams = array())
   47   {
   48     $params = array('part' => $part, 'postBody' => $postBody);
   49     $params = array_merge($params, $optParams);
   50     return $this->call('insert', array($params), "Google_Service_YouTube_Activity");
   51   }
   52   /**
   53    * Returns a list of channel activity events that match the request criteria.
   54    * For example, you can retrieve events associated with a particular channel,
   55    * events associated with the user's subscriptions and Google+ friends, or the
   56    * YouTube home page feed, which is customized for each user.
   57    * (activities.listActivities)
   58    *
   59    * @param string $part The part parameter specifies a comma-separated list of
   60    * one or more activity resource properties that the API response will include.
   61    *
   62    * If the parameter identifies a property that contains child properties, the
   63    * child properties will be included in the response. For example, in an
   64    * activity resource, the snippet property contains other properties that
   65    * identify the type of activity, a display title for the activity, and so
   66    * forth. If you set part=snippet, the API response will also contain all of
   67    * those nested properties.
   68    * @param array $optParams Optional parameters.
   69    *
   70    * @opt_param string channelId The channelId parameter specifies a unique
   71    * YouTube channel ID. The API will then return a list of that channel's
   72    * activities.
   73    * @opt_param bool home Set this parameter's value to true to retrieve the
   74    * activity feed that displays on the YouTube home page for the currently
   75    * authenticated user.
   76    * @opt_param string maxResults The maxResults parameter specifies the maximum
   77    * number of items that should be returned in the result set.
   78    * @opt_param bool mine Set this parameter's value to true to retrieve a feed of
   79    * the authenticated user's activities.
   80    * @opt_param string pageToken The pageToken parameter identifies a specific
   81    * page in the result set that should be returned. In an API response, the
   82    * nextPageToken and prevPageToken properties identify other pages that could be
   83    * retrieved.
   84    * @opt_param string publishedAfter The publishedAfter parameter specifies the
   85    * earliest date and time that an activity could have occurred for that activity
   86    * to be included in the API response. If the parameter value specifies a day,
   87    * but not a time, then any activities that occurred that day will be included
   88    * in the result set. The value is specified in ISO 8601 (YYYY-MM-
   89    * DDThh:mm:ss.sZ) format.
   90    * @opt_param string publishedBefore The publishedBefore parameter specifies the
   91    * date and time before which an activity must have occurred for that activity
   92    * to be included in the API response. If the parameter value specifies a day,
   93    * but not a time, then any activities that occurred that day will be excluded
   94    * from the result set. The value is specified in ISO 8601 (YYYY-MM-
   95    * DDThh:mm:ss.sZ) format.
   96    * @opt_param string regionCode The regionCode parameter instructs the API to
   97    * return results for the specified country. The parameter value is an ISO
   98    * 3166-1 alpha-2 country code. YouTube uses this value when the authorized
   99    * user's previous activity on YouTube does not provide enough information to
  100    * generate the activity feed.
  101    * @return Google_Service_YouTube_ActivityListResponse
  102    */
  103   public function listActivities($part, $optParams = array())
  104   {
  105     $params = array('part' => $part);
  106     $params = array_merge($params, $optParams);
  107     return $this->call('list', array($params), "Google_Service_YouTube_ActivityListResponse");
  108   }
  109 }