Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds new routes to the Coral API:
GET /resources/@id
Get resource by resource id
Example: http://coral.local/resources/api/resources/2
GET /resources?identifier=@id
Get resource(s) by ISBN or ISSN
Example: http://coral.local/resources/api/resources?identifier=12345
GET /resources/@id/titles
Get a package's titles
Example: http://coral.local/resources/api/resources/4/titles
GET /resources/@id/licenses
Get a resource's licenses
Example: http://coral.local/resources/api/resources/1/licenses
GET /organizations/@id
Get an organization
Example: http://coral.local/resources/api/organizations/536
This works whether the organization module is enabled or not
Please note that this PR includes the patch I proposed to fix Issue #145. This is not the patch proposed in PR #245, although it does the same thing.
I needed the patch for this pull request, because it allows to
momentarily change Database, allowing us to use objects from other modules, instead of writing SQL statements to gather informations from other modules, which is way cleaner (needed for the Organizations route, in case the Organizations module is enabled).