about summary refs log tree commit diff
path: root/third_party/lieer/discovery_doc.patch
blob: fd140ac6ef97495fc835652119037ce24247a524 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/lieer/remote.py b/lieer/remote.py
index 6e3973a..2b0b59e 100644
--- a/lieer/remote.py
+++ b/lieer/remote.py
@@ -386,7 +386,9 @@ class Remote:
     if timeout == 0: timeout = None
 
     self.http = self.credentials.authorize (httplib2.Http(timeout = timeout))
-    self.service = discovery.build ('gmail', 'v1', http = self.http)
+    with open('${DISCOVERY_DOC}', 'r') as file:
+      discovery_doc = file.read()
+      self.service = discovery.build_from_document(discovery_doc, http = self.http)
     self.authorized = True
 
   def __get_credentials__ (self):