GithubHelp home page GithubHelp logo

googlearchive / drive-pushnotifications-playground Goto Github PK

View Code? Open in Web Editor NEW
55.0 13.0 21.0 278 KB

Google Drive Push Notifications Playground

Home Page: https://pushnotificationsplayground.appspot.com/

License: Other

Python 98.86% CSS 1.14%

drive-pushnotifications-playground's Introduction

Google Drive Push Notifications Playground

Google Drive Push Notifications Playground

Overview

Google Drive Push Notifications Playground is a web app that helps you to try out the features of the Google Drive Push Notifications.

This sample will take you through the steps required to subscribe and unsubscribe to push notifications for changes in a specific file or any files in your Drive account.

You can try out the Google Drive Push Notifications Playground on its live demo instance.

Installation and Configuration

Create a Google APIs project and Activate the Drive API

First, you need to activate the Drive API for your app. You can do it by configuring your API project in the Google APIs Console.

  • Create an API project in the Google APIs Console.
  • Select the "Services" tab and enable the Drive API.
  • Select the "API Access" tab in your API project, and click "Create an OAuth 2.0 client ID".
  • In the Branding Information section, provide a name for your application (e.g. "CollabCube 3D"), and click Next. Providing a product logo is optional.
  • In the Client ID Settings section, do the following:
    • Select Web application for the Application type
    • Click the more options link next to the heading, Your site or hostname.
    • List your hostname in the Authorized Redirect URIs and JavaScript Origins fields.
    • Click Create Client ID.
  • On the same page, click on Download JSON to download the 'client_secrets.json' file.
  • Save 'client_secrets.json' file to the root folder of this application.

Download and extract 'google-api-python-client' library

Download the 'google-api-python-client' Google App Engine package and extract it to the root folder of this application.

Set up Google App Engine application

  • Create an App Engine application in the Google App Engine Console and note the application identifier.
  • Update application setting in app.yaml file of this project with your application identifier.
  • Set up Google App Engine development environment on your local machine.
  • Upload and deploy your project with the following command appcfg.py --oauth2 update .

Contributing

Before creating a pull request, please fill out either the individual or corporate Contributor License Agreement.

  • If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an individual CLA.
  • If you work for a company that wants to allow you to contribute your work to this client library, then you'll need to sign a corporate CLA.

Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll add you to the official list of contributors and be able to accept your patches.

drive-pushnotifications-playground's People

Contributors

aliafshar avatar jgwak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drive-pushnotifications-playground's Issues

Select a file button is broken

Looks like Google made some change in the picker API that broke the "Seclect a file" button in Subscribe to changes in a specific file. Please update when you get a chance.

OAuth token error when selecting file

Reproduction steps

Go to https://pushnotificationsplayground.appspot.com/ and click the Log In button. The OAuth2 flow appears to complete successfully: I am redirected back to the playground, and the application is authorised to access my Google Drive information. (This was verified by attempting further logins.)

Choose "Monitor all specific file" from the nav bar, and then Select a file.

Expected behaviour

I am given a list of all files and folders in my Google Drive to select from.

Actual behaviour

An error is displayed, stating Invalid credentials (missing or invalid oAuth token).

Notes

I've tried this with two different accounts, one personal account and one GSuite account. Both exhibit the same behaviour.

Environment

OS: Windows 10
Browser: Microsoft Edge
Plugins: Ghostery. (Identified and blocked Google Analytics; no other scripts.)

App doesn't work

Tried both features, both failed:
Feature "monitor all" : no push notification came through
Feature "monitor file": error regarding OAuth, missing scopes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.