Open
Description
Hi.
I'm trying to add support of HAL. I read #42 and #44. But I still have many questions. I've made a first attempt to adapt Restangular. Please, see the commit with my comments: https://github.com/KonstantinLepa/restangular/commit/5b71894aa149de807dbafd5afc5e9256e6e181e8. It doesn't work correctly now.
There are my problems:
- Processing of _embedded property. It's optimization only. It can exist or not exist. It must be transparent to the client. How should I implement it?
- Chaining of methods. For example, messages, from and unread for
$scope.user.one('messages', 123).one('from', 123).getList('unread');
are relations. They are not parts of URL. What will happen if from relation doesn't exist in a data? I thinkone('from', 123)
must return an empty restangular object. Or not?
Thanks
P.S. Also, HAL supports the CURIE syntax http://tools.ietf.org/html/draft-kelly-json-hal-06#section-8.2. But I didn't think about it.