Pomax / node-flickrapi

A node.js (and client-library) implementation of the Flickr API with oauth API key authentication and API method proxying
177 stars 52 forks source link

Adds RFC5987 and Flickr-specific encoding requirements for query values. #76

Closed nabeards closed 8 years ago

nabeards commented 8 years ago

While writing an app that lets me set the titles and descriptions on photosets, I found that the encoding applied to the querystring for these API requests was not up-to-spec for RFC5987 and Flickr, so they would often fail.

I added a function based on code found in MDN to both the node utils.js and the frontend Utils.js. I could not get the tests to run unfortunately, so I couldn't verify 100% functionality. I also didn't test the frontend at all, but inserted the function where it made the most sense.

Pomax commented 8 years ago

do you have any examplesof titles/descriptions that caused problems but that work with this patch? If so, we can simply extend the test runner with attempts to make those and see if they succeed)

nabeards commented 8 years ago

These are some that were failing for me:

Titles:

Wine and Grilled Cheese (Part 1)
It Was a Wine Centered Weekend! (Part 1)

Descriptions:

<p>This week we deviated from our guide a bit. We had a bottle of Zinfandel that we had purchased to have with dinner during the week so we looked online to see what cheeses would compliment it. Maria went to our local cheese shop (<a href="http://www.salumeria.com" rel="nofollow">www.salumeria.com</a>) in search of a Gouda or Asiago cheese. What she &hellip; <a href="http://wineandcheesefriday.lan/zinfandel-and-classico-cheese/" rel="nofollow">Continue reading</a>
<p>We purchased this wine a couple weeks back at Cline Cellars, http://clinecellars.com. Cline was an impromptu stop after visiting Morton&rsquo;s Warm Springs, for a day away from our &ldquo;SF summer&rdquo; (www.mortonswarmsprings.com) Our friends, Sabrina and Geoff, have visited Cline Cellars a few times and they were excited to share it with us. It didn&rsquo;t hurt &hellip; <a href="http://wineandcheesefriday.lan/cline-cellars-red-blend-and-toscano-cheese-with-black-pepper/" class="more-link">Continue reading</a></p>\n
Pomax commented 8 years ago

cheers! I'll turn those into generic tests and add them to the test.js file. This should all land in the next few hours.

Pomax commented 8 years ago

v0.4.1 published to npm

nabeards commented 8 years ago

Awesome, thanks!!