15
\$\begingroup\$

I'm cooking up a question where I use a GET method to download a CSV file and do some stuff with it (no spoilers for now).

  1. The GET method requires an API key.
  2. I do not want to embed it in the question.
  3. I do not want to trouble reviewers to go and get the API key themselves.

Solutions I can think of:

Post a comment saying request the API key in 2nd Monitor. But this will cause problems to users who cannot/do not want to participate in chat.

How do I proceed ?


Update

I've already posted the question here Plot daily time spent on codereview.stackexchange.com

I followed tim's suggestion and posted the CSV for download as well.

\$\endgroup\$
10
\$\begingroup\$

I wouldn't post the API key anywhere. And that is fine, anyone could request a key and test your code, so it's working code.

But to help reviews, you might want to post an excerpt of the CSV file, or at least the structure of it.

If your code is somewhat modular it should be easy for a reviewer to exchange the API call to a file read to test the parts of your code that do stuff with the file.

\$\endgroup\$
17
\$\begingroup\$

Questions of this sort have been asked before, typically with google, twitter, facebook, or some other API.

Posting your key is not a good idea, ever, and it would be a small headache from a moderation perspective, because we typically have to edit your question, and get the revision history purged by the SE devs (manual deletes from the database).

The only solution that appears to work reasonably well, is to post code, blank out the keys, and then the reviewer will have to do a read-only, not a play-with, review.

Your code should be working code, but that does not mean working-for-everyone, just for you.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .