XF 2.2 API and Poll results

Rushster

Member
I have just started messing with the API and was wondering if there is a way to grab poll results from a thread via the API?
 
Yup, the data is returned.

Code:
       "Poll": {
            "can_vote": false,
            "change_vote": true,
            "close_date": 0,
            "has_voted": false,
            "max_votes": 0,
            "poll_id": 1,
            "public_votes": false,
            "question": "Test",
            "responses": {
                "1": {
                    "text": "One",
                    "vote_count": 1,
                    "visitor_voted_for": false
                },
                "2": {
                    "text": "Two",
                    "vote_count": 1,
                    "visitor_voted_for": false
                },
                "3": {
                    "text": "Three",
                    "vote_count": 0,
                    "visitor_voted_for": false
                }
            },
            "view_results_unvoted": true,
            "voter_count": 1
        },
 
Taking a shot in the dark but was wondering if there's an endpoint for POSTing to a threads poll on a user's behalf so they can answer it

something similar to the the POST threads/{id}/vote

1707495212832.webp

imagine i'll have to create that endpoint myself right now but just in case :)
 
Back
Top Bottom