Browse Source

changed doc format in OPS API to retrieve PDF images

main
Simon Bowie 2 years ago
parent
commit
0dee3abc9f
2 changed files with 3 additions and 4 deletions
  1. +3
    -3
      site/ops_api.php
  2. +0
    -1
      site/public/id_search.php

+ 3
- 3
site/ops_api.php View File

@@ -42,7 +42,7 @@ function get_publication_details($document_reference) {
$access_token = get_access_token();

// OPS API credentials (details at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf)
$ops_url = $_ENV["OPS_URL"] . 'rest-services/published-data/publication/epodoc/' . $document_reference . '/biblio';
$ops_url = $_ENV["OPS_URL"] . 'rest-services/published-data/publication/docdb/' . $document_reference . '/biblio';

// Set up API call
$ch = curl_init();
@@ -92,7 +92,7 @@ function check_for_images($document_reference) {
$access_token = get_access_token();

// OPS API credentials (details at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf)
$ops_url = $_ENV["OPS_URL"] . 'rest-services/published-data/publication/epodoc/' . $document_reference . '/images';
$ops_url = $_ENV["OPS_URL"] . 'rest-services/published-data/publication/docdb/' . $document_reference . '/images';

// Set up API call
$ch = curl_init();
@@ -115,7 +115,7 @@ function get_images($document_reference){
$access_token = get_access_token();

// OPS API credentials (details at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf)
$ops_url = $_ENV["OPS_URL"] . 'rest-services/published-data/publication/epodoc/' . $document_reference . '/images';
$ops_url = $_ENV["OPS_URL"] . 'rest-services/published-data/publication/docdb/' . $document_reference . '/images';

// Set up API call
$ch = curl_init();

+ 0
- 1
site/public/id_search.php View File

@@ -120,7 +120,6 @@ include '../ops_api.php'
endif;
?>


<?php
if (check_for_images($result['doc_ref'])):
?>

Loading…
Cancel
Save