Ruby API Wrapper with search support -- SmugMugAPI V 0.9.5
pth
Registered Users Posts: 49 Big grins
The syntax is a little messy, but not too bad:
Or
I added proper cookie processing so, if you are logged in you will get private results. This does not work for other people's passworded galleries, but it is a start. The last part of the method name (nickname in the above example) is the name of the feed. The results will be parsed and are exposed as are the rest of the api results (with a little magic for handling "entries").
If you have any questions or problems (this is lightly tested, but working for me), please let me know.
pth
smugmug.global_feed.popular(:all, :image_count => 10, :size => :large).entries.each do |entry| puts entry.title puts entry.id end
Or
smugmug.login("hurleyhome", IO.read('password').chomp) do recent = smugmug.user_feed.nickname recent.entries.each do |entry| puts entry.title puts entry.id end end
I added proper cookie processing so, if you are logged in you will get private results. This does not work for other people's passworded galleries, but it is a start. The last part of the method name (nickname in the above example) is the name of the feed. The results will be parsed and are exposed as are the rest of the api results (with a little magic for handling "entries").
If you have any questions or problems (this is lightly tested, but working for me), please let me know.
pth
0