Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

86
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda