Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

82
Vistas
Google Calendar API doesn't return all events

I integrated the google API in my react project. I have about 300 Entries in my calendar but I only receive about 180 entries.

What is my Mistake?

Tank you!

const getEvents = async () => {
    function start() {
        gapi.client
            .init({
                apiKey: "MyKey",
            })
            .then(function () {
                return gapi.client.request({
                    path: `https://www.googleapis.com/calendar/v3/calendars/"myMail"/events`,
                });
            })
            .then((response) => {
                let events = response.result.items;
                console.log(events);
                setEventObject(events);
            });
    }
    gapi.load("client", start);
};

UPDATE This doesn't work. It seems like the additional parameters has no impact of the request...

const getEvents = () => {
    function start() {
        gapi.client
            .init({
                apiKey: "myKey",
            })
            .then(function () {
                return gapi.client.request({
                    path: `https://www.googleapis.com/calendar/v3/calendars/"myMail"/events`,
                    maxResults: 2500,
                    showDeleted: true,
                });
            })
            .then((response) => {
                let events = response.result.items;
                console.log(events);
                setEventObject(events);
            });
    }
    gapi.load("client", start);
};
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your passing your parameters the wrong way through the request. Checkout the google github

You need to pass the params URL params in key-value pair form.

return gapi.client.request({
    path: `https://www.googleapis.com/calendar/v3/calendars/"myMail"/events`,
    params: { maxResults: 2500, showDeleted: true }
});
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda