Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

538
Views
¿Cómo puedo saber cuándo se agregó o eliminó un evento del calendario de Google?

Quiero sincronizar mi propio calendario (react-big-calendar) con Google Calendar. Puedo recuperar eventos del calendario de Google desde un calendario principal y mostrarlos en mi propio calendario creado con la biblioteca react-big-calendar. Cuando agrego un nuevo evento a un calendario de Google, también quiero ver el evento agregado a mi propio calendario sin recargar la página. Porque en cada recarga llamo a una función que recupera los eventos de un calendario de Google. Pero necesito hacerlo una vez que haya un cambio en Google Calendar. ¿Cómo puedo hacer eso?

Back-end: Python, Django

Interfaz: reaccionar js

 # authorization def get_crendetials_google(): flow = InstalledAppFlow.from_client_secrets_file( "credentials.json", SCOPES) creds = flow.run_local_server(port=8080) pickle.dump(creds, open("token.txt", "wb")) return creds @api_view(['GET']) def get_all_events(request): creds = None if path.exists("token.txt"): creds = pickle.load(open("token.txt", "rb")) if not creds or not creds.valid: if creds and creds.expired and creds.refresh_token: creds.refresh(Request()) else: creds = get_crendetials_google() result = [] # instantiating a calendar and retrieving google events try: service = build("calendar", "v3", credentials=creds) response = service.events().list(calendarId="primary").execute() for event in response["items"]: title = event.get("summary") obj = {} if title: obj["title"] = title obj["start"] = event["start"] obj["end"] = event["end"] result.append(obj) result = reformat_events(request, result) except OSError as err: return Response({'error': "OS error: {0}".format(err)}, status=400) return Response(result, status=200)

 useEffect(() => { getEvents(); }, []); const getEvents = async () => { let response = await fetch("http://localhost:8000/gcevents/", { method: "GET", headers: { "Content-Type": "application/json", Authorization: "Bearer " + String(authTokens.access), }, }); let data = await response.json(); if (data) { props.sendEvents(data); } };

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!