Skip to content

Commit f7c5568

Browse files
Update get_annotations.py
1 parent c0aead5 commit f7c5568

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

Uses-Cases/Annotations/get_annotations.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def __init__(self, pdf_api: PdfApi, helper: PdfAnnotationsHelper):
77
self.pdfApi = pdf_api
88
self.helper = helper
99

10-
def get_annotations(self):
10+
def request_annotations(self):
1111
"""Get annotations from the page in the PDF document."""
1212
if self.pdfApi:
1313
self.helper.uploadFile(Config.PDF_DOCUMENT_NAME, Config.LOCAL_FOLDER, Config.REMOTE_FOLDER)
@@ -26,17 +26,3 @@ def get_annotations(self):
2626
else:
2727
logging.error(f"get_annotations(): Failed to get annotation in the document. Response code: {response.code}")
2828
return annotation_result
29-
30-
def get_annotation(self, annotation_id):
31-
"""Get annotation from the page in the PDF document."""
32-
if self.pdfApi:
33-
self.helper.uploadFile(Config.PDF_DOCUMENT_NAME, Config.LOCAL_FOLDER, Config.REMOTE_FOLDER)
34-
35-
args = {
36-
"folder": Config.REMOTE_FOLDER
37-
}
38-
response = self.pdfApi.get_text_annotation(Config.PDF_DOCUMENT_NAME, annotation_id, **args)
39-
if response.code == 200:
40-
logging.info(f"get_annotationn(): annotation '{annotation_id}' successfully found '{response.annotation.contents}' in the document '{Config.PDF_DOCUMENT_NAME}'.")
41-
else:
42-
logging.error(f"get_annotation(): Failed to get annotation in the document. Response code: {response.code}")

0 commit comments

Comments
 (0)