All Projects → adrianbota → gdrive-appdata

adrianbota / gdrive-appdata

Licence: MIT license
Javascript utility to store application data to Google Drive

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to gdrive-appdata

backmeup
BackMeUp: An automated MySQL / MariaDB databases and files backup solution on *nix Machines using Amazon S3, WebDAV (ownCloud / NextCloud etc.), Google Drive and Dropbox.
Stars: ✭ 80 (+150%)
Mutual labels:  google-drive
GdriveSearcherBot
Google Drive Searcher Bot Written In Python Using Pyrogram.
Stars: ✭ 57 (+78.13%)
Mutual labels:  google-drive
screentray-distribution
macOS app for capturing, annotating and sharing screenshots
Stars: ✭ 28 (-12.5%)
Mutual labels:  google-drive
drive-zipextractor
Extract (decompress) ZIP files into Google Drive using the Google Drive API
Stars: ✭ 432 (+1250%)
Mutual labels:  google-drive
SearchX
The Ultimate Telegram Bot for Google Drive
Stars: ✭ 161 (+403.13%)
Mutual labels:  google-drive
ShaderBoy
Simple text editor that lets you write Shadertoy shaders more comfortably, anytime, anywhere.
Stars: ✭ 133 (+315.63%)
Mutual labels:  google-drive
drive-music-player
Fully client side Music Player for Google Drive
Stars: ✭ 567 (+1671.88%)
Mutual labels:  google-drive
video-to-markdown
How to embed a video in markdown? Here the answer. Add videos to your markdown files easier.
Stars: ✭ 159 (+396.88%)
Mutual labels:  google-drive
AutoFetcher-IG-Stories-to-GDrive
A Google Apps Script for deploying a web application that automatically fetches the latest available IG Stories of a target Instagram user to your Google Drive.
Stars: ✭ 54 (+68.75%)
Mutual labels:  google-drive
gdrive-index
An index server for Google Drive
Stars: ✭ 107 (+234.38%)
Mutual labels:  google-drive
google-api-typings-generator
Updated and fixed version of TypeScript typings for Google APIs generator
Stars: ✭ 42 (+31.25%)
Mutual labels:  gapi
Torrent-To-Google-Drive-Downloader
Simple notebook to stream torrent files to Google Drive using Google Colab and python3.
Stars: ✭ 256 (+700%)
Mutual labels:  google-drive
go-drive
A simple cloud drive mapping web app supports local, FTP/SFTP, S3, OneDrive, WebDAV, Google Drive.
Stars: ✭ 184 (+475%)
Mutual labels:  google-drive
Any-file-to-Google-Drive
This Google Colab notebook will help you download any file directly to Google Drive with the help of the JDownloader web interface
Stars: ✭ 47 (+46.88%)
Mutual labels:  google-drive
drive
Google Drive client for the commandline
Stars: ✭ 6,470 (+20118.75%)
Mutual labels:  google-drive
cottoncandy
sugar for s3
Stars: ✭ 33 (+3.13%)
Mutual labels:  google-drive
GoogleDriveBrowser
Goole Drive Download Library for iOS
Stars: ✭ 13 (-59.37%)
Mutual labels:  google-drive
zoom-drive-connector
Automatically uploads Zoom meeting recordings to Google Drive.
Stars: ✭ 25 (-21.87%)
Mutual labels:  google-drive
JFXGoogleDrive
A JavaFX Google Drive Client (For Demonstration Purposes Only).
Stars: ✭ 29 (-9.37%)
Mutual labels:  google-drive
InfiniDrive
A project that leverages Google Drive's API and "0 size file" rules for native Docs for unlimited storage space. - A SteelHacks 2019 Project
Stars: ✭ 63 (+96.88%)
Mutual labels:  google-drive

gdrive-appdata

Javascript utility to store application data to Google Drive app data folder.

Including it in your app

The distribution file is inside the dist folder (gdad.js). Including that file in your html file will expose a global variable named gdad which is a factory.

Creating app data API

var appData = gdad('your_file_name.json', 'YOUR_APP_CLIENT_ID')

API

The API consists of 2 straight forward methods: read and save. Usually, the flow is: reading app data at the start of your app, and then save the data at some point in your app life cycle.

Reading app data

appData.read().then(function (data) {
  // do something with data here
}, function () {
  // handle error (show UI button and try to read again; this time it will show the authorize popup)
});

When the user has not authorized your app to save data in the google drive, read will fail on first call. When this happens, you must show an UI element (usually a button), on click of this element you should call appData.read() again, and this time it will show the authorize popup.

Saving app data

appData.save(data);

data must be a serializable object (JSON.stringify must not fail on it)

What happens under the hood

read has the following flow: authorize, load drive api, get app data file id or create app data file and get its id, and, finally, read app data.

save has the same flow, except it saves the app data at the end.

Build Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].