Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

[WIP] Patron API implementation + example libraries #417

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

thesebas
Copy link

@thesebas thesebas commented Jun 2, 2016

This pull request is just placeholder for #416, will try to implement and let you know when it's ready ASAP :)

@raphaelm
Copy link
Member

raphaelm commented Jun 2, 2016

Uh, awesome! Excited to see this coming :)

@johan12345
Copy link
Collaborator

Very nice that you are starting to implement this :)

Just a small remark: It seems the library software that hosts these OPACs is called PATRON, so I think it would be better to change both the name of the API class and the keyword for the JSON files to Patron and patron , respectively (or maybe Patron4 and patron4). @raphaelm, do you agree?

@thesebas
Copy link
Author

thesebas commented Jun 2, 2016

Patron/patron sounds good.

@thesebas
Copy link
Author

thesebas commented Jun 2, 2016

What about new SearchResult.MediaTypes? I'd like to add two quite common I think: "Sheet Music", "Old Print" and there are other two exotic I'm not interested in (something called "Regional Bibliography" and "Social Life Documentation"). Is it just matter of adding them as enums or there is more dependent code?

@johan12345
Copy link
Collaborator

"Music Sheet" should be SCORE_MUSIC. "Old print" is something that could be added. I don't think we need the two exotic ones either, you can just assign UNKNOWN to those.

When you add something like OLD_PRINT to the SearchResult.MediaType enum, you also need to modify the getResourceByMediaType function so that the app knows which icon to display for this media type. Do you have a suggestion for an icon to use? Maybe something like the letter "A" in an old font? The other icons we use are mostly from materialdesignicons.com, but I have not found something appropriate there yet.

@johan12345 johan12345 changed the title Opac4 API implementation + example libraries Patron API implementation + example libraries Jun 2, 2016
@raphaelm raphaelm changed the title Patron API implementation + example libraries [WIP] Patron API implementation + example libraries Jun 3, 2016
@raphaelm
Copy link
Member

Hi @thesebas, just for your information, we just merged a major change into the master branch: We now no longer hold the JSON files inside the git repository but on a webserver. The goal is that we can update them easily without issuing an app update every few weeks. For now, you can go an as you currently do, but if you are done you'll need to remove the JSON files from the PR and we need to add them to the webservice.

@thesebas
Copy link
Author

Hi @raphaelm, I've rebased my pull request on current master, I'd like to remove json files now but to do tests if it works I need to have those json files in your webservice, probably I should create PR in https://github.com/opacapp/opacapp-config-files, is it enough?

@johan12345
Copy link
Collaborator

You should be able to test it without us adding the JSON files to the webservice. Maybe you need to copy this file to your src/main/assets folder.

Nevertheless, I have already added your three JSON files to the webservice, so they should also appear when you run gradlew downloadJson.

For additional libraries, you can create a PR at opacapp-config-files, we will add them then.

@thesebas thesebas force-pushed the opac4api branch 4 times, most recently from d873214 to 59f984f Compare October 21, 2016 06:58
@raphaelm
Copy link
Member

FYI, I disabled them in the webservice again to avoid them being included in our 5.0.3 release :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants