API Interface - Switch or Two Different Interfaces

I am studying interface design.

Here is what interests me.

  • Some of the open APIs support two different interfaces for switching. those. install the circuit like. It separates as an interface (e.g. undo)
  • What is the advantage of separating these two (splitting into two interfaces makes the end user more complex in my view).

I doubt it, as it can be implemented when switching.

i.e. the user sends item_id and user_id. server check the database (this element is already liked or not) and update.

Thanks for the answer!

+4
source share
2 answers

, , (.. ).

API, , , like --. , do the opposite of what I did previously ( flip-flopping). like unlike, API, , , , .

, , 1-2 API , ; , API 1 , .

, like , like d, API .

+1

, , , . , , .

, , , , .

0

Source: https://habr.com/ru/post/1624032/


All Articles