Office 365 REST API showing Calendar's which are already deleted - rest

I managed to query all the calendars from a user:
https://outlook.office.com/api/v2.0/users/xxxx#xxxx.com/calendars?$top=50
getting up to 50 calendars from the user
Unfortunately, the query also returns deleted calendars from the user as well. I did not find a OData field to indicate deleted calendars (https://msdn.microsoft.com/office/office365/api/complex-types-for-mail-contacts-calendar#OdataQueryParams) or similar.
What I did was the following:
I logged in as the user in Microsoft Outlook and deleted a calendar from the user in the client. After closing and reopening Outlook, the calendar was deleted as expected. But when I query for all calendars via the REST API I still get the calendar which I deleted but no way to distinguish what the user can actually see, as all fields returned do not include anything pointing to the fact that it is a deleted calendar.
What can I do to get the same view on the calendars as the user gets with the client, or how do I "really" manage to delete a calendar without the REST API returning it?
If I can chose, I would rather know how to distinguish them properly ;)

Related

How do I get GraphQL to get live/new data from database without polling?

I have a backend running GraphQL, MongoDB + Mongoose, and Apollo. This application has functionality for user accounts and a friends list. Each user can login to their account and see a list of friends with their current 'status'; If a friend changes their status, I need that change to be reflected on the user's side. An example of this is like facebook's "green dot" on messenger that tells you when one of your friends is online using the application.
I have been searching documentation for GraphQL and have been suggested either Subscriptions or Live Queries. Subscriptions seem to be the majority of suggestions from what I understand, live queries are not officially part of GraphQL or were dropped.
Does anyone have a solution to getting "live" data with GraphQL/MongoDB that doesn't involve polling for this scenario?
You already seem to have your answer: subscriptions!
Using your example, consider two users - mikep17 and mcy. You are mikep17, logged into your application and viewing your list of friends and their statuses. I am your friend, and I log in as you are viewing this list, and you want to see that in your application's UI.
On the frontend, in your application's instance, your application will execute a subscription to some event. Let's call it friendStatusChange. Now your application is "listening" for that event in order to respond accordingly. Let's assume that when your application receives the event, it can parse out the information that "I" (mcy) have changed from offline => online and then use that to add the "green dot" next to my username.
On the backend, your GraphQL server will have code that handles your user functionality - logging in, logging out, etc. It will need to be enhanced to hook into these actions and "publish" the friendStatusChange event as applicable.
Now, instead of your client constantly asking (polling) "did a friend's status change? how about now? now?", it can just listen and wait for your server to tap it on the shoulder and say "hey buddy, your friend mcy's status changed".

Tracking statistics for frontend user login in TYPO3 8

I would like to generate statistics for a site, specifically which frontend user is logged in at specific times of the day, how many users are/were logged in, etc.
I have searched but couldn't find any extension that already does this. Does anyone know of either a TYPO3 extension or an external tool that already does this? Will Piwik track the information I am looking for?
We have a compatible extension for tracking FE-User.
Features:
Configure who should be tracked (configurable in Extensionmanager):
only non logged in visitors
only logged in Frontend-User
logged in and non logged in Frontend-User
Configure if the user data of logged in user should be tracked (configurable in Extensionmanager). If you don't track that user data, the tracking records behave like non logged in user.
Optionally track IP-Address (configurable in Extensionmanager)
Backend-Modul with:
Overview about all trackings
Listing by page
Listing by user
Listing by object (downloads, news, shop products, portfolios and more)
CSV export for tracking records
User restriction: Admin user see the whole tracking data. Editor user only the data from current selected page.
Tracking for pages and objects like:
Displaying News (EXT:news)
Downloading Files (EXT:downloadmanager with type restricted)
Products (EXT:shop)
Configure your own object by TypoScript
If it's interesting for you, get in contact with us.

Office365 Exchange and Exchange 2010 give different responses to the same getEvent operation

I have Exchange on Office365 and a local Exchange 2010 both of which I use for EWS communication. When I issue request to the Exchange on Office365 I get back a response in a certain format, this format differs from the content I get back from the local Exchange 2010.
Specifically, I have pull notifications up and running. Every minute I issue a GetEvents request to get the events that were created/modified/deleted since the last notification. The issue is that when I modify an event in the calendar, I do get a notification of a modified event, but I get several of them and I also get a notification that an event has been created, but no, only one event was modified.
So why does EWS send back a response with multiple modified objects and a single created object.
This is only an issue when an event is modified, creating an item works fine.
Also are there any other specific issues I need to look out for when dealing with notifications?
Sometimes I wish Exchange Documentation wasn't as bad.
The reason why you get many items in a single event is because the event also contains the parent folder of the item that was modified because most things in Exchange occur at the folder level. With that said you get 2 types of objects literally ItemEvent and FolderEvent. You can filter them using linq of some if statement ex.
lstCreatedContactIds = From e In pArgs.Events.OfType(Of ItemEvent)()
Where e.EventType = EventType.Created
Select e.ItemId

Calendar+ does not automatically update subscribed calendars

I'm using ownCloud and its Calendar+ application.
This application is really great as it allows me to include external (ical) calendars. However, it seems as if the subscribed calendars are not refreshed automatically. New events on the subscribed calendars are not automatically visible in Calendar+.
Question 1: is there a way to automatically refresh subscribed calendars?
One of the subscribed calendars is my "Upcoming Events" calendar from Facebook. When creating the ical subscription, all the event have been included pretty flawlessly, but now there are new events in this calendar which won't be synched (as already mentioned in Question 1).
When manually refreshing the calendar, the update fails (Just "Update failed") without any detailed description. Does anyone have the same issues? Is there a workaround?
Thanks,
Tom

How can I delete a group of posts that my app created?

My app sent out a batch of posts tonight that were created erroneously. I would like to delete them, but I don't currently store the ids of posts that I create.
Is there a way to query for posts made after a certain time?
Once I have the ids I think I know how to delete them.
I'm using the Ruby gems facebooker2 and mogli.
You can retrieve the posts from feed or home connection of user.
For using those connections to read users post you will need read_stream permissions from user (which may be a bit problematic in your case if you not yet have this permission granted) and active access_token (this one will be needed to remove the posts too).
feed connection can be easily parsed to get posts from your application (since every post object have application property containing name and id)
home connection contain much more details to parse but you can filter results by application using filter (like /USER_ID/home/filter=app_2305272732).
Once you discovered the posts you may delete 'em by issuing DELETE request to Graph API:
DELETE https://graph.facebook.com/POST_ID?access_token=...
Or several posts for same user:
DELETE https://graph.facebook.com/?ids=POST_ID_1,POST_ID_2,POST_ID_N?access_token=...
Notes:
Since you said you didn't stored ids of post that published, more problematic may be discovering the list of users who got posted.