Google Calendar API - How to create a Calendar without duplicates - api

I would like to create a script in python that creates specific calendar in python for each user with Google Calendar API, I don't know how to to check if the calendar already exists, I don't know if I have to make an excel list with the name and id of the user or if there is an easier way..

Related

Google API to track document view and edits - google sheets

I maintain ~450 unique Google Sheets for all of the teachers in our school district (updated nightly using a python script). For auditing and reporting purposes I would like to track opens and edits of these Sheets.
I've found the Changes resource that should be able to help me identify edits, but that's only getting me halfway there. Is there any Drive API Resource out there that will identify page views (count, most recent) by user?
Track Google Drive document changes using the Reports API from the Admin SDK.
What you are trying to do can be achieved using the Reports API.You can have a list of all the file IDs and use the activities.list method and set the userKey parameter to "all" so that you get the activities from any user, or set a specific email address or user ID to get the information from a specific user only.
The applicationName parameter needs to be set to "drive" so that it recognizes that it is the Google Drives report the one you are accessing, and then for the filters parameter you can use for example "doc_id==12345" (replace 12345 with the file ID) to get the activity report from a specific document.
An example:
Note: Be aware that this can only pull information from the last 6 months.

With MS Graph API is there a way to search a group calendar and return meeting time even if only one of the group member is available?

I have to create a Microsoft Graph API to search a group's calendar. But want to have a meeting with any one person available at that time. What would be the possible way to do that?
You can use either Findmeetingstimes() or GetSchedule() to do so - they will return you the availability info for the users.
If you believe this a new feature which Microsoft needs to consider
implementing, then file a Microsoft uservoice; here's the link for it.

How do I extract user details for Bloomberg Desktop API connection?

If you type IAM <GO> in the terminal you'll be shown the UserID, UUID, CLID etc.
Is it possible to extract this information through blpapi when using the Desktop API to connect via BBComm? I've seen references to Identity and populating that by sending an AuthorizationRequest but it appears that's only relevant for SAPI/B-PIPE.
To the best of my knowledge and after asking a couple of Bloomberg reps - this isn't possible. The best work around which I've found is: each user creates an EQS screen called their UUID. Add some filtering which causes this screening to return nothing. Then the application, upon start up, requests all possible UUIDs as EQS screens and stops when it doesn't get back an error - that's the UUID.
This is a dirty, dirty hack and, granted, this only works if you have few distinct users using your system. You don't want to ask may users to create such a screen and probably don't want to iterate over thousands of EQS screen names.
There is a "SID report" which is provide together with monthly invoices from Bloomberg which contains the UUIDs for users - this can be used to look up existing users but when setting up a brand new account you have to manually copy this information out of the terminal.

Query Outlook Calendar for Locations on Events

Does anyone know if there is a way to retrieve locations on calendar events? It looks like the api currently only allows users to see title and start/end date on the event. I would like to be able to see the conference room location. Thanks!
Outlook Calendar REST API
When you query for events, you will always get the location back as well as the organizer, attendees, ...
Try the following api, for example:
https://outlook.office365.com/api/v2.0/me/calendarview?startDateTime=2017-07-01T00:00:00Z&endDateTime=2017-07-31T23:59:59Z&$top=10
or if you know the event ID, then you can use the following api:
https://outlook.office365.com/api/v2.0/me/events/[eventID]

Trello: how to generate an activity report using card list change dates

In an effort to unify and automate my activity report across multiple projects I am trying to generate a timeline-like report from several Trello boards.
An event on the timeline would be generated when a card is moved into the "Doing" list, with the time of list change as the start date.
The end date stays at the current date until the card is moved to the "Done" list at which point it's set to the date on which the activity was completed.
I've looked at some tools to connect Trello activity to Google Calendar, so far with no success:
Trello powerups: only provides due dates when connecting to the calendar
IFTTT - doesn't seem to provide Trello as a recipe source
Zapier - Only provides due date and last activity dates as source values
Ducksboard - No template available for this kind of visualisation
Ideally, an "API catalyst" like the ones listed above would be the best solution, alternatively any other suggestion on how to approach the problem using other tools is very welcome (I have a little experience with d3.js).
Just do it yourself with their API, you can check the guide.
Here's my algorithm for a similar task where I show which cards were having that user as a member, so basically it's like "which cards have I been working on yesterday?" report.
Connect Trello SDK;
Authorize user (only read permissions) when he clicks a button (so the popup doesn't get blocked);
Fetch /tokens/[token] endpoint to figure out the user's memberID;
Fetch /members/[memberID]/actions for a required period filtering only by addMemberToCard,removeMemberFromCard actions;
Run a loop over resulting array to figure out datetime difference between addMemberToCard and removeMemberFromCard for every card in the response;
Format everything and show to the user!
As an example, here's my realization of it: Trello Activity Report
Code is here: https://github.com/pistonsky/trello-activity-report
P.S. Instead of using addMemberToCard and removeMemberFromCard action types, you can filter by updateCard:idList and calculate the datetime difference between when card is moved from To Do to Done list.