How can a Dart application read cell data from google spreadsheets - google-docs

What are the possible options and setups one would need for reading data out of a google docs spreadsheet into a dart web application? Does dart need the wrapper around gdata REST api to do this? Has any dart project or sample interacted with google docs?

Newer Google APIs have a common API infrastructure where the client libraries are always up to date. There is such a client library for Dart (http://docs.google-api-dart-client.googlecode.com/git/index.html).
However, it looks like Google Spreadsheets is still using an older API infrastructure called GData. There is no GData client library for Dart that I know of.
Hence, I think the most sensible thing to do is to make raw HTTP calls. I'm not sure if you're trying to do this on the client or the server. If you're trying to do it on the client, you're going to have to make sure Google Spreadsheets supports CORS.
If you happen to be using a different programming language on the server, there is like a GData client library for that language. See (https://developers.google.com/google-apps/spreadsheets/#setting_up_your_client_library).

Related

Dialogflow SDK or Dialogflow REST API, which is faster in term of response time?

I have used Dialogflow for developing the app for Google Assistant. I have created intents and entities in the Dialogflow web GUI and I'm using a webhook response for further conversation.
Now I want to build a chatbot that is part of an existing Android or iOS app and use the code I already wrote for Dialogflow as part of this. What do I need to be aware of when I do so? It looks like I can use the SDK for that platform or make calls to the Dialogflow REST API. Which is faster or are there any tradeoffs? Can I use the Dialogflow NLP without going over the network?
Note: Dialogflow API V1 is deprecated and will be shut down on October 23th, 2019.
That means that the official Javascript, native Android, native iOS and Cordova clients will stop working since they all use V1. There's no word if and when these clients will be upgraded to V2.
So the best bet right now is to use the REST APIs.
There are a few things to be aware of when moving from fulfillment that was built for Actions on Google to using this to also provide responses for other platforms. Actions on Google expects the responses to be formatted slightly differently, and if you're using AoG specific characteristics (such as a SimpleResponse object or a Card object), then it might not appear for other Dialogflow integrations. So you'll need to go over your webhook code to make sure what you send back works across platforms. Your logic and the Dialogflow UI builder should pretty much remain the same - it is just your backend that might need some work.
To make the call, as you say, you can either do the REST call yourself or use the SDK built by Dialogflow. While the SDK will be slightly faster, since it is using ProtoBuffs instead of REST, the difference will likely be fairly slight in most cases. If you're planning to stream audio, you will likely need to either use the SDK or your own ProtoBuff implementation because REST doesn't handle that as well. If you're just sending text, and are more comfortable with doing REST APIs, then this is a perfectly reasonable approach.
There is no "local Dialogflow" library. All calls have to go over the network. There are other libraries that do Speech-to-Text and NLP locally if that is what you need.

Using node/vuejs, how to make google place API request on client side

I am using vuejs which runs as a single page application in the browser, so any API calls I am making are using axios. Unfortunately googles APIs block any requests through axios due to CORS. I have tried various npm packages to try and solve this, including "official" google maps package, but I still run into CORS issues.
I am positive there must be a way to do a placeid search through the browser using one of their javascript libraries, but I can't for the life of me find any good articles or examples to see how it is done.
I have google autocomplete working, and creating google maps through geocode is no problem, just can't find anything related to placeid search.
Here is an example of the request I am trying to make taken from googles docs.
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=YOUR_API_KEY
Can anyone provide a solution or link to an explanation on how to do this properly through javascript library, or through API call without running into CORS problems?
Your link to Google Maps Package is Node.js package (server side). That's why you have CORS issue.
If you're building a client-side application, take a look at the
Places SDK for Android, the Places SDK for iOS, and the Places
Library, Maps JavaScript API.
If you want to use it Google Maps on client side, you should use Maps JavaScript API

Google feed api in a nodejs application?

I have a php application that uses the google feed api to get the feeds I want and display them. I was wondering how can I call the google feed api from a nodejs application ?
Use node's http.request() (or the shortcut version http.get()) functionality; that's conceptually the same thing you must be currently doing in PHP.
You might find that installing and using Mikeal's request module would make things even simpler.

using Spotify's webAPI in an iOS app

So I'm in the process of developing an iOS app and I wanted to use the Spotify web API for searching and looking up songs in Spotify. However, I can't really tell if that is how to do it or if there would be better ways to do it and wanted to clarify before I began. Thanks in advance!
If you'd like the use the Web API, it works just the same as any other JSON REST API, so a lot of the tutorials out there for doing that on iOS will help you just fine. For converting between JSON and Objective-C data structures, newer iOS versions have NSJSONSerialization, otherwise I can recommend the open-source TouchJSON.
Also, you might want to look at CocoaLibSpotify, which is an Objective-C library for interacting with the Spotify service in a much more integrated way than the Web API — including music streaming. However, it does require a Spotify user be logged in to use.

How do I access Google AdWords API with Node.js?

Is there a way to use node.js to access and manage a google adwords account?
I'm the author of an unofficial node.js client library for AdWords: https://www.npmjs.com/package/googleads-node-lib. It is getting closer to a feature complete client library every day. Pull requests welcome.
Yes, the library uses standard Javascript (it is built using Google's Closure library). What you might need to do is to write an HttpWebTransport adapter that works for Node.js. http://code.google.com/p/google-api-adwords-js/source/browse/#svn%2Ftrunk%2Fjs%2Fsystem%2Fsrc%2Fgoogle%2Fsystem%2Fnet has a few examples for specific technlogies like Google Gadgets, Chrome extensions, etc. , but there isn't one for Node.js. Also see http://code.google.com/p/google-api-adwords-js/source/browse/trunk/js/adwordsapi/src/config.js for details on how to configure the library to use a particular HttpWebTransport class.
Cheers,
Anash
I don't know much about node.js but if it's using standard JavaScript then you should be able to get somewhere with the new AdWords API JavaScript library: http://code.google.com/p/google-api-adwords-js/

Resources