Bläddra i källkod

Added some comments and a license

main
Simon Bowie 3 år sedan
förälder
incheckning
26217403aa
3 ändrade filer med 53 tillägg och 22 borttagningar
  1. +21
    -0
      LICENSE
  2. +11
    -0
      site/ops_api.php
  3. +21
    -22
      site/public/index.php

+ 21
- 0
LICENSE Visa fil

@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Simon Bowie <ad7588@coventry.ac.uk>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 11
- 0
site/ops_api.php Visa fil

@@ -1,5 +1,16 @@
<?php

# @name: ops_api.php
# @version: 0.1
# @creation_date: 2021-09-24
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: Performs functions against the European Patent Office's Open Patent Services (OPS) API
# @acknowledgements:
# OPS documented at https://www.epo.org/searching-for-patents/data/web-services/ops.html
# OPS RESTful API specification at http://documents.epo.org/projects/babylon/eponet.nsf/0/F3ECDCC915C9BCD8C1258060003AA712/$File/ops_v3.2_documentation_-_version_1.3.16_en.pdf
# OPS API functions list at https://developers.epo.org/ops-v3-2/apis

function 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)

+ 21
- 22
site/public/index.php Visa fil

@@ -1,5 +1,12 @@
<?php

# @name: index.php
# @version: 0.1
# @creation_date: 2021-09-24
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: Home page for the application

include '../random.php';
include '../ops_api.php';

@@ -7,28 +14,6 @@ $random_record = random_record();

?>

Document reference no.:

<?php

echo $random_record['doc_ref'];

?>

<br><br>

<?php

if (get_publication_details($random_record['doc_ref'])):

?>

<br><br>

<?php
endif;
?>

Application ID:

<?php
@@ -80,3 +65,17 @@ Abstract:
echo $random_record['abstract'];

?>

<br><br>

<?php

if (get_publication_details($random_record['doc_ref'])):

?>

<br><br>

<?php
endif;
?>

Laddar…
Avbryt
Spara