getByUser lists questions from a specific user ID. User IDs are returned by getByCategory, getQuestion, or questionSearch, and may also be found on the Answers site by mousing over any user nickname and observing the value of the show parameter.
http://answers.yahooapis.com/AnswersService/V1/getByUser
See information on constructing REST queries
| Parameter | Value | Description |
|---|---|---|
| user_id | string (required) | User ID: unique per user. See notes above on how to find it. |
| appid | string (required) | The application ID. See Application IDs for more information. |
| type | string: omit for default "all" | Question status. Set to "all", "resolved", "open", or "undecided". |
| filter | string: omit for default "question". |
Type of result set:
|
| sort | string: omit for default "date_desc". |
Result set sort field and order:
|
| start | integer: default 0 | Starting question to list, used to display further results. |
| results | integer : default 10, max 50 | Number of questions to be returned. |
| output | string: omit for default "xml" | Defines the output for the call. Accepted values are "xml", "json", "php", and "rss". |
| callback | string: default "" | If set, wraps the JSON object in call to the selected function. Only makes sense if output selected is JSON. |
Sample Request Url: http://answers.yahooapis.com/AnswersService/V1/getByUser?appid=YahooDemo&user_id=AA10001397
The schema document for this service response is located at http://answers.yahooapis.com/AnswersService/V1/QuestionResponse.xsd
| Field | Description |
|---|---|
| ResultSet | Contains all of the questions listed. |
| Question | Contain an individual question's data. Has attributes:
|
| Subject | The subject of the question |
| Content | The full question |
| Date | Pre-formatted date when the question was submitted |
| Timestamp | Unix timestamp for when the question was submitted |
| Link | Link to the question |
| Category | The Category that the question is listed under. Has attribute:
|
| UserId | The unique User id |
| UserNick | The nickname of the user |
| UserPhotoURL | User photo URL. |
| NumAnswers | The number of answers to the question |
| NumComments | The number of comments on the question |
| ChosenAnswer | The answer chosen by the user as the best |
| ChosenAnswererId | The user id of the chosen answerer |
| ChosenAnswererNick | The nickname of the chosen answerer |
| ChosenAnswererTimestamp | The time the answer was submitted |
| ChosenAnswererAwardTimestamp | The time the answer was given an award |
The following is a sample response for the above query:
Yahoo! Web Search Web Services are limited to 5,000 queries per IP per day per API. See information on rate limiting and our Usage Policy to learn about acceptable uses and how to request additional queries.
The Yahoo! Answers Web Search services return the standard errors. There are no service-specific errors.
By applying for an Application ID for this service, you hereby agree to the Terms of Use