Code Monkey home page Code Monkey logo

Comments (3)

cloudybear avatar cloudybear commented on June 12, 2024 1

yup, i was missing the time_min & time_max params. It worked after setting these. My mistake, it was my confusion with what default date range that get_events() would return

from google-calendar-simple-api.

kuzmoyev avatar kuzmoyev commented on June 12, 2024

Hi, thanks for the issue submission.

The .get_events() method by default gets events from now to the same date next year (if there are instances of recurring events in this time range, it will return the "original" recurring events as well, that looks to be the case for your primary calendar example). Please check if the events you expect from the secondary calendar are in this time range. If not, you need to set time_min and/or time_max parameters.

As for ordering, by default, it uses "unspecified stable order" (whatever that means in Google's lingo). You can specify the order_by argument. So:

from gcsa.google_calendar import GoogleCalendar

hb_calendar = GoogleCalendar('[email protected]', credentials_path ='/Users/user2/Desktop/testingGoogleAPI/src/credentials.json')

time_min = datetime(...)
time_max = datetime(...)

for event in hb_calendar.get_events(time_min, time_max, order_by="startTime"):
   print(event)

If you still can't get the expected events, please share the screenshot of the event in UI.

from google-calendar-simple-api.

cloudybear avatar cloudybear commented on June 12, 2024

ah got it. thanks for additional info on .get_events().

So for my secondary calendar, here's the id:
image

There's a few events shown below:
image
To preface, the events i created in this calendar usually has no title, if that matters.

edit: I just realized what you said about get_events. let me try to set the time_min and time_max first and try

from google-calendar-simple-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.