Simple Cloud Save to Google Docs - javascript

I need a way to save data to a user's Google Docs so that it can be accessed from any computer.
I'm writing a game in javascript/Canvas that will be downloaded as a stored application from the chrome store. All I need to do is save a small text file containing high scores and settings to the user's account, however the authentication process is extremely confusing to me, and I haven't found any javascript sample code that does this.
What is the simplest way to access and modify a user's Google Docs with javascript?
Edit: Is there an easy to way to use Google forms/other API's to save data? Could I use PHP or python with javascript?

I've also asked this a while ago.
Google doesn't have released a JavaScript API for Google Docs yet. But since it is a RESTful API, you could implement it by your own.
You can find the protocol documentation here: http://code.google.com/intl/de/apis/documents/docs/3.0/developers_guide_protocol.html
I decided to not do it, because expenditure would be too big for what I wanted to do.

Related

How to fetch the data from the Google Analytics explore Form

I want to fetch my Google Analytics report to my local through an api.
I have created a Report in Google Analytics explore : this image.
Here I can download the csv which I want to read the data in my local through the csv.
Now for that I am trying to follow this document :
Quick Start
Which I am not sure this is correct approach or not. Also got stuck on some point like
I have downloaded Credentials.json where not sure what to change in client_email.
What is the best approach to achieve that. Any programming language is fine. Can anybody help me here to achieve this.
That api you're using is called the Reporting API or the Data API as they've remarketed it for GA4. And generally, it would be a good practice to use it and there are plenty of libraries and examples of its usage in multiple languages, including Python, here is a good example. I'd suggest either going with a third party article detailling the setup process, or even just using a third party library that can abstract a lot of roughness Google introduced in the API.
But that api is new, and the product, overall, is effectively just a beta with quite a number of bugs and documentation holes. There's a simpler way to get the data out. First, link the GA4 property to BQ. This will effectively set up daily (or streaming) exports to BQ.
Once the data is in BQ, you're able to see the raw data and understand it way better than in GA4 explorer. From there, it will be much easier for you to export the data to your local from BQ. Here is a library that could be handy. Having the raw data in BQ makes it way easier to debug your data reports.

use of google script editor

Hey so currently working on my first personal project so bear with the questions!
Currently trying to create a Javascript program that will parse info from google forms to produce slides displaying the info. So far from my research the best way I've found to facilitate this process is googles app script editor. However, I was wondering if I can run this code by requesting it from a different javascript (or maybe even java) program that I will write code on webstorm. If I cant do this what is the best way to utilize the google apps script editor?
Thanks!
Google Apps Script is just javascript with extra built-in APIs (like SpreadsheetApp, FormApp, etc.).
It also has a UrlFetchApp API.
So you can run code like this:
// The code below logs the HTML code of the Google home page.
var response = UrlFetchApp.fetch("http://www.google.com/");
Logger.log(response.getContentText());
As such, if you want to provide JavaScript from elsewhere, you could fetch it and then eval it on the Google Apps Script side. (but we all know how tricky eval can get)
One other option is to have your own server side written using Google App Engine (or any other framework) and use Google's OAuth and authorize your app to fetch data from the Forms form
Slides and Google Apps Script
You might like to take a look at the addon "Slides Merge" by Bruce McPherson. I've never used it but it sounds like it might work for you. Here's what it's looks like in the addon store:
Getting information from Google Forms is a snap with google apps script since your can link the form right up to a spreadsheet. The Google Apps Script documentation is really quite good these days. Here's the documentation link. Google Apps Script is loosely based on Javascript 1.6. If your already a programmer my guess is that you'll have few problems learning to use it. In my experience the most difficult thing was dealing with the arrays of arrays produced by the getValues() method of ranges in google apps script and I made a short video that might be of some help to you.
I also have a script that I wrote in Google Apps Script that produces a sheet show that is a slide show inside of a spreadsheet.
I've found that using the Script Editor is pretty easy. There's some documentation in the support section of the documentation. It can be a bit buggy at times but overall I think it's a pretty good tool.

Using Google Maps offline (Js Api)

I'm trying to make an NodeJs App in which, on web page I'm using Maps, For some reasons I've chosen Google Maps and I want to stick to it. My question is, Is there anyway where I can either store or cache map tiles offline and later on use it as needed [Note: Not looking for any hack or Illegal way for it, I already know there are many such ways].
I tried and saw many options like GEE (Google Earth Enterprise) portable but I guess they are shutting it down very soon i.e by 2017.
Basically what I'm trying here is to minimize the data usage on rendering map tiles, so alternatively, if there ain't a way to make google map work offline any suggestion or advice for minimizing data usage is appreciated.
The offline access via Maps JavaScript API is not available at the moment. There is a feature request in the public issue tracker:
https://issuetracker.google.com/issues/35827808
Please star this feature request to express your interest and receive further updates from Google.
1.Use Localstorage instead it might help but will be used in google chrome.
2.Check this url it might help How to cache Google map tiles for offline usage?

Is it possible to retrieve data from parse.com using objective-c and show it in website?

I have an iOS app in which I use parse.com as backend service. Now, I hired someone to do a website interface using HTML and CSS. I want to share the same data between iOS app and website, I know parse.com offers me a few ways to do this, including creating a javaScriptapplication. The problem is, my programmer doesn't have any experience in JavaScript, nor do I.
My question is: Is it possible to use what I have (objective-c, xcode) as far as retrieving data from parse.com and showing on website? Even if I need to code something new, is it possible to use objective-c together with HTML and CSS?
Thanks.
Parse has several APIs, one of which is REST. Your web developer should use the REST API to get data from Parse
https://www.parse.com/docs/rest
If there is will there is way, but you'll be making something really specific to your use and will be non standard and will be immediately hard to maintain, I recommend that you hire another developer and do things properly using the technologies given to you by parse !. if the cost will be high now I can promise you it'll be much higher if you went the path you're going to now.
So my answer is:
Yes, everything is possible and no, don't do it ! :)
Edit: Added an example to a possible way to do it to actually answer OP's question.
Example case:
1-Create a simple Mac Application in Xcode that fetches data exactly like you do it on iOS, and store the needed data into a database of your choice on your server
2-You now have access to the data you needed from parse, but on a local mirror. you will need some tool to fetch that data though, I recommend a simple PHP script.
Note that this will require an OSX server to always be running to fetch that data, you'll also need of find a way to fetch data on demand when a user needs it Vs. polling at specified intervals, this will hardly scale and will be costly as I said.

Google Safebrowsing checking JavaScript

Is it possible to extract a website safebrowsing info by javascript? This can be with Google Safe Browsing API, is there any code, or any article?
Related to your comment: This is not a code repository. You'll need to do your own development.
Back to your question: I would like to warn you that you will be exposing your API key to the general public when using javascript (as it's a client-side technology). Furthermore, you're opening the door to abusers. In the end, your "secret" API key might get suspended by Google quicker than you think.
In short: it could be done using the GET request examples the API documentation provides, but if I were you, I would think twice if javascript is really the best option you have.

Categories

Resources