No-57 / orange-frontstage-api

0 stars 2 forks source link

Frontstage - Distributor related API design #20

Closed Vince-Ku closed 11 months ago

Vince-Ku commented 11 months ago

Feature

Following Distributor API's API design.

Get Distributor-like API (member-only)

Retrieve all the distributors liked by the logged-in user.

<Auth>
GET https://{domainhost}/distributors/like

Response

 "code": 10100
 "data": [
        { "id": 1},
        { "id": 12},
        { "id": 123},
  ]

Add Distributor-like API (member-only)

Add the distributor liked by the logged-in user.

<Auth>
POST https://{domainhost}/distributors/{distributor_id}/like

Response

 "code": 10100
 "data": nil

Delete Distributor-like API (member-only)

Delete the distributor liked by the logged-in user.

<Auth>
Delete https://{domainhost}/distributors/{distributor_id}/like
 "code": 10100
 "data": nil
Vince-Ku commented 11 months ago

@shadow3x3x3 please take a look if available.

shadow3x3x3 commented 11 months ago

It seems good.