google-api

Google Drive Api - Get Folder Paths

混江龙づ霸主 提交于 2019-12-21 12:36:50
问题 I'm currently using the Google Drive API to get a list of folders (or subfolders). In order to do this I use the following URL: https://www.googleapis.com/drive/v2/files/1234folderid1234/children?key=1234APIKEY1234&q=mimeType='application/vnd.google-apps.folder'; This returns back a list of the folders as expected, however, I also need either the name of the folder or the full folder path. This information is not returned with this call. Is there a way to get the list of folders with the

How to read content of JSON file uploaded to google cloud storage using node js

孤人 提交于 2019-12-21 10:50:08
问题 I manually upload the JSON file to google cloud storage by creating a new project. I able to read the metadata for a file but I don't know how to read the JSON content The code I used to read the metadata is var Storage = require('@google-cloud/storage'); const storage = Storage({ keyFilename: 'service-account-file-path', projectId: 'project-id' }); storage .bucket('project-name') .file('file-name') .getMetadata() .then(results => { console.log("results is", results[0]) }) .catch(err => {

Google Custom Search API for square images

那年仲夏 提交于 2019-12-21 09:17:59
问题 I'm looking for a way to specify that the images returned by the Google Custom Search API have a square format. I've tried tbs=iar:s (because I've read Using the Custom Search API (REST JSON) to search for square images), but it doesn't work. Have you an idea please ? 回答1: The problem is that tbs query parameter only applies to a regular image search on Google. For example, if you wanted to search for cat pictures with a square aspect ratio, you could do a search like this: http://images

Google Maps API v3 - GIcon is not defined

我是研究僧i 提交于 2019-12-21 07:56:33
问题 I know they are some issues from v2 to v3 what can i do here to fix it? GIcon is not supported by v3? // Google-Map icon object var gMapIcon = new GIcon(G_DEFAULT_ICON); //change to new google.maps.MarkerImage();??? // does icon exist if ( mapElements[lMapElementIndex]['icon'].toString().length > 0) { gMapIcon.image = html_entity_decode(mapElements[lMapElementIndex]['icon']); gMapIcon.shadow = ""; iconHeight = mapElements[lMapElementIndex]['iconheight']; iconWidth = mapElements

With Google API Client, how to create client

☆樱花仙子☆ 提交于 2019-12-21 07:45:48
问题 I'm working to use the Google API Client: https://github.com/google/google-api-ruby-client Specifically, I want to access Google Contacts via the Google API client using the following google_contacts_api.rb : https://gist.github.com/lightman76/2357338dcca65fd390e2 I am trying to use google_contacts_api.rb like so (x is intentional and is actually the correct keys): require './lib/google_contacts_api.rb' auth = User.first.authentications.first client = OAuth2::Client.new('x', 'x', :site =>

With Google API Client, how to create client

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 07:44:45
问题 I'm working to use the Google API Client: https://github.com/google/google-api-ruby-client Specifically, I want to access Google Contacts via the Google API client using the following google_contacts_api.rb : https://gist.github.com/lightman76/2357338dcca65fd390e2 I am trying to use google_contacts_api.rb like so (x is intentional and is actually the correct keys): require './lib/google_contacts_api.rb' auth = User.first.authentications.first client = OAuth2::Client.new('x', 'x', :site =>

How to use Service Accounts with gsutil, for uploading to CS + BigQuery

此生再无相见时 提交于 2019-12-21 07:15:10
问题 How do I upload data to Google BigQuery with gsutil, by using a Service Account I created in the Google APIs Console? First I'm trying to upload data to Cloud Storage using gsutil, as that seems to be the recommended model. Everything works fine with gmail user approval, but it does not allow me to use a service account. It seems I can use the Python API to get an access token using signed JWT credentials, but I would prefer using a command-line tool like gsutil with support for resumable

Google Plus can't post a moment

浪子不回头ぞ 提交于 2019-12-21 06:38:28
问题 After Google authorization I try to post a moment without any confirmations: GTMOAuth2Authentication *auth; auth = [GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName:TMH_SOCIAL_GOOGLE_KEYCHAIN clientID:TMH_SOCIAL_GOOGLE_CLIENTID clientSecret:TMH_SOCIAL_GOOGLE_SECRET]; if ([auth canAuthorize]) { NSString *postString = @"{\"type\":\"http:\\/\\/schemas.google.com\\/AddActivity\",\"target\":{\"id\":\"tmhabc\",\"type\":\"http:\\/\\/schemas.google.com\\/AddActivity\",\"description\":\

Access token Google+

六月ゝ 毕业季﹏ 提交于 2019-12-21 06:19:45
问题 I'm experiencing few issues with the new-released Google+ API to retrieve an access token... I have been following the documentation, I got a Code ("4/blablabla") but when I send the POST request to get an access token, I get a "(400) Bad Request" response... Here is my piece of code : // We have a request code, now we want an access token StringBuilder authLink = new StringBuilder(); authLink.Append("https://accounts.google.com/o/oauth2/token"); authLink.AppendFormat("?code={0}", gplusCode);

Access token Google+

佐手、 提交于 2019-12-21 06:19:07
问题 I'm experiencing few issues with the new-released Google+ API to retrieve an access token... I have been following the documentation, I got a Code ("4/blablabla") but when I send the POST request to get an access token, I get a "(400) Bad Request" response... Here is my piece of code : // We have a request code, now we want an access token StringBuilder authLink = new StringBuilder(); authLink.Append("https://accounts.google.com/o/oauth2/token"); authLink.AppendFormat("?code={0}", gplusCode);