One to many geo points order by route travel time - api

I got a tricky use case.
We got a selection of custom interest points in our database.
From a mobile app, a client should be able ask to get the list of point of interests, order by real travel time.
It's not a shortest path problème, it's really several possible points, and the client will choose by himself the point he prefers, depending of the travel time between his position and one of the destination.
So the answer must be quick and can not be precalculated.
We could have in the worst case, 50 to 100 points.
So i'm looking for an WEB API that can be called in France where I can send several route optimisation queries at once.
a json body could looks like this, with more points of course:
[
{
"from": {
"lat": "user current lat",
"lon": "user current lon"
},
"dest": {
"lat": "point1 lat",
"lon": "point1 lon"
}
},
{
"from": {
"lat": "user current lat",
"lon": "user current lon"
},
"dest": {
"lat": "point2 lat",
"lon": "point2lon"
}
},
{
"from": {
"lat": "user current lat",
"lon": "user current lon"
},
"dest": {
"lat": "point3 lat",
"lon": "point3 lon"
}
},
{
"from": {
"lat": "user current lat",
"lon": "user current lon"
},
"dest": {
"lat": "point4 lat",
"lon": "point4 lon"
}
}
]
And then the response would send the route optimization information for each point.
Do you know any api that have this possibility, or any solution to manage this use case ?

I finally found a solution with some help.
The distance Matrix API + a middle-ware will answer to my needs.
https://developers.google.com/maps/documentation/distance-matrix/overview

Related

2022: Get LinkedIn Posts via Access Token

I have been looking for an updated version of how to retrieve my own posts from LinkedIn via an access token which I have received from completing a three-legged OAuth process.
I have reviewed: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api?view=li-lms-unversioned&tabs=http#permissions- but its now showing as legacy.
As it seems, LinkedIn unfortunately no longer wants us to retrieve this kind of content:
"Find Posts by authors is only supported for organization authors.
Finding by member authors is not supported."
Source
Neither a good, nor a solution within the LinkedIn-TOS (I assume) would be to use a webscraper. I have seen some solutions online but they are all very pricey in my opinion (and you never know if they get shut down by LinkedIn)
{
"activity": "urn:li:activity:12345657",
"content": {
"contentEntities": [
{
"entity": "urn:li:article:0",
"entityLocation": "https://www.example.com/content.html",
"thumbnails": [
{
"imageSpecificContent": {},
"resolvedUrl": "https://www.example.com/image.jpg"
}
]
}
],
"description": "content description",
"title": "Test Share with Content"
},
"created": {
"actor": "urn:li:person:A8xe03Qt10",
"time": 1471967236000
},
"distribution": {
"linkedInDistributionTarget": {}
},
"id": "6173878065928642560",
"lastModified": {
"actor": "urn:li:person:A8xe03Qt10",
"time": 1471967237000
},
"owner": "urn:li:organization:123456789",
"text": {
"text": "Test Share!"
}
}

Zoho Recruit API Register / Login Candidate

Could someone guide me an idea of how to create the registration and login for candidates with the Recruit api? I'm making a flutter app and I need my candidates to register and log in trow the app and see the job opening, post jobs.
At the moment I created the user with [POST] https://recruit.zoho.com/recruit/v2/Candidates
{
"data": [
{
"Email": "mail#gmail.com",
"First_Name": "TheName",
"Last_Name": "TheLastName",
"Mobile": "000000000",
"Expected_Salary": "8000000",
"Country": "PY",
"Departamento": "Central",
"C_I": "37114594",
"Ciudad_de_residencia": "City",
"$Password":"myPassWord199**"
}
],
"trigger": [
"approval",
"workflow",
"blueprint"
]
}
Works Well, got success
{
"data": [
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2022-06-15T20:47:23-04:00",
"Modified_By": {
"name": "Admin",
"id": "00000000000000"
},
"Created_Time": "2022-06-15T20:47:23-04:00",
"id": "00000000000000",
"Created_By": {
"name": "Admin",
"id": "00000000000000"
}
},
"message": "record added",
"status": "success"
}
]
}
But If I try to log in in the web version (for testing the new candidate) don't work, but if it see the dashboard, the user exist. Need to add something else?
Basically I need a register api and a login one for the created record of the candidate.
Any help will be awesome, Thanks

How to display data in table using Keystone6 component in custom page so it looks same?

I have build custom page in Keystone6 using this docs
Now I am getting data from GraphQL query.
{
"members": [
{
"__typename": "Member",
"id": "ckwluj7jd1675l4l8e9yfcwtt",
"name": "User 2",
"companyName": "company1",
},
{
"__typename": "Member",
"id": "ckwltsw620162l4l88g8ox4zo",
"name": "User 1",
"companyName": "company2",
},
{
"__typename": "Member",
"id": "ckwm061f8436554l8ab4ic3dsd5o",
"name": "User 3",
"companyName": "",
}
]
}
Now I am trying to display it on custom page but I am not sure how to use Keystone6 admin component to display data.
Ronald here from the Keystone Team.
At the moment there’s no way to do this using official Keystone components. We’re working on a next-gen Admin UI in 2022 that will make it easier for you to achieve this.

MongoDB aggregation on location data: Skip document/row if no movement

I have data as sampled below.
I would like to query the location data from MongoDB and skip rows (or documents in my case) where no movement happens. I can't group by location (lon and lat) as a location can be used as a start/end point multiple times.
Basically: $skip if lat and lon is the same as in the document with the timestamp earlier to the current one.
In the sample I would want to skip the second and fourth document.
I figured that should be somehow possible with $skip in aggregation and and a $cond or $lookup operation.
Thanks in advance!
{
"_id": {"$oid": "5ee4dbe8d30bb8f72598731a"},
"vehicle": "CF729EE12AA98C3673266DF965FD89CB4C8D2E84",
"lat": 52.51312,
"lon": 13.317027,
"timestamp": {"$date": "2020-06-10T11:10:48.040Z"}
},
{
"_id": {"$oid": "5ee4dbe8d30bb8f725987c24"},
"vehicle": "CF729EE12AA98C3673266DF965FD89CB4C8D2E84",
"lat": 52.51312,
"lon": 13.317027,
"timestamp": {"$date": "2020-06-10T11:16:22.662Z"}
},
{
"_id": {"$oid": "5ee4dc21d30bb8f725a33905"},
"vehicle": "CF729EE12AA98C3673266DF965FD89CB4C8D2E84",
"lat": 52.53564,
"lon": 13.42169,
"timestamp": {"$date": "2020-06-11T15:57:50.290Z"}
},
{
"_id": {"$oid": "5ee4dc21d30bb8f725a3421d"},
"vehicle": "CF729EE12AA98C3673266DF965FD89CB4C8D2E84",
"lat": 52.53564,
"lon": 13.42169,
"timestamp": {"$date": "2020-06-11T16:03:23.421Z"}
}
]```

Cumulocity measurement representation

I create measurements at reception of an event, I can get them using the API, but they are not represented graphically in the Device Management interface. I there a specific format they would have to respect to be representable automatically? If so, is there a place I can find all the formats supported by Cumulocity? I infered the c8y_TemperatureMeasurement from the examples in the doc but I didn't find an exhaustive list of the native formats.
Here are examples of the measurements I have at the moment:
{
"time": "2016-06-29T12:10:02.000+02:00",
"id": "27006",
"self": "https://<tenant-id>/measurement/measurements/27006",
"source": {
"id": "26932",
"self": "https://<tenant-id>/inventory/managedObjects/26932"
},
"type": "c8y_BatteryMeasurement",
"c8y_BatteryMeasurement": {
"unit": "V",
"value": 80
}
},
{
"time": "2016-06-29T10:15:22.000+02:00",
"id": "27010",
"self": "https://<tenant-id>/measurement/measurements/27010",
"source": {
"id": "26932",
"self": "https://<tenant-id>/inventory/managedObjects/26932"
},
"type": "c8y_TemperatureMeasurement",
"c8y_TemperatureMeasurement": {
"T": {
"unit": "C",
"value": 24
}
}
}
The measurements have to be sent to Cumulocity in the following format:
{
"fragment": {
"series": {
"unit": "x",
"value": y
}
}
}