Google APIs JS File - javascript

In building a Google Commerce Search search form, one of the pieces of code Google instructed us include was located at this address:
http://ajax.googleapis.com/ajax/libs/googleapis/0.0.4/googleapis.min.js
I'm getting a javascript error that seems to be emanating from this javascript file and I was wondering if this is the latest version of said javascript file? If not, can someone direct me as to where the latest version of this google api JS file lies?
P.S. I have been unable to get any conclusion from Google that this is the correct, most-up-to-date version of the file.

If you are looking after google search API - this is the location to find the latest:
https://developers.google.com/custom-search/v1/overview
In case you need some other APIs checkout their new location at:
https://developers.google.com/ you will have there a list of all the (many) APIs.

Related

Can't find valid/complete documentation for api.onedrive.com

Working on a JavaScript based app (VueJS at moment) and am needing to navigate through a user's OneDrive account to find and select files. Documentation that I have found all seems to be for Microsoft's graph API, which uses a different auth method to what api.onedrive.com uses.
So far the only endpoint I have working correctly is "https://api.onedrive.com/v1.0/drive/root/children" and have been un-able to step out from there.
Any help on finding the list of endpoints and how to use them would be much appreciated.
I found interesting info about it in the following web.
OneDrive Examples for Node.js

Read Google App Script Files from another script

I am looking to create a little Google App Script to parse another GAS file to pull out the functions and any jsdoc type comments, and then display it.
Like if you navigate to a script you can get the revision history etc, but I wanted to be able to pass in a Drive folder containing multiple script files and develop a front end to display each's content.
I know about the Google Drive REST API with exportLinks do download as JSON.
I wondered if there was a simpler way to do it from another GAS file, or would I need to URLFetch of some description to do it over the RestAPI?
I have tried searching for similar things but they always lead back to the DriveAPI.
Any help with a starting place, or what GAS Objects I should start looking at?
Thank you
You have to use the REST based Drive API, there is really no other alternative. However, you don't need to use URLFetch to access it. Google Apps Script has what's known as Advance Google Services a collection of interfaces that grant native access to many REST based APIS including the Drive API.
You can check out the Drive specific documentation here. Its somewhat sparse, so you'll often have to fall back on the REST based documentation as well as rely on autocomplete inside the script editor to make sense of things.

Edit a google spreadsheet using javascript/client side code

I am new to google spreadsheets.
I am trying to use them for a small website where instead of maintaining a DB, I am storing and fetching data from sheets using APIs.
I found this library - https://github.com/mikeymckay/google-spreadsheet-javascript , for fetching data from a published sheet.
It serves my purpose of doing everything in the browser.
But I am not able to figure out how can I write data to same/different spreadsheet.
Do I use Sheet APIs? Can I also do it using App Script ? Is there a ready to use library for the same ?
Can someone please help?
You'd likely want to check out the Google Drive API, rather than Google Apps Scripts. I don't have much experience with it, especially in regards to using it on a website, but that's the best direction to head in.

Google Maps API with a Django Website

I am building a small website and am using the Django framework for my development. Parts of the site also includes using Google Maps APIs (V3), which includes using MySQL to add and save marker information as shown within the official Google documentation here: https://developers.google.com/maps/articles/phpsqlinfo_v3
I have the basic maps working fine with being able to add a marker when it is clicked, but am having difficulties to get it to work since trying to implement the MySQL into it - the map does not load within the canvas on the page. I have copied the code exactly from the link above just to see if i could get it working basic but no joy.
Before I go posting up snippets of code here and there, I'm just wondering if maybe there might be a problem in the MySQL working within the Django development - I have a MySQL database synced with Django and have it running.
If there is any other way around getting markers and information to save to a map, like the example above, it would be great but I cant find anything anywhere.
I also looked at this guide but with similar results:
http://www.sanwebe.com/2013/10/google-map-v3-editing-saving-marker-in-database

How to consume GTFS feed in Google Map v3 using Javascript?

I'm first time trying to use GTFS(General Transit Feed Specification) with Google Maps as per the Google developers page i have understood the concept of .txt files which are used as feed and for making a demo i downloaded a transit zip files from Google developers page. but I'm not getting how to use those transit files to show information on map. I tried to search tutorial for the same but could not find anything useful. Do i need to parse all those files to show in map or there is something different implementation.
I'm confused.
Please bear me with my lack of knowledge regarding GTFS.
If you want to display stops and routes on a map, you can use gtfs-to-geojson to convert GTFS to GeoJSON that can be loaded onto a Google Map or Mapbox.
Install gtfs-to-geojson:
npm install gtfs-to-geojson -g
Setup a config.json file, then run:
gtfs-to-geojson --configPath /path/to/your/config.json
The tool will output a folder of GeoJSON files.
As far as I know, GTFS is not yet "plug and play" ready - there's no simple way to just load up a GTFS dataset and work with it or query it on Google Maps, using either Google's web interface or their Javascript libraries.
Getting this working requires:
Setting up a (SQL) database and importing the GTFS dataset into that database.
Setting up a query system to get the information you want out of the SQL database (e.g., a web front-end that queries the database backend).
Feel free to look at some examples from around the web:
Broader GTFS discussion, and a link to a PostgreSQL + R solution from James Wong
MongoDB + node.js from Brendan Nee

Categories