mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-15 01:43:10 +00:00
* chore: remove `apiclient` (#57339)
(cherry picked from commit 6d31af3a52)
# Conflicts:
# pyproject.toml
* chore: resolve conflict
* chore: bump python-youtube to 0.9.9
---------
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from apiclient.discovery import build
|
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
from pyyoutube import Api, PyYouTubeException
|
||||||
|
|
||||||
|
|
||||||
class VideoSettings(Document):
|
class VideoSettings(Document):
|
||||||
@@ -28,7 +28,7 @@ class VideoSettings(Document):
|
|||||||
def validate_youtube_api_key(self):
|
def validate_youtube_api_key(self):
|
||||||
if self.enable_youtube_tracking and self.api_key:
|
if self.enable_youtube_tracking and self.api_key:
|
||||||
try:
|
try:
|
||||||
build("youtube", "v3", developerKey=self.api_key)
|
Api(api_key=self.api_key).get_i18n_languages(parts="snippet")
|
||||||
except Exception:
|
except Exception:
|
||||||
title = _("Failed to Authenticate the API key.")
|
title = _("Failed to Authenticate the API key.")
|
||||||
self.log_error("Failed to authenticate API key")
|
self.log_error("Failed to authenticate API key")
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ dependencies = [
|
|||||||
# integration dependencies
|
# integration dependencies
|
||||||
"googlemaps",
|
"googlemaps",
|
||||||
"plaid-python~=7.2.1",
|
"plaid-python~=7.2.1",
|
||||||
"python-youtube~=0.8.0",
|
"python-youtube~=0.9.9",
|
||||||
|
|
||||||
# Not used directly - required by PyQRCode for PNG generation
|
# Not used directly - required by PyQRCode for PNG generation
|
||||||
"pypng~=0.20220715.0",
|
"pypng~=0.20220715.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user