curl

Curl Command Uploading Video File to YouTube with Resumable Upload using YouTube API

Gists This is a sample curl command for uploading a video file to YouTube with the resumable upload using YouTube API. In order to upload a video file to YouTube with the resumable upload using YouTube API, the following 2 processes are required to be done. The basic process of the resumable upload for YouTube is the same with Drive API. Ref So, I think that this document of Drive API might be useful for understanding the resumable upload process.

Sample Scripts for Creating New Event with Google Meet Link to Google Calendar using Various Languages

Gists This is the sample scripts for creating new event with Google Meet link to Google Calendar using various languages. When I saw the official document of “Add video and phone conferences to events”, in the current stage, I can see only the sample script for Javascript. But I saw the several questions related to this for various languages. So I published the sample scripts for creating new event with Google Meet link to Google Calendar using various languages.

Downloading Shared Files on Google Drive Using Curl

Gists When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB. File size < 40MB CURL filename="### filename ###" fileid="### file ID ###" curl -L -o ${filename} "https://drive.google.com/uc?export=download&id=${fileid}" File size > 40MB When it tries to download the file with more than 40MB, Google says to download from following URL.

Multipart-POST Request Using Google Apps Script

Gist These sample scripts are for requesting multipart post using Google Apps Script. In most cases, the multipart request is used for uploading files. So I prepared 2 sample situations as follows. For each situation, the request parameters are different. Upload a file from Google Drive to Slack. Convert an excel file to Spreadsheet on Google Drive using Drive API v3. Multipart post is required for these situations.

(NEW) Retrieve old revision file from Google Drive

This method was updated at July 12, 2017. In order to use this, at first, please retrieve your access token and enable Drive API. 1. File ID Retrieve file id from file name. curl -X GET -sSL \ -H 'Authorization: Bearer ### Access token ###' \ 'https://www.googleapis.com/drive/v3/files?q=name="### FileName ###"&fields=files(id,name)' Reference : https://developers.google.com/drive/v3/reference/files/list 2. Revision ID Retrieve revision id from file id. curl -X GET -sSL \ -H 'Authorization: Bearer ### Access token ###' \ 'https://www.

Retrieve old revision file from Google Drive

I introduce 2 kinds of methods. One is to use curl. Another is to use wget. At this time, I could know that wget can be also used as same as curl. In order to use this, at first, please retrieve your access token and enable Drive API. 1. File ID Retrieve file id from file name. curl -X GET -sSL \ -H 'Authorization: Bearer ### Access token ###' \ 'https://www.

File Upload and Download with File Convert For curl using Drive API

It is necessary to retrieve access token on Google. Scope is as follows. https://www.googleapis.com/auth/drive Other mimetypes can be seen here. Download and convert from Spreadsheet to Excel curl -X GET -sSL \ -H "Authorization: Bearer [Your access token]" \ -o "Excel file name" \ "https://www.googleapis.com/drive/v3/files/[File ID]/export?mimeType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" Upload and convert from Excel to Spreadsheet curl -X POST -sSL \ -H "Authorization: Bearer [Your access token]" \ -F "metadata={ \ name : '[File name on Google Drive]', \ mimeType : 'application/vnd.

One Liner Code for Netatmo

I made One Liner Code to retrieve data using Netatmo API. There are 2 ways. One is for windows dos. Another is for unix bash. Requirement tools are curl and jq. windows dos > setlocal & curl -s -d "grant_type=password&client_id='#####'&client_secret='#####'&username='#####'&password='#####'&scope=read_station" "https://api.netatmo.net/oauth2/token" | for /f "usebackq tokens=*" %a in (`jq -r ".access_token"`) do @set a="%a" | curl -s -d "access_token=%a&device_id='#####'" "https://api.netatmo.net/api/getstationsdata" > dat.txt & for /f "usebackq tokens=*" %b in (`jq -r ".