benjcunningham / googlecalendar

Easily access and modify calendars, events, and UI settings via the Google Calendar API
Other
12 stars 6 forks source link

Edit a resource by supplying a locally-modified object #14

Open benjcunningham opened 8 years ago

benjcunningham commented 8 years ago

Editing resources by passing parameters is useful, but it's kind of annoying as the size of ... grows. I want to be able to capture an object, modify it locally, and push it back to the API (along the lines of an UPDATE). This way, we can do things like:

event <-
  gc_summary("Concerts") %>%
  gc_event_query(q = "Cloud Nothings")

event$summary <- "Cloud Nothings / Protomartyr"
event$location <- "Gabe's IC"

gc_event_update(event)
gc_summary("Test Calendar") %>%
  modifyList(list(
    summary = "Update Test Calendar",
    location = "NYC"
  )) %>%
  gc_update()