From a388af55a88602318159b8a52150a6a49e1be6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Cholewi=C5=84ski?= Date: Sun, 25 Feb 2018 19:12:59 +0100 Subject: [PATCH] Add some shortcuts for Google, Facebook, Instagram --- requests_oauth2/services.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 requests_oauth2/services.py diff --git a/requests_oauth2/services.py b/requests_oauth2/services.py new file mode 100644 index 0000000..8baab9e --- /dev/null +++ b/requests_oauth2/services.py @@ -0,0 +1,22 @@ +from requests_oauth2 import OAuth2 + + +class GoogleClient(OAuth2): + site = "https://accounts.google.com" + authorization_url = "/o/oauth2/auth" + token_url = "/o/oauth2/token" + scope_sep = " " + + +class FacebookClient(OAuth2): + site = "https://www.facebook.com/" + authorization_url = "/dialog/oauth" + token_url = "/oauth/access_token" + scope_sep = " " + + +class InstagramClient(OAuth2): + site = "https://api.instagram.com" + authorization_url = "/oauth/authorize" + token_url = "/oauth/access_token" + scope_sep = " "