From 3aa0df277f03fd8ae64624a5f2fbd59b9332e682 Mon Sep 17 00:00:00 2001 From: ninobonanno Date: Wed, 30 Dec 2020 14:39:29 +0100 Subject: [PATCH 1/2] fixed getYear, added hasError method --- src/Scopus/Response/AbstractCoredata.php | 5 +++++ src/Scopus/Response/Entry.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Scopus/Response/AbstractCoredata.php b/src/Scopus/Response/AbstractCoredata.php index 5e56e2b..65cabab 100644 --- a/src/Scopus/Response/AbstractCoredata.php +++ b/src/Scopus/Response/AbstractCoredata.php @@ -124,4 +124,9 @@ public function getIssn() { return $this->data['prism:issn']; } + + public function hasError() + { + return isset($this->data['error']) ? $this->data['error'] : false; + } } diff --git a/src/Scopus/Response/Entry.php b/src/Scopus/Response/Entry.php index e61f4c8..ab16723 100644 --- a/src/Scopus/Response/Entry.php +++ b/src/Scopus/Response/Entry.php @@ -122,7 +122,7 @@ public function getYear() } else if ($this->getCoverDisplayDate() != null) { $date = date_parse($this->getCoverDisplayDate()); } - return ($date) ? $date['year'] : null; + return (isset($date)) ? $date['year'] : null; } //Entry di SEARCH_AUTHOR_URI From 2716124da22508001c23dd8f9c945e10e25e2111 Mon Sep 17 00:00:00 2001 From: Antonino Bonanno Date: Sun, 14 Nov 2021 22:45:26 +0100 Subject: [PATCH 2/2] Update README.md --- .gitignore | 3 ++- README.md | 23 ++++++++++------------- composer.json | 6 +++--- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 53fe2fa..fae90fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ composer.phar composer.lock composer-test.lock -vendor/ \ No newline at end of file +vendor/ +.idea \ No newline at end of file diff --git a/README.md b/README.md index 6a7dee6..62d23b6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ PHP SDK for [Scopus APIs](https://dev.elsevier.com/scopus.html) -Currently supported APIs: +Currently, supported APIs: - Scopus Search API - Abstract Retrieval API - Author Retrieval API @@ -10,15 +10,9 @@ Currently supported APIs: - Search Author API - Citation Overview API -Original Project: [https://github.com/kasparsj/scopus-api-php](https://github.com/kasparsj/scopus-api-php) - -Custom Project: [https://github.com/AntoninoBonanno/scopus-api-php](https://github.com/AntoninoBonanno/scopus-api-php) - ## Installation -`composer require kasparsj/scopus-search-api` (Original project) - -Overwrite this project to the original project if you want to use my updates +`composer require kasparsj/scopus-search-api` ## Usage: @@ -63,10 +57,13 @@ foreach ($results->getEntries() as $entry) { https://kasparsj.github.io/scopus-api-php/ -## My contribution -* Added Search Author API -* Added Citation Overview API -* Created a support function to retrieve Document of specific Author easly -* Updated classes +## Changelog +- 14/11/2021 - v1.2 + * Bug fix +- 19/05/2020 - v1.1 + * Added Search Author API + * Added Citation Overview API + * Created a support function to retrieve Document of specific Author easly + * Updated classes [Bonanno Antonino](https://github.com/AntoninoBonanno) \ No newline at end of file diff --git a/composer.json b/composer.json index db7685e..f75856a 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { "name": "kasparsj/scopus-search-api", "description": "Scopus API for PHP (Unofficial)", - "minimum-stability": "dev", + "minimum-stability": "stable", "license": "MIT", - "version": "1.1", + "version": "1.2", "authors": [ { "name": "Kaspars Jaudzems", @@ -15,7 +15,7 @@ } ], "require": { - "guzzlehttp/guzzle": "6.2.1" + "guzzlehttp/guzzle": ">=6.3.0" }, "autoload": { "psr-0": {