14 Oct 2007 19:28
Re: Questions
David MENTRE <dmentre <at> linux-france.org>
2007-10-14 17:28:15 GMT
2007-10-14 17:28:15 GMT
Hello Lyu,
Lyu ABE <lyu.abe <at> celery.ocn.ne.jp> writes:
> I'd like to know how I can retrieve questions, answers, votes, etc. I
> tried to use the "question_info" method, but I do not understand the
> server's reply because I only got a int value.
No, the question_info() method returns a quite complex data
structure. Here is part of its XDR (ONC-RPC) description:
struct response_t {
response_desc_t r_info_desc;
external_link_t r_info_link;
};
enum question_status_e { tagging_only = 1, public = 2 };
struct question_t {
_int32 int q_timestamp;
question_id_t q_id;
question_desc_t q_desc;
date_t q_info_limit_date; /* if set to zero, there is no limit date */
question_status_e q_info_status;
response_t q_info_responses<MAX_NUMBER_RESPONSES>;
int q_info_num_votes;
int q_info_elected_responses<MAX_NUMBER_RESPONSES>;
};
struct question_info_return_t {
(Continue reading)
RSS Feed