-
Notifications
You must be signed in to change notification settings - Fork 7
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
Expose 'POST' request to REST API #80
Comments
I'm not opposed to adding a 'POST' request to the REST API, but I would be unlikely to give that access to everyone since the potential for creating a mess is pretty high. That's why almost no data repositories (Comic Vine, League of Comic Geeks, Wikipedia, etc) exposes that method. If I were to implement it, I would most likely only grant it to folks who have a track record of good editing, so you don't have problems like adding copyrighted material, duplicate entries, etc, to the database. Now to implement a 'POST' request isn't terribly hard, it would pretty much only need to change the ViewSets from it's current
|
Thanks for that thoughtful response! I agree with your assessment that the editing capabilities should be restricted to a limited set of contributors, based on some criteria. I alluded to that in passing when I mentioned "authentication" in my issue. Regarding the Regarding limiting access to trusted contributors, is this something you have planned to implement or something that already exists? The credentials ThreeTwo passes in the request can have a mapping of roles within Metron that can determine if the user is allowed to edit/add content? |
Django's authentication system has a groups model which is what I'd use to grant permission for Users that have valid account authentication, but not Users that don't have valid account authentication, would receive a HTTP 401 Unauthorized response. |
I like that. My own app is built using Typescript. I can stand up a microservice to auth against the Metron API and make calls to it. Is there some documentation or Swagger or anything that I can use to start a scaffold? |
Current api docs are located here: https://metron.cloud/docs/ |
Thanks! I'll keep this "rfc" open so we can track all the important details. |
@bpepple I looked at the "Edit" page for a series, and tried to infer the fields I need to make available to be edited by users in ThreeTwo. Do you have a formal schema that I can look at? I use mongo as my data store and for metadata providers such as Metron, I plan to maintain all the information in a sub document. My current schema looks like this: https://github.com/rishighan/threetwo-import-service/blob/master/models/comic.model.ts |
Do the schemas in the docs (bottom of page) not provide the info you're looking for? |
Thanks @bpepple ! |
Hello @bpepple I finally got around to fetch some information from the Metron API, and present it in the UI. It all went swimmingly and thanks for the beautiful documentation! Now, specifically about the response of {
"id": 1623,
"__str__": "Wolverine: Black, White & Blood (2021)",
"modified": "2021-02-07T11:10:03.192288-05:00"
}, I am curious as to why the key for what seems to be the To that end, I wanted to ask: is it feasible to change If not, I would just like to know the rationale for my information, and I can work with |
The To fix this I would probably need to add the In the future, it might be worthwhile to have API Improvements threads in the Discussions page to keep different items separated. |
Thank you! I will move this request to the Discussions thread. |
Is your feature request related to a problem? Please describe.
No it's not related to any problem.
Describe the solution you'd like
I'm the developer of a comic book curation app called ThreeTwo
I find Metron as the most pragmatic and scalable solution for comic book metadata outside of ComicVine. That said, I was wondering if you would be open to the idea of ThreeTwo allowing its users to add comic book metadata straight from ThreeTwo to Metron, with all the necessary fields. The most obvious benefit of this approach is that contextually, the users' library is managed within ThreeTwo, so it would make sense for the metadata to "sync" with Metron, loosely speaking.
Implementation-wise ThreeTwo would simply talk through an API exposed by Metron with authentication, and would push it into whatever moderation mechanism Metron has in place.
Conceptually speaking I think this would be a win-win for both ThreeTwo and Metron.
Additional context
Screenshots here on Discord: https://discord.com/channels/895398178092900412/895398178092900416/897151450910703637
The text was updated successfully, but these errors were encountered: