Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new routes to Coral API #292

Merged
merged 8 commits into from
Dec 19, 2017

Conversation

veggiematts
Copy link
Contributor

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

@veggiematts veggiematts added the enhancement This is an enhancement (not a bug) label Sep 14, 2017
@jeffnm jeffnm added this to the Version 2.1.0 Beta milestone Dec 14, 2017
@jsavell jsavell self-assigned this Dec 14, 2017
@jsavell
Copy link
Contributor

jsavell commented Dec 18, 2017

This all looks good and tested fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement (not a bug)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants