chbrown / twttr

Twitter API client for Clojure supporting REST and Streaming endpoints
35 stars 11 forks source link

add example of generating credentials from standard map #8

Open realgenekim opened 5 years ago

realgenekim commented 5 years ago

Thank you for this wonderful library!

I didn't want to set environment variables, instead wanting to generate credentials from inside REPL. Enclosed is a small addition to README.md that shows an example that generates credentials from a standard map. I think other people might find this valuable?

chbrown commented 5 years ago

Thanks for your kind words & interest in improving this library! Good idea with the additional example! I have two concerns, after which I'd be happy to merge it:

  1. I've fielded a couple issues, I forget whether for this library or for twitter-api, of users coming up against various "bugs" because there's a lot of stuff that Twitter's API only supports when using user authentication. So the example should be first and foremost to create user credentials, and then — maybe as an aside or "pro-tip" — a note about preparing app credentials.
  2. The examples keys/secrets should look more like actual values. Obfuscated, of course, but it's helpful to know, for example, where to copy & paste your app key vs. access token, which is easy to distinguish if the (obfuscated) examples look like the real values, since the app key is quite a bit shorter than the user token. Feel free to reuse the example values from the snippet in the Testing section