Google place api - application specific search - google-places-api

I am trying to do application specific places search with google place api. Here is how I am adding a place:
Request:
{
"location": {
"lat": 37.760538,
"lng": -121.900879
},
"accuracy": 50,
"name": "p2p",
"types": ["other"]
}
I get success response as shown below:
Response:
{
"id" : "dfe583b1ac058750cf524f958afc5e82ade455d7",
"place_id" : "qgYvCi0wMDAwMDBhNWE4OWU4NTMzOjgwOGZlZTBhNjI3OjBjNTU1OTU4M2Q2NDI5YmM",
"reference" : "CkQxAAAAsPE72V-jhHUjj6vPy2HdC__2MhAdXanL6mlFBA4bcayRabKyMlfKFiah7U2vkoCj1P_0w9ESFSv5mfDkyufaZhIQTHBHY_jPGRHEE3EmEAGElhoUXTSylMslwHSTK5tYdstW2rOZKbw",
"scope" : "APP",
"status" : "OK"
}
When I search for this place using radar search, I get ZERO_RESULTS.
Request:
https://maps.googleapis.com/maps/api/place/radarsearch/json?key=key&radius=5000&location=37.761926,-121.891856&keyword=p2p
Response:
{
"html_attributions": [ ],
"results": [ ],
"status": "ZERO_RESULTS"
}
Is there something that I am doing the right way? Please help.
Thanks & Regards,
--Rajani

Your scope is "APP". That means you can access it (via PlaceID) from the application that created the entry only. If the location passes Google's moderation process, then it will gain scope "GOOGLE" and be accessible from the general searches.
scope — Indicates the scope of the place_id. The possible values are:
APP: The place ID is recognised by your application only. This is because your
application added the place, and the place has not yet
passed the moderation process.
GOOGLE: The place ID is available to other applications and on Google Maps.
Note: The scope field is included only in Nearby Search results and
Place Details results. You can only retrieve app-scoped places via the
Nearby Search and the Place Details requests. If the scope field is
not present in a response, it is safe to assume the scope is GOOGLE.
See: https://developers.google.com/places/documentation/search

Related

Is there a way to write an Expression in Power Automate to retrieve item from SurveyMonkey?

There is no dynamic content you can get from the SurveyMonkey trigger in Power Automate except for the Analyze URL, Created Date, and Link. Is it possible I could retrieve the data with an expression so I could add fields to SharePoint or send emails based on answers to questions?
For instance, here is some JSON data for a county multiple choice field, that I would like to know the county so I can have the email sent to the correct person:
{
"id": "753498214",
"answers": [
{
"choice_id": "4963767255",
"simple_text": "Williamson"
}
],
"family": "single_choice",
"subtype": "menu",
"heading": "County where the problem is occurring:"
}
And basically, a way to create dynamic fields from the content so it would be more usable?
I am a novice so your answer will have to assume I know nothing!
Thanks for considering the question.
Overall, anything I have tried is unsuccessful!
I was able to get an answer on Microsoft Power Users support.
Put this data in compose action:
{
"id": "753498214",
"answers": [
{
"choice_id": "4963767255",
"simple_text": "Williamson"
}
],
"family": "single_choice",
"subtype": "menu",
"heading": "County where the problem is occurring:"
}
Then these expressions in additional compose actions:
To get choice_id:
outputs('Compose')?['answers']?[0]?['choice_id']
To get simple_text:
outputs('Compose')?['answers']?[0]?['simple_text']
Reference link here where I retrieved the answer is here.
https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-write-an-expression-to-retrieve-answer/m-p/1960784#M114215

Not able to _include Organization resource for MedicationRequest resource

My medication request resource contains a reference to Organization resource:
"requester": {
"agent": {
"reference": "Practitioner/12345",
"display": "Abhishek Nayyar"
},
"onBehalfOf": {
"reference": "Organization/56789",
"display": "XYZ Hospital"
}
},
I want to fetch this Organization Resource along with medication request resource using a single api call. I am doing this:
GET https://FhirServerBasePath/MedicationRequest?subject:Patient.identifier=1358&_include=MedicationRequest:requester:Organization
However, in the response, I am not getting organization resource. When I try to use the same query for Practitioner (which is also referenced under requester), I am able to fetch it successfully.
In STU3, the MedicationRequest requester search parameter only looks at MedicationRequest.requester.agent. There is no 'standard' search parameter that looks at MedicationRequest.requester.onBehalfOf, which means that unless the server supports a custom search parameter based on that element, there's no way to do an _include for it.

How to prevent unnecessary G Suite API data consumption?

I am currently consuming data from the G Suite API.
An inconvenience I have found is that for some of the APIs the number of resources available might be quite large.
For instance, when I consume the Users:list API (https://www.googleapis.com/admin/directory/v1/users), given the number of resources and the maximum number of results per query I need to perform a significant number of queries. Find below an example JSON response:
{
"kind": "admin#directory#users",
"etag": "\"WqpSTs-zelqnIvn63V............................/v3ENarMfXkTh9ijs3OVkQRoUSVU\"",
"users": [
{
"kind": "admin#directory#user",
"id": "7720745322191632224007",
"etag": "\"WqpSTs-zelqnIvn63V........................PfcSmik3zEJwHAl1UbgSk\"",
"primaryEmail": ...,
...
},
{
"kind": "admin#directory#user",
"id": "227945583287518253104",
"etag": "\"WqpSTs-zelqnIvn63V..........-zY30eInIGOmLI\"",
"primaryEmail": ...,
...
},
...
N-users
...
]
}
I am running this query several times a day.
Ideally I would only retrieve the resources that have changed and the new ones, excluding from the response the ones that have not changed.
Is it possible to do that? If so, how?
Thank you in advance for your answers.
You could create custom attributes for your users, and then filter your requests using the query parameter according to your custom attribute.
Or define exactly what you mean by "changed" or "not changed" as the user properties will change on every login to update the last login attribute.
Update:
You can watch for changes on the list of users in your domain by supplying an address to receive notifications in a POST request to the watch endpoint:
https://www.googleapis.com/admin/directory/v1/users/watch
References:
Users.watch
Custom User Fields
Query string for User fields

Google Plus Domains Api Activities: insert 403 Forbidden

I try to use insert activity request through this special form http://joxi.net/J2bykQQS4XYxXm
{
"object": {
"originalContent": "LaLALaLALa"
},
"access": {
"items": [
{
"type": "domain"
}
],
"domainRestricted": true
}
}
but always I have 403 error in answer. http://joxi.net/DrllG33c4vnb5r
I tried to use user_id instead me but had same results :(
Most likely, you are not doing this as part of a Google Domain. Now also known as "gsuite", this allows companies to be able to post messages that are visible to other members of the same company. This does not allow you to post messages that are available for most Google+ users to see.
There is no public API available from Google to let you post to the public Google+. There is an API available to select partners (such as HootSuite) which let them post to the public Google+, but they seem to be slow or reluctant to add additional partners.

Does google allow businesses to use "Did you Mean" feature as an api?? I would like to use it but I am not getting anything

I want to use Google API for Did you mean feature. So basically I want to write a piece of code, which sends a word to Google search and either Google finds the exact hits or gives a "DID YOU MEAN" reply which i would use.
Is it made available? Tried finding it but couldn't find.
So I invested some time and this what I've found
1/ You should have your custom search engine
https://cse.google.com
2/ Configure it to search all webs
https://support.google.com/customsearch/answer/2631040?hl=en
3/ Make query to that engine following the document
https://developers.google.com/custom-search/json-api/v1/using_rest
Spelling / Did you mean repairs if possible can be found in "spelling" section. (Irrelevant sections removed) . Fox ex: I searched for "devart" here
{
"kind": "customsearch#search",
"url": {
},
"queries": {
"request": [
]
},
"context": {
},
"searchInformation": {
},
"spelling": {
"correctedQuery": "deviantart",
"htmlCorrectedQuery": "<b><i>deviantart</i></b>"
},
"items": [
]
}
I had the same question and its downvoted also while they are allowing these questions on the site. You may want to read about the auto-complete apis here
https://stackoverflow.com/questions/40061449/google-auto-correct-api
Google Search autocomplete API?

Resources