Created
November 8, 2018 18:42
-
-
Save TaylorAckley/df187a4ab0504643cee2c8930ccf263c to your computer and use it in GitHub Desktop.
HATEOS PIPE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user.resource = 'https://www.mysite.com/api/users/12345' | |
user.$links = [ | |
{ | |
rel: 'page', | |
href: 'https://www.mysite.com/users/12345' | |
}, | |
{ | |
rel: 'self', | |
href: 'https://www.mysite.com/api/users/12345' | |
} | |
] | |
user.$actions = [ | |
{ | |
rel: 'promote', | |
href: 'https://www.mysite.com/api/users/12345/promote', | |
css: 'btn btn-primary', | |
icon: 'faMenuUp', | |
text: 'Promote' | |
}, | |
{ | |
rel: 'confirm', | |
href: 'https://www.mysite.com/api/users/12345/confirm', | |
css: 'btn btn-primary', | |
icon: 'faThumbsUp', | |
text: 'Confirm' | |
}, | |
{ | |
rel: 'delete', | |
href: 'https://www.mysite.com/api/users/12345/delete', | |
css: 'btn btn-danger', | |
icon: 'faRemove', | |
text: 'Delete' | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment