Skip to content

Commit

Permalink
Merge pull request #4 from AntoninoBonanno/master
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
AntoninoBonanno authored Nov 14, 2021
2 parents 1dd3532 + 3f07153 commit 3182943
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
composer.phar
composer.lock
composer-test.lock
vendor/
vendor/
.idea
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@

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
- Affiliation Retrieval API
- 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:

Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Scopus API for PHP (Unofficial)",
"minimum-stability": "stable",
"license": "MIT",
"version": "1.1",
"version": "1.2",
"authors": [
{
"name": "Kaspars Jaudzems",
Expand Down
5 changes: 5 additions & 0 deletions src/Scopus/Response/AbstractCoredata.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,9 @@ public function getIssn()
{
return $this->data['prism:issn'];
}

public function hasError()
{
return isset($this->data['error']) ? $this->data['error'] : false;
}
}
2 changes: 1 addition & 1 deletion src/Scopus/Response/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3182943

Please sign in to comment.