bounswe / bounswe2022group4

6 stars 3 forks source link

Backend: Implement endpoint for the image annotations that returns all annotations for the given post #530

Closed MercerFrey closed 1 year ago

MercerFrey commented 1 year ago

Description:

We need endpoints for the image annotations that will return the all annotations for the given post. Also we want to implement another endpoint for the creation of an annotation using this endpoint vie POST request. Annotations should be compatible with the Web Annotation Data Model.

Steps:

1) Create GET request with the api/annonations/image/post/ endpoint. It should return all annotations for the given post. 1) Create POST request with the api/annonations/image/post/ endpoint. It will create the appropriate annotation by using the following data. It should create the necessary annotation and returns it in the format that is compatible with the Web Annotation Data Model standard.

{
    "geometry": {
        "x": 76.45089285714286,
        "y": 27.060267857142854,
        "width": 14.732142857142847,
        "height": 32.85714285714286
      },
      "data": {
        "text": "jjjjjjj",
        "id": 0.48996757053793494,
        "source": "http://example.org/post-slug1313"
      }
}

Deadline: 24.12.2022 23.59

MercerFrey commented 1 year ago

539 . These two endpoints are implemented. Now it is possible to create and get annotation for the given post. Closing