Is it possible to query for place details with a list of place ids - ios

I know I can query for place details using a place id, but how do I query using a list of place ids? I'd prefer to do this in one call if I can.

Unfortunately there's no bulk lookup method in the iOS Places API. There's just the lookUpPlaceID method, but you can call it concurrently just fine to lookup several places in parallel.

Related

Trying to get analytics on Microsoft teams calls

I am trying to put together analytics on Microsoft teams calls. I would like to get hold times, number of transfers, call time, etc. I came across this call https://graph.microsoft.com/beta/communications/callRecords and it gives me a list of calls with call times, but I can't find a way to get hold times, what line it came in on, etc. Greatly appreciate any pointers.
First of all, this end point https://graph.microsoft.com/beta/communications/callRecords only allows you to query a single call record using its ID, it does not support querying a list of call records for the whole tenant or for a specific user.
The only way currently to find this ID to query the call record is by setting up a web hook to receive change notifications. Refer to the following documentation for more info on change notifications.
To directly address your question, i am not one hundred percent sure but i believe the information you're looking for could be found inside the list of sessions and segments inside a call record.

How to make a request to get all information of a tenant like microsoft teams does?

I was reading the Microsoft Graph API Documentation to batch queries right here and did not find what I need.
Basically I need to combine two or more requests but one depends to another value. I know there is a "dependsOn" feature to wait the other request, it is not what I am looking for.
Request one: GET '/me/joinedTeams';
Request two: GET 'teams/{groupId}/channels';
The "Request one" returns an array of groups and inside these array values there's an id property. Can I batch these two requests using the value of ther first one to get the second?
I am searching a way to do a GET and return all values of one teant like the Microsoft Teams Application does, returning all teams, all chats, etc. Batching requests is the more closer we can get it I think.
Or there is another way to generate the token to https://chatsvcagg.teams.microsoft.com/api/v1/teams/users/me url like Microsoft does?
#Gaspar, multiple api calls can be batched using json batching but any interdependent calls batch can not handle.
If you have any dependency, you have to make separate calls.

Tracking search query parameters

My rails application revolves around searching for 1 specific record given various filters. I'm trying to figure out what's the best way to keep track of search queries so in the future we can either do reporting or a dashboard. Basically I need insight into what users are looking for.
This is what a search query would look like:
http://localhost:3000/s?utf8=%E2%9C%93&location=New+York%2C+NY%2C+United+States&activity=Figure+Skating&start_time=Nov+13th+2015&end_time=Dec+25th+2015&period=morning&geolocation=%5B40.7127837%2C-74.00594130000002%5D
cleaner:
http://localhost:3000/s?utf8=%E2%9C%93&location=&activity=&start_time=&end_time=&geolocation=
You can add a hook in your search controller method that stores the params used in every search. Perhaps you can create a new model called Analytics, where every time someone searches for something the Analytics stores all the values of the search... that way you can have all the information stored in your db and you can analyze it.
The easiest way would be to track this via the Google Analytics:
https://support.google.com/analytics/answer/1012264?hl=en

How to retrieve recording relationship on release browse request on musicbrainz

i'm currently getting needed information from musicbrainz, using the following
browse request, browsing a specific artists releases + recordings.
for example: (coldplay)
http://musicbrainz.org/ws/2/release?artist=cc197bad-dc9c-440d-a5b5-d52ba2e14234&fmt=json&inc=recordings
im interested in getting for each recording its work id.
now i tried adding 'recording-rels' to the includes but it seems only to return relationship between release and recording.
I also tried adding 'recording-level-rels' to includes as mentioned here
where it states that it should return recordings relationships, but when i try using it - i get the following error:
{"error":"recording-level-rels is not a valid inc parameter for the release resource."}
Am I using it wrongly?
To clarify, i'm after the relationship that you get from their site, say from this page, where each release has recording of that contains a link to the musicbrainz work id page.
Any help\advice would be very appreciated,
Thank you.
Well, like you said: What you are doing is a browse request and the relationships you linked only work for release lookups.
So you can't get this information with one request.
The simple solution for this is to use:
http://musicbrainz.org/ws/2/release?artist=cc197bad-dc9c-440d-a5b5-d52ba2e14234
to get all releases (without recordings) and for every release:
http://musicbrainz.org/ws/2/release/bfae6df7-3ee2-4031-ac09-8dc63c6ce6ca?inc=recordings+recording-level-rels+work-rels
to get the associated works.
The above method has the problem that you need one request for every release.
You can do better if you do some matching on your end.
You can get your list(s) of recordings with
http://musicbrainz.org/ws/2/release?artist=cc197bad-dc9c-440d-a5b5-d52ba2e14234&inc=recordings
and the works with:
http://musicbrainz.org/ws/2/work?artist=cc197bad-dc9c-440d-a5b5-d52ba2e14234&inc=recording-rels
Using this information you can then match the works with the recordings on the releases.
Alternatively you can also get all recordings using
http://musicbrainz.org/ws/2/recording?artist=cc197bad-dc9c-440d-a5b5-d52ba2e14234&inc=work-rels
but there are usually more recordings and less works. Meaning there is not always a work attached to every recording.
Note that this method also needs more than 2 requests when you need to use limit/offset to get multiple pages of results.
The link to the API documentation about relationships is for MBID lookups and works only for them. So this here works for example:
http://musicbrainz.org/ws/2/recording/7137bd5b-7f93-40c0-a780-53784a8f6c5d?inc=work-rels
But in a browse query, which you are doing, this relatioship cannot be queried. I guess you have two options:
Query first all recordings by artist, then fetch work relations like
above.
Use something in the lines of http://musicbrainz.org/ws/2/artist/cc197bad-dc9c-440d-a5b5-d52ba2e14234?fmt=json&inc=recording-rels+work-rels and see if you can get the information you want out of that.

How to setup custom id-field in DB4O

I've read the documentation and samples multiple times and can't find out how to do this.,
I'm trying to wire up DB4O to use my own custom Id field. based on the documentation you can define your own IDs but as far as I can tell they won't replace Db4o's internal IDs, As in it won't actually use those Ids to identify the objects.
Basically all the examples do are tell Db4o to generate some sort of unique id and index it, I don't see anywhere on how to tell it that this is the ID that you should use.
Is it possible to have our own IDs on our model replace the internal IDs used to keep track of the relationships?
we need to have our own Ids since our system relies heavily on REST.
There no direct support for this. You need to create your own mechanism.
Simplest way: Use Guid on .NET. Or use a UUID in Java. In Java: Add UUID-Support: configuration.common().add(new UuidSupport());
Use callback to create new id's. Doesn't not work in TCP client/server.
See also this page.
Side note: You build a REST app. How many request does it need to handle? db4o is internally inherently single threaded. It can only handle a very limited load.

Resources