Skip to content

Instantly share code, notes, and snippets.

@sabrehagen
Created June 6, 2017 07:00
Show Gist options
  • Save sabrehagen/1916b68f4297295dbf8bc58777853b8d to your computer and use it in GitHub Desktop.
Save sabrehagen/1916b68f4297295dbf8bc58777853b8d to your computer and use it in GitHub Desktop.
change `GET api/v1/users/592f6ac71cda6d03e88fa08b/follows?type=user&size=30&page=1`
to `GET /api/v1/social?
parentType=user &
parentId=592f6ac71cda6d03e88fa08b &
socialType=follow&childType=user`
change `PUT api/v1/users/childId/follows/parentId`
to `PUT /api/v1/social?
parentType=user &
parentId=parentId &
socialType=follow`
^^ no need for childId as this is the authenticated user
change `DELETE api/v1/users/childId/follows/parentId`
to `DELETE /api/v1/social?
parentType=user &
parentId=parentId &
socialType=follow`
^^ no need for childId as this is the authenticated user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment