Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mr-sunglasses/friendly-adventure
https://github.com/mr-sunglasses/friendly-adventure
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mr-sunglasses/friendly-adventure
- Owner: Mr-Sunglasses
- Created: 2023-05-29T22:36:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-05-29T22:36:45.000Z (over 1 year ago)
- Last Synced: 2024-05-02T10:24:17.429Z (8 months ago)
- Language: Python
- Size: 175 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Google Calendar API OAuth 2.0 for Web Server Applications Integration - Django Rest Framework
Problem: In this assignment you have to implement google calendar integration using django rest api.
You need to use the OAuth2 mechanism to get users calendar access. Below are detail of API endpoint and corresponding views which you need to implementFor run this project on a local machine:
- Create virtual environment
https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
```sh
pip install - r requriments.txt
```- Endpoint:
```
/rest/v1/calendar/init/ -> google_calendar_init_view()
```
This view should start step 1 of the OAuth. Which will prompt user for his/her credentials```
/rest/v1/calendar/redirect/ -> google_calendar_redirect_view()
```
![](urls_result.png)This view will do two things
1. Handle redirect request sent by google with code for token. You
need to implement mechanism to get access_token from given
code
2. Once got the access_token get list of events in users calendar### Note: To run this assignment need google account credentials which need to save in the project directory and add a redirect URL in your google cloud. Please read below documents and references section.
## Documents and References
| Name | Sources |
| ------ | ------ |
| Google Identity: Using OAuth 2.0 for Web Server Applications | [/identity/protocols/oauth2/web-server][PlDb] |
| Google Calendar API | [/calendar/api/v3/referenc][PlGh] |
| Google Account Credentials| [/identity/protocols/oauth2/web-server#exchange-authorization-code][PlIa] |[PlDb]:
[PlGh]:
[PlIa]: