How to make action "What's the Geology here"? [closed] - actions-on-google

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I would like to make an action where people can ask the geology at a/their location.
This would make use of GET requests from web services which are made available through the OneGeology Geoportal (http://portal.onegeology.org/OnegeologyGlobal/)
GET requests look like:
http://portal.onegeology.org/OnegeologyGlobal/proxyxml?url=https%3A//gs-seamless.geoscience.nsw.gov.au/geoserver/onegeology/ows%3FSERVICE%3DWMS%26SERVICE%3DWMS%26VERSION%3D1.3.0%26REQUEST%3DGetFeatureInfo%26FORMAT%3Dimage%252Fpng%26TRANSPARENT%3Dtrue%26QUERY_LAYERS%3Dau_nsw_25k_geounits%26LAYERS%3Dau_nsw_25k_geounits%26INFO_FORMAT%3Dtext%252Fhtml%26I%3D50%26J%3D50%26CRS%3DEPSG%253A4326%26STYLES%3D%26WIDTH%3D101%26HEIGHT%3D101%26BBOX%3D-33.689918518066406%252C150.75199127197266%252C-33.620567321777344%252C150.82134246826172&_=1587457888900
Output is
https://gs-seamless.geoscience.nsw.gov.au/geoserver/onegeology/ows?SERVICE=WMS&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=au_nsw_25k_geounits&LAYERS=au_nsw_25k_geounits&INFO_FORMAT=text%2Fhtml&I=50&J=50&CRS=EPSG%3A4326&STYLES=&WIDTH=101&HEIGHT=101&BBOX=-33.689918518066406%2C150.75199127197266%2C-33.620567321777344%2C150.82134246826172
Geoserver GetFeatureInfo output
So would want GA to respond with the "unit_name" attribute = "Londonderry Clay" .
Could someone point me in the right direction to develop such a service?
Would it be simplier if I made a mobile app version of the portal first? Or do I need to make a custom action via Dialogflow from stratch? or a 3rd way?

Well, what would be easier is to work with technologies that you're already familiar with.
Are you familiar with mobile programming? Go that route, although it will be more difficult to integrate voice for other Assistant platforms later.
Understand web programming more and you're used to building back-end services? Building a fulfillment webhook that makes this call from parameters from Dialogflow might be easier.
If you want to learn how this is typically done, and not necessarily go with what's easiest for you, you'll want to go the latter route. This involves
Designing the conversation
Building this conversation in Dialogflow
The specific procedures involved to get user information including specific location
Building a webhook running on a server to process the user input, including their location, making the call to the API, and returning the response to the user

Related

Best practices for building a chat app? (REST vs Websockets) [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last year.
Improve this question
As the title suggests, I'm building a simple chat app in Node/Express + React, and I'm using socket.io to get real time updates.
However, other than the chatting itself, rest of my app is very basic (registering, signing in, creating rooms etc), and while it's definitely doable to make all those requests just socket emits, it feels like bit of an overkill.
So I was thinking of creating a regular REST API for that stuff and outsourcing it into a separate file, then creating another file just for the chatting function itself, where I'd use socket.io, but I'm afraid that it may seem a bit unprofessional, or leave an impression that I don't know how to use sockets well enough.
Key point: When finished, this app will be posted to my portfolio, so I'm not very concerned about what just "can work", but rather what's the best and cleanest way to do it? Should I switch everything to sockets and use them even for basic fetching of lists and stuff? Or is it better practice to mix the two, and use REST for, well, the rest?
In my experience, To mix the two is the best way to do that.
I did that in many projects and it worked well.
I surely think that modularity is the best way to make code clean and qualified.
So, to use both of regular REST API and websocket is more professional.
Thank you.

Adding google drive integration for user signup [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I was wanting to start creating an app for users to store files into their drive acc.
I was looking at Google's API here GoogleAPIClientForREST.podspec
I have created a pod file etc. However can someone tell me if I need the whole API file or just certain parts?
Also I see that this is GSuite related (as in I found it through here:
G Suite APIs for iOS), though this was the only way to access the API.
Do I have to pay for the API access?
Like paying for GSuite?
Its best to not pick apart the file until you actually know what its doing. A lot of these libraries are interwoven. That being said. The APIs themselves are normally standalone. So if you are not going to be using all of the apis you should be able to remove them.
These for example
s.subspec 'Books' do |sp|
sp.dependency 'GoogleAPIClientForREST/Core'
sp.source_files = 'Source/GeneratedServices/Books/*.{h,m}'
end
s.subspec 'Calendar' do |sp|
sp.dependency 'GoogleAPIClientForREST/Core'
sp.source_files = 'Source/GeneratedServices/Calendar/*.{h,m}'
end
I have personally never tried to remove them. I suggest you start with one or two and work your way down.
No you don't need to pay to access google drive api. The code for Gsuite should be the same unless you are looking at something that has domain wide delegation set up.

Get data of website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'd like to get the data of a website. I'd like to display the table in an app. Do you have an idea how I could do it? Thanks for your answers!
Usually, you'd want the maintainer of the data you need to supply some API for machine-to-machine communication (a REST JSON web service, for example).
Since you are asking how to display the table in an app:
the easiest way would be to just point an UIWebView that way and go from there.
a more native look might be acomplished by parsing the data. As you included several 'parsing' tags, I guess this is what you'd prefer.
The problem with HTML scraping web pages (what you probably hope to do) is that the data you are looking for and foremost it's structure is prune to changes. If some unexpected changes can easily break your parser.
Thus, if you go for doing that (which might be prohibited by your school or other publisher, especially in germany), try to parse the data on your server and offer an web service for your app yourself. This way, you can react to changes of the structure faster and do not break the app for your users.
Seriously consider asking the school for an API.

Can a REST resource point/wrap another external REST API? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to have a URI like this /car/toyota, however I don't want the car resource to map to a database table for example. Instead I would like car to just be resource that is used for information retrieval only (ie. no POST, PUT, or DELETE on it), and /car/toyota/ would retrieve that data somewhere else, say through another REST API on another web server that provides this information.
Is this good design?
This probably belongs on something more like https://softwareengineering.stackexchange.com/
That said, this question depends entirely on the infrastructure of the environment you're making your REST requests on. If you have the ability to control the REST API on the web server providing the information, there's really no reason to wrap that API in another API. All of the call forwarding and potential necessity to translate from one request format to another really just adds un-necessary overhead.
That said, if you're accessing an API that you have no ability to re-format, or if you're accessing an API that you don't want client servers talking to directly, then there's a potential design perk for wrapping a different REST API in your own read only API.
Unfortunately, without having a clear picture of the entire architecture and the problem you're trying to solve, it's pretty difficult to decide if a wrapped API is a good design or not. My only advice is the preferred approach would be to edit the existing API if you can, but that isn't always practical.

Best practices and tutorials for ios authentication [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What are the best practices for creating a user authentication system for an ios application? Any good tutorials or insights on the process are helpful (newbie).
Stormpath is an authentication and user management backend service aimed at developers. You manage your own collection of users, verify their logins, and assign users to groups (roles). Your app makes calls to their server.
Parse provides a Parse Social service that lets your app do user authentication through Facebook or Twitter. Parse is being acquired by Facebook (as of 2013-04), so I don't know what that means for their future.
Okta is another.
Mozilla Persona is quite promising, but may not yet be ready for the real world. There is an open-source kit for iOS named persona-ios. Read a discussion on How to use Persona in a native iOS app?.
User authentication and identity as as service seems to be a new but burgeoning field.
If you are using a third party backend the stackmob, parse etc all handle authentication. If you are rolling your own then this project looks a reasonable way to go: http://quickblox.com/developers/SimpleSample-users-ios.