3

Within the web app for courses I organize, I'd like students to be able to provide their Stack Overflow username, so that we can pull in their most recent and unanswered questions. This information is already publicly available, but I'd like to pull it in through an API and list them together, so that students can see what's being asked and answer each other's questions.

1 Answer 1

2

It would be simpler and more precise if you made users provide their ID number instead (for example, yours is 1637442 on Stack Overflow).

Then you'd merely use the /users/{ids}/questions route to get the questions.


If you really must have access by username, then:

  1. First do a search using the inname parameter of the /users route.
    It is recommended that you cache these results, since they will change infrequently.

  2. Then run the /users/{ids}/questions as before.

2
  • Thanks for the help! I somehow wasn't finding this browsing the API docs. A few more notes for those with similar problems: A) You can list up to 100 ids, delimited by semicolons. B) You can further filter questions by unanswered or with no answers, etc. C) There are some good sorting options in the doc links provided. Commented Nov 17, 2014 at 14:58
  • Thanks, I would 'upvote', but I don't have that privilege on stackapp yet lol. Commented Nov 18, 2014 at 0:51

You must log in to answer this question.

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