[Rbrainz-users] Current mbxml implementation and user query.

Philipp Wolfer phw at rubyforge.org
Tue Jul 10 15:46:46 EDT 2007

2007/7/10, Nigel Graham <nigel at maven-group.org>:
>  I ended up making a get_entity_array method that returns a normal array
> instead of a Collection object.
>  I also made some of the methods take an extra namespace argument so they
> could be used for user queries.

We have authentication, that's great :-) I just wondered why this
get_entity_array is needed. I replaced it by a call to get_entity_list
and extracted the user from the collection. The missing scores
shouldn't be a problem since MBXML sets it to nil if not set.

While doing the changes I noticed that I don't like the interface of
Query very much. You always have to create filter or include objects
to pass them to the methods. The filters and includes are internally
useful and provide the capability to extend the filters/includes.
Query however should be an easy to use interface to the webservice.
Most time it would be sufficient and more convenient to pass the
filter hash directly to the methods in Query. What do you think?

Best regards,

Philipp Wolfer

More information about the Rbrainz-users mailing list