Generieren Sie eine Liste verfügbarer Zeitfenster aus Google Kalender

Ich suche nach einem Programm (Windows 7), einer Google Chrome-Erweiterung oder einem Skript, das meinen Google-Kalender einsehen und eine Liste mit Zeitfenstern erstellen kann, wenn ich für die nächsten X Tage verfügbar bin, z.

  • Montag, 13. April von 10 bis 13 Uhr
  • Montag, 13. April jederzeit nach 15:00 Uhr
  • Dienstag, 14. April jederzeit nach 13 Uhr
  • Mittwoch, 15. April von 10 bis 13 Uhr
  • Mittwoch, 15. April jederzeit nach 15:00 Uhr
  • Freitag, 17. April jederzeit nach 11:30 Uhr
  • Montag, 20. April von 10 bis 13 Uhr
  • Montag, 20. April jederzeit nach 15:00 Uhr
  • Dienstag, 21. April jederzeit nach 13 Uhr
  • Mittwoch, 22. April von 10 bis 13 Uhr
  • Mittwoch, 22. April jederzeit nach 15:00 Uhr
  • Freitag, 24. April jederzeit nach 11:30 Uhr
  • usw.

Antworten (1)

Mit Python und der Google Kalender-API können Sie die calendar.freebusy.queryMethode verwenden. Dies kann auch von Google App Engine verwendet werden und Sie können hier weitere Informationen finden .

Dies gibt zurück: Ein Objekt der Form:

{
"timeMax": "A String", # The end of the interval.
"kind": "calendar#freeBusy", # Type of the resource ("calendar#freeBusy").
"calendars": { # List of free/busy information for calendars.
  "a_key": { # Free/busy expansions for a single calendar.
    "busy": [ # List of time ranges during which this calendar should be regarded as busy.
      {
        "start": "A String", # The (inclusive) start of the time period.
        "end": "A String", # The (exclusive) end of the time period.
      },
    ],
    "errors": [ # Optional error(s) (if computation for the calendar failed).
      {
        "domain": "A String", # Domain, or broad category, of the error.
        "reason": "A String", # Specific reason for the error. Some of the possible values are:
            # - "groupTooBig" - The group of users requested is too large for a single query.
            # - "tooManyCalendarsRequested" - The number of calendars requested is too large for a single query.
            # - "notFound" - The requested resource was not found.
            # - "internalError" - The API service has encountered an internal error.  Additional error types may be added in the future, so clients should gracefully handle additional error statuses not included in this list.
      },
    ],
  },
},
"groups": { # Expansion of groups.
  "a_key": { # List of calendars that are members of this group.
    "errors": [ # Optional error(s) (if computation for the group failed).
      {
        "domain": "A String", # Domain, or broad category, of the error.
        "reason": "A String", # Specific reason for the error. Some of the possible values are:
            # - "groupTooBig" - The group of users requested is too large for a single query.
            # - "tooManyCalendarsRequested" - The number of calendars requested is too large for a single query.
            # - "notFound" - The requested resource was not found.
            # - "internalError" - The API service has encountered an internal error.  Additional error types may be added in the future, so clients should gracefully handle additional error statuses not included in this list.
      },
    ],
    "calendars": [ # List of calendars' identifiers within a group.
      "A String",
    ],
  },
},
"timeMin": "A String", # The start of the interval.

}

Dies sollte einfach zu verwenden sein, um das zu generieren, was Sie benötigen.

Sie können im API Explorer spielen, denken Sie aber daran, den OAuth-Schalter zu aktivieren.

Beachten Sie, dass die Mindestparameter sind:

{ "timeMin":"2015-01-01T00:00:00Z" "timeMax":"2015-02-01T00:00:00Z" }