M
M
MusicMan_082013-11-21 12:12:56
CMS
MusicMan_08, 2013-11-21 12:12:56

How to create an event in the google calendar and add a product from the database to it?

I would like to implement the following: create an event in the google calendar and add a product from the database to it (that is, the product must be minus for the duration of the event from the database), as soon as the event ends, the product must return to the database. Is it possible to implement this based on google calendar and mysql? I would also like to ask for advice - how can I implement this, maybe not google + mysql, but use some cms where this can be implemented, or an application?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Vasiliev, 2013-11-21
@qmax

As far as I understand, the task is to:
1. save the event in the Google calendar and bind the product to it
2. when the event occurs, pull some api to block this product.
1.
The Google calendar API does not allow you to add arbitrary attributes to events, except perhaps in the description field. Therefore, it is better to store a bunch of event-goods in your database.
You can also look at gadgets that can be added to events:
https://developers.google.com/google-apps/calendar/gadgets/
It seems that you can stuff anything into gadgets, including a link to a product.
2. There is a subscription to change events with push notification via http:
https://developers.google.com/google-apps/calendar/v3/push
It can be used to track when the event was rescheduled / canceled / etc.
However, there is no notification that the event has "arrived" because there is no "arrived" attribute.
Therefore, you also need to track the occurrence of the event yourself, on which cron thread.
2.2. You can add an email notification to the event and send it to the address of the robot that will block the product.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question