how to create a meeting in English using graph api - microsoft-graph-api

When I create a meeting using Teams or Outlook directly, the info is something like:
Join Microsoft Teams Meeting
+xx xxxx China, All locations (Toll)
Conference ID: xxx xxx#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
But when I use the graph api to create the meeting(https://graph.microsoft.com/v1.0/me/calendar/events), the info will be in Chinese like:
欢迎加入会议
+xx xxxx 中国, ....
....
I don't want to create the meeting in Chinese, how should I use the graph api?

Related

using microsoft graph api list events for a room

in microsoft graph api I can obtain a list of rooms
https://graph.microsoft.com/v1.0/places/microsoft.graph.room
how do I view the events for one of these rooms?
looks like my options for events are
/users/{id | userPrincipalName}/calendar/events
/groups/{id}/calendar/events
/users/{id | userPrincipalName}/calendars/{id}/events
/users/{id | userPrincipalName}/calendarGroups/{id}/calendars/{id}/events
is the room a "user"? or is it a "group"? not quite sure given a room find the events that occurring in that room.
Places does not have any relationship to events.
You should be able to only filter events for specific user or group by a location.
Example
GET /me/calendar/events?$filter=location/displayName eq 'xxx'
GET /users/{id | userPrincipalName}/calendar/events?$filter=location/displayName eq 'xxx'

SendBird: Search personal chat along with group chat

SendBird treats every channel as their GroupChannel. The 1:1 chat too is technically a GroupChannel with only two users (with isDistinct = true so it would return the personal chat when you attempt to create it again).
My question is, how do I search GroupChannels by their name those include group AND 1:1 chat? The group chat would have a common name that would be shown to all the users in the group. But for 1:1 chat, the GroupChannel won't have a name, and if it has, that won't be shown to the users as for 1:1 chat, we always show the other person's name (like almost all the chat systems work).
Typically the main UI list contains mixture of the group chat and 1:1 chats (all the GroupChannels).
--------------------------------
| Search Chat TextField |
|--------------------------------|
|1 John (1:1) |
|2 John's Birthday Plan (group) |
|3 Johnney Eve (1:1) |
|4 Johansson Fans (group) |
| ... |
--------------------------------
All the items are technically GroupChannel. Note that all the 1:1 chats don't have actual name as shown in the list. The name shown in the list is the other person's nickname.
Expectation:
Now, if the user searches something like "joh", then it should return all the group chats whose name contains "joh" OR all the 1:1 chats where the other person's name contains "joh". (Basically all the items shown in the above example.)
My Attempt:
My initial solution to achieve this is to keep the 1:1 channel name as <user1 nickname> & <user2 nickname>, so when the user searches for the other user by their name, the 1:1 channel would appear just like a group channel.
Example Code:
query = SBDGroupChannel.createMyGroupChannelListQuery()
query?.order = .latestLastMessage
query?.limit = 30
query?.channelNameContainsFilter = "joh"
query.loadNextPage(...)
The Problem:
The problem with this are:
If the user searches for their own name (or just the separator character & or just a whitespace), then too all the personal chat would be visible, which is irrelevant.
My system allows user to change their nickname, so every time a user changes their nickname, then all the 1:1 channel names have to be updated (which is painful).
Sunil,
Typically when you retrieve a list of group channels for a user, it retrieves all channels that the user is potentially a part of (Depending on the memberStateFilter).
If you were explicitly looking to search, rather than providing an ongoing list of channels the user is part of, you may be able to filter channels by userIds. You'd have to filter for a channel that consists of the searching user, and the desired user.
Lets look at an example, assuming your userId is John and you're looking for your chat with Jay:
let listQuery = SBDGroupChannel.createMyGroupChannelListQuery()
listQuery?.userIdsExactFilter = ["John", "Jay"]
listQuery?.loadNextPage(completionHandler: { (groupChannels, error) in
guard error == nil else {
// Handle error.
}
// Only channelA is returned in a result list through the "list" parameter of the callback method.
...
})
If you wanted to explicitly use nicknames:
let listQuery = SBDGroupChannel.createMyGroupChannelListQuery()
listQuery?.nicknameContainsFilter = ["John", "Jay"]
listQuery?.loadNextPage(completionHandler: { (groupChannels, error) in
guard error == nil else {
// Handle error.
}
// Only channelA is returned in a result list through the "list" parameter of the callback method.
...
})
You mention that you allow users to change their nicknames, and thus rooms have to be updated. It may be worth giving your group channels (even 1:1) generic names, and then dynamically generate the display name of each chat.
Since each channel returns the list of members, you could look at the array of members, filter out the user that is logged in, and then pull the nickname of the remaining user from the array. This would ensure that no matter what the user changes their nickname to, its always accurate, and you don't have to update every channel when the user updates their nickname.
************ Updated 02/10 ************
Thanks for providing an example of what you're looking to achieve. It looks like you're essentially trying to search both channelNameContainsFilter and nicknameContainsFilter using the OR operator. This is not something we (Sendbird), currently support within the iOS SDK. So the question is, what could you do to achieve this?
One option would be to utilize the Platform API to obtain this information. The List my group channels has the search_query and search_fields parameters which would allow you to utilize that OR operator to find both channel names and nicknames that match your value.
Alternatively, since the SDK does return all of the necessary data that would be required to filter for these results, you could create a front-end filter that would only display the items that match your filter results. So the SDK returns the complete channel list, you store that list, and then when the user searches, you filter through the list to find channels that match your needs and display only those.
As a side note, Stackoverflow may not be the best place for this type of discussion as there is a lot of back and forth. Please feel free to join us in our community for more support.

How to count cypher labels with specific condition?

I have a graph database with information about different companies and their subsidiaries. Now my task is to display the structure of the company. This I have achieved with d3 and vertical tree.
But additionally I have to write summary statistics about the company that is currently displayed. Companies can be chosen from a dropdown list which is fetching this data dynamically via AJAX call.
I have to write in the same HTML a short summary like :
Total amount of subsidiaries for CompanyA: 300
Companies in Corporate Havens : 45%
Companies in Tax havens 5%
My database consists of two nodes: Company and Country, and the country has label like CH and TH.
CREATE (:TH:Country{name:'Nauru', capital:'Yaren', lng:166.920867,lat:-0.5477})
WITH 1 as dummy MATCH (a:Company), (b:Country) WHERE a.name=‘CompanyA ' AND b.name='Netherlands' CREATE (a)-[:IS_REGISTERED]->(b)
So how can I find amount of subsidiaries of CompanyA that are registered in corporate and tax havens? And how to pass this info further to html
I found different cypher queries to query all the labels as well as apocalyptic.stats but this does not allow me to filter on mother company. I appreciate help.
The cypher is good because you write a query almost in natural language (the query below may be incorrect - did not check, but the idea is clear):
MATCH (motherCompany:Company {name: 'CompanyA'})-[:HAS_SUBSIDIARY]->(childCompany:Company)
WITH motherCompany,
childCompany
MATCH (childCompany)-[:IS_REGISTERED]->(country:Country)
WITH motherCompany,
collect(labels(country)) AS countriesLabels
WITH motherCompany,
countriesLabels,
size([countryLabels IN countriesLabels WHERE 'TH' IN countryLabels ]) AS inTaxHeaven
RETURN motherCompany,
size(countriesLabels) AS total,
inTaxHeaven,
size(countriesLabels) - inTaxHeaven AS inCorporateHeaven

How to filter Quickblox users?

I want to filter my application users based on their phone number or email, but I don't want exact match, instead part of the email or part of the number users should return in response. Is there a way in Quickblox iOS SDK?
Suppose, I've some quickblox users like below :
ID NAME Email Address Mobile Number
User1 | yuyuqabc#somedomain.com | +91-12345-67890
User2 | qerqrorp#somedomain.com | +1-123-000-7891
User3 | xyzabcqry#somedomain.com | +64-123-456-78
Now the filter should apply like this,
if I want to query on email, which contains "abc" then should return 1st and 3rd user.
if I want to query on phone number, which contains "23" then should return all users.
if I want to query on phone number, which contains "234" then should return 1st and 3rd user.
Is it possible?
It is possible only if you will use CustomObjects module instead of Users.
So you will need to create User class in CustomObjects and you will have all operators working there.
In Users it is impossible.

How to Get Lattitude and Longitude of US Interstate Exits programmatically?

Is there a way to do that using open source map / API (Google Map API, Microsoft Live Map API)?
Or is there a way to traverse roads and junction from map files? (if I purchase commericial map data)
Thanks.
Edit: Either open source or API
A possible solution based on openstreetmap depending on the quality of OSM data in the US.
As described here "Exit ramps/slip roads should be tagged as highway=motorway_link or highway=primary_link" if you import the map data for the US (using osm2pgsql) you can then select all motorway links.
E.g. (selects based on my own data, i.e. very much outside US)
openmapdb=# select osm_id, name, ref from planet_osm_roads where highway='motorway_link';
osm_id | name | ref
----------+------+-----
23683997 | |
26436348 | |
[..]
23683997 and 26436348 are the OSM ids - if you click on the links you'll see they are indeed entry/exit ramps.
Once you've identified a way, you can access the latitude and logitude:
openmapdb=# select astext(st_transform(way, 4326)) from planet_osm_roads where osm_id = '23683997';
LINESTRING(24.8757131412186 44.8730730514894,[..]
(1 row)

Resources