question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Having a problem with get a Answer body

See original GitHub issue

Thanks for these libraries,

But i have a problem with get a Answer’s body

class Answer(JSONModel):
    """Describes an answer on a StackExchange site."""

    transfer = ('is_accepted', 'locked_date', 'question_id', 'up_vote_count', 'down_vote_count', 'view_count', 'score',
        'community_owned', 'title', 'body')

Here is the implementation of Answer class

As you can see the “transfer” statement, the code include “body” json object

But, “body” python class variable isn’t exit

How to get a Answers body?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
lucjoncommented, Nov 3, 2014

Hello,

In line with the default behaviour of the StackExchange API, questions and answers don’t include bodies unless you explicitly ask for them. You can do this by specifying the body = True keyword parameter when you are requesting your answer, e.g.:

so = stackexchange.Site(stackexchange.StackOverflow)
answer = so.answer(7, body = True)

The resulting object will then have the body attached. You can also specify a custom filter using the filter parameter, which you can set to include the body; for more details, see the StackExchange docs at http://api.stackexchange.com/docs/filters/.

0reactions
lucjoncommented, Jun 27, 2017

That looks neat, I’ll need to give it a go! I’m glad you found the library useful.

2017-06-27 5:51 GMT+01:00 Miles Cranmer notifications@github.com:

Thanks, @lucjon https://github.com/lucjon, I will try it out! Here’s the plugin I’m working on if you’re curious: (made with your API): https://github.com/MilesCranmer/gso. There’s no multi-answer support right now but I hope to add it soon after reading the demo you linked.

Cheers, Miles

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucjon/Py-StackExchange/issues/31#issuecomment-311252446, or mute the thread https://github.com/notifications/unsubscribe-auth/AAClWJS737u8BUTlr3ToB02PMuTcnFG1ks5sIIpagaJpZM4C1umC .

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP GET with request body - Stack Overflow
"The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI." Then, is it technically illegal/wrong...
Read more >
Body Dysmorphic Disorder: Symptoms, Causes, Diagnosis ...
Body dysmorphic disorder (BDD ) is a mental health condition involving obsession and anxiety about a perceived defect.
Read more >
Symptom Checker with Body from WebMD - Check Your ...
WebMD Symptom Checker is designed with a body map to help you understand what your medical symptoms could mean, and provide you with...
Read more >
Body Shaming - HelpGuide.org
Negative comments about your appearance can leave you feeling anxious and embarrassed. But there are ways to manage critical comments and find body...
Read more >
Why the Mind–Body Problem Can't Have a Single, Objective ...
In Mind-Body Problems I argue that science cannot provide a single, objectively true solution to the mind-body problem, because our responses to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found