docs
  • Getting started
    • Welcome
    • 📥Installation
    • Simple example
  • API reference
    • Index
    • Module "sites"
    • Class "Site"
    • Class "Network"
    • Exceptions
  • Recipes
    • Index
    • Answers
    • Badges
    • Questions
    • Search
    • Site info
    • Users
Powered by GitBook
On this page
  1. Recipes

Answers

Getting some answers by ids from site:

from pystackapi import Site
from pystackapi.sites import StackOverflow

site = Site(StackOverflow)

answers = site.get_answers([7, 12])  # Getting answers with ids 7 and 12

answer = site.get_answer(18)  # Getting an answer with id 18

print(answers)
print(answer)
PreviousIndexNextBadges

Last updated 1 year ago