jemiahlee/bgg — pull request #1 by craineum (2014-06-06 00:53:30+00:00)
Title: Oo rework

Just to start this off, I do not want this merged... just wanted to get some feedback before I went to far down this road.

I also want to say I love the oo refactor that you have done! I just started thinking about writing a simple web app using some bgg data, so it was great to see the work being done!

For what I needed though it was just short on a couple of things. I need to run xml queries that would have been a pain with ruby objects. I have thus replaced xml parsing with nokogiri, and made xml available on each object. I was also looking to add some functionality that would belong in a higher level container (like the collection container you had).

If you are interested in reviewing this, just look at the collection stuff right now. High level description of what I did/plan to do:

1. Request objects that will hold specific info for gathering the data for a particular API
2. All results will be stored in enumerated containers (thus having array like functionality built in). Exception to this are things like user where only one record is returned.
3. All individual items will have their own containers (like your collection_item class)
4. XML will be accessible from all levels of results.
5. Put common functions into module mixins
6. Expand supported data and functions (like adding support for stats for a collection_item, or be able to get all ids for a collection)
7. Cleaned up specs and sample data.
8. Created BggResult as a placeholder until I finish the conversion.

I am going to keep working on this, but would like to see it merged in at some point if you are good with the direction, or maybe let me know how I might improve?

Thanks for your work again!