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

feat: New paths for backend API #26

Merged
merged 20 commits into from
Jul 27, 2022
Merged

feat: New paths for backend API #26

merged 20 commits into from
Jul 27, 2022

Conversation

aadarsh-ram
Copy link
Collaborator

@aadarsh-ram aadarsh-ram commented Jul 25, 2022

What

  • Creates new paths for retrieval and updation of nodes in a taxonomy
  • List of GET paths created:
Paths Description
"/nodes" Retrieves all node information in taxonomy
"/entry/{entry}" Retrieves information on entry with id = {entry}
"/entry" Retrieves all nodes with label "ENTRY"
"/synonym/{synonym}" Retrieves information on synonym with id = {synonym}
"/synonym" Retrieves all nodes with label "SYNONYMS"
"/stopword/{stopword}" Retrieves information on stopword with id = {stopword}
"/stopword" Retrieves all nodes with label "STOPWORDS"
"/header" Retrieves information on header of taxonomy
"/footer" Retrieves information on footer of taxonomy
  • List of POST paths created:
Paths Description
"/edit/entry/{entry}" Editing an entry in taxonomy with id = {entry}
"/edit/synonym/{synonym}" Editing a synonym with id = {synonym}
"/edit/stopword/{stopword}" Editing a stopword with id = {stopword}
"/edit/header" Editing header of taxonomy
"/edit/footer" Editing footer of taxonomy

Part of

@aadarsh-ram aadarsh-ram requested a review from a team as a code owner July 25, 2022 08:14
@aadarsh-ram aadarsh-ram requested a review from alexgarel July 25, 2022 08:15
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool @aadarsh-ram , you are on the right path.

Although I would have concentrated first on "entry" not the rest, because here you run the risk of having to fix lots of same errors on each API, while you could learn first on entries, and then do the rest (it's just an advice).

There are things to separate and factorize.

backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
@aadarsh-ram aadarsh-ram requested a review from alexgarel July 26, 2022 07:58
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good @aadarsh-ram

I still request quite a lot of change so that we have a perfect code :-)

backend/editor/api.py Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/api.py Outdated Show resolved Hide resolved
backend/editor/entries.py Outdated Show resolved Hide resolved
backend/editor/entries.py Outdated Show resolved Hide resolved
backend/editor/entries.py Outdated Show resolved Hide resolved
backend/editor/entries.py Outdated Show resolved Hide resolved
backend/editor/entries.py Outdated Show resolved Hide resolved
@aadarsh-ram aadarsh-ram requested a review from alexgarel July 26, 2022 10:24
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one single comment :-)
You understood previous comments very well.

backend/editor/api.py Outdated Show resolved Hide resolved
Co-authored-by: Alex Garel <alex@garel.org>
@aadarsh-ram aadarsh-ram requested a review from alexgarel July 26, 2022 13:46
backend/editor/api.py Outdated Show resolved Hide resolved
@aadarsh-ram aadarsh-ram requested a review from alexgarel July 27, 2022 07:51
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @aadarsh-ram,

Let's merge :-)

@alexgarel alexgarel merged commit d5891fe into main Jul 27, 2022
@alexgarel alexgarel deleted the crud-backend branch July 27, 2022 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Add POST methods for backend API Add GET methods in backend API
2 participants