google-api-php-client

AppEngine PHP read and write blob to datastore

别说谁变了你拦得住时间么 提交于 2019-12-25 05:59:08
问题 The Google AppEngine PHP API provides a way to read and write to a blob. public function setBlobValue($blobValue) { $this->blobValue = $blobValue; } public function getBlobValue() { return $this->blobValue; } However this doesn't seem to work when writing / reading an html string stored in a blob, e.g. $string = "<div>Test</div>" $obj->setBlobValue(base64_encode($string)); then after a query: $string = base64_decode($obj->getBlobValue()); doesn't work - is there something I'm doing wrong here

appcfg.py: error: no such option: --passin | after updating Google App Engine Launcher

痴心易碎 提交于 2019-12-25 04:30:46
问题 Ive just upgraded the Google App Engine Launcher (for PHP) and now I'm getting this error message. Any ideas what why that ocurred and how to fix it? UPDATE1: right now it is only working in console like this: "C:\Program Files (x86)\Google\google_appengine\appcfg.py" "update" "D:\route\to\application" And I can't find the way to update the parameter in the Google Engine Launcher. Any thoughts? UPDATE2: ok, it seems that the issue has to do with the migration to oAuth2. So, the new question

How get json Respone from Guzzle, post protected google spread sheet

吃可爱长大的小学妹 提交于 2019-12-25 04:24:48
问题 How to get response when I post request with Guzzle I use "guzzle/guzzle": "^3.9", $guzzle = new Client(); $postCell = $guzzle ->post('https://sheets.googleapis.com/v4/spreadsheets/' . $spreadsheetId . ':batchUpdate', [], $addProtectedRangeJson ) ->addHeader('Authorization', 'Bearer ' . $arrayAccessTokenClient) ->addHeader('Content-type', 'application/json') ; $postCell ->send() ->getBody(true) ; $contents = (string) $postCell->getBody(); // get body that I post -> my request, not response

Create folder in root directiry of and upload file to that folder google drive api

ぐ巨炮叔叔 提交于 2019-12-25 03:59:13
问题 I want to create folder in googledrive root directory using CURL. File is uploaded to drive but I need to create a folder and upload file to that folder. As per @hanshenrik Code Create Folder is working Move file is not work My Updated code : $REDIRECT_URI = 'http' . ($_SERVER['SERVER_PORT'] == 80 ? '' : 's') . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; $SCOPES = array($GAPIS_AUTH . 'drive', $GAPIS_AUTH . 'drive.file', $GAPIS_AUTH . 'userinfo.email', $GAPIS_AUTH . 'userinfo

Google Calendar Events

▼魔方 西西 提交于 2019-12-25 03:33:02
问题 I am having some trouble adding events to Google Calendar. I can list events but when I try to add an event I am getting a 403 Forbidden Error. I am able to add events to primary, but when I try another one, in this case the one I've mnetion, I run into the 403 Forbidden Error. Here is the code I have: require_once 'vendor/autoload.php'; define('APPLICATION_NAME', 'Calendar'); define('CREDENTIALS_PATH', 'credentials/calendar.json'); define('SECRET_PATH', 'secret.json'); define('SCOPES',

YouTube API PHP - Trouble retrieving full video description

旧城冷巷雨未停 提交于 2019-12-25 03:14:44
问题 I've been playing around with the google/google-api-php-client. I've noticed that it says "build-failing", but some parts are working as expected, so I've been pressing on with it. So I have built a search field that queries the YouTube API for videos containing a search string and prints the results. You'll see that I've also hooked up the YouTube Player iFrame API to play the video if it is clicked. Now these results do contain snippet data (title, description, channelId, etc...), but the

Google Api is not working properly

血红的双手。 提交于 2019-12-25 02:53:09
问题 I am using google api (php). But it is not working as I want it to. I am using this api to import user's photos to my website. But I am not able to import them. Infact I can Import the images from the user account in which I have created the app. But from any other accounts I am not able to import images. My Index file is as below: index.php <?php /************************************************************************ * Plugin Name: Google Drive Plugin * Plugin URI: http://www.picpixa.com/

Which would be right service to use in PHP client library for Google to get basic info like name and email address?

喜欢而已 提交于 2019-12-25 01:23:35
问题 I am following this tutorial from last year, which teaches how to use Login with google for your website and get basic user info. In tutorial they are using Google_Oauth2Service class, which I could not find in PHP client library I downloaded. There is a similar service named oAuth2 but it seems to require Google+ account. I do not want to use Google+ service. 回答1: The easiest thing to use is the Plus API, with the people.get function: https://developers.google.com/+/api/latest/people/get.

google-api-php-client - Drive - File Insert - Create a text file - Content not being added

夙愿已清 提交于 2019-12-24 13:32:04
问题 I want to create a plain/text Mime Type file, using PHP and the Google-API for Google Drive on Google App Engine. When I use: 'mimeType' => 'text/plain', No content is written to the file. If I use: 'mimeType' => 'application/octet-stream', 'uploadType' => 'media' contents are added to the file. This code from Google documentation: Shows a line of code for the mimeType of 'text/plain' 'mimeType' => 'text/plain', But, again, if I use that, no contents are added to the file. What are the

Create Docs through the Drive API with specific page setups (margins, orientation)

夙愿已清 提交于 2019-12-24 12:16:42
问题 My app is already able to create Google Docs through the Drive API, and when doing so I can choose the title, data, and metadata. But I've been looking at the documentation and it seems there is no way to set some other properties of the Docs, such as the margins and the orientation (portrait or landscape) of the Docs being created. Is there a way to do so? After not finding an answer in the documentation, the only thing I could think of was logging in with my Google Account, going to one of