Closed bigbabou closed 10 years ago
Hi @bigbabou
Thanks for reporting, I'll take a look this evening.
ok I'm also stuck on this problem and there is others because of the model architecture and the discogs API :
The Release model has one to many Artist relationship. It is ok with /releases/{id}
but it won't work with /artists/{id}/releases
because the api gives a one-to-one relation between a release and artist
The solution I've found is to use another transformer, Hash or it would be great to have a simple NoopTransformer that gives \StdClass
Hi @esion
I also discovered the problem you're describing. When I find the time I'm going to rewrite the client so it uses Guzzle (http://docs.guzzlephp.org/en/latest/) and stop using the models at all. The models are nice for type hinting but besides that a pain in the *\ ;). It's much more flexible to use arrays.
For now I suggest to use the Hash transformer. If you have the time I'm open for any PR to fix this problem.
I'm closing this as the library is completely rewritten. If still actual could you test with 1.0.0 and open a new issue?
Sounds good. And really good choice to use semver tags.
Hi,
I use the API lib with your bundle wrapper in SF2.
When I try to get the releases http://api.discogs.com/artists/45/releases for example.
Before the transformation from standard class to model I have this :
but as result I have only the pagination when I call like this in my controller :
I only get the pagination and not the releases.
I think it's because of the
ResultSet
class which is used and doesn't have asetReleases
method.Hope this help.