{ "info": { "author": "plasmashadow", "author_email": "plasmashadowx@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2" ], "description": "##StackExchange\n\n[](https://travis-ci.org/plasmashadow/stackexchange)\n[](http://badge.fury.io/py/stackexchange)\n[](https://pypi.python.org/pypi/stackexchange)\n\n##Description\nA Friendly wrapper for stackexchange public api used to harvest information about Questions, Answers\nand even search for questions.\n\n##Installation:\n\nyou can install stackexchange from its official pypi repository.\n\n```python\n pip install stackexchange\n \n```\n\n##Usage\n\n###searching\n\nWe can use the stackexchange search api to search in various titles\n\n```python\n\nfrom stackexchange import search\n\ng = search(\"python\", site=\"stackoverflow\", order=\"desc\")\n\nfor item in g:\n\tprint item.title\n\t# will help you to see all properties it contains\n\tprint dir(item)\n\n```\n\n### answers\n\nLet's look at the answer api now.\n\n```python\n\nfrom stackexchange import Answer\n\na = Answer()\ng = a.get_all_answer(site=\"stackoverflow\", order=\"desc\", page=1)\n\nfor item in g:\n answer_id = item.answer_id\n ans = a.get_by_id(answer_id)\n comments = a.get_comments(answer_id)\n print comments\n```\n\n###questions\n\nOn Questions api\n\n```python\n\nfrom stackexchange import Question\n\nq = Question()\n\ng = q.get_all_questions(site=\"stackoverflow\", order=\"desc\")\n\nfor item in g:\n question_id = item.question_id\n ques = q.get_by_id(question_id)\n \n #for getting unanswered questions\n\ng = q.get_unanswered()\n \n #for getting featured questions\n\ng = q.get_featured()\n \n```\n\n\n##License\n\n