12
votes
API "Hello World" code
Python:
Below is python code to get minimal info results. See bottom on how to run.
import requests
BASEURL = "https://api.stackexchange.com/2.2/info"
params = {
"site" : "...
Community wiki
3
votes
API "Hello World" code
JavaScript:
Here is a bare-bones javascript, and you can run it from the console of decent modern browsers. It returns the 5 most recently active economics questions, tagged inflation:
fetch (
'...
Community wiki
3
votes
Stack Exchange API in Chrome extension
I've built an extension that uses StackExchange API using OAuth2 flow. I did not use the JS SDK and did it manually instead.
Here is how I did it:
function auth(sendResponse) {
const scope = '...
2
votes
Getting started: /users/{id}
I am trying to get the amount of reputation that a user has
how to handle the response (or get one) from a script
You can do this with a Bash command that you can then embed in a script. Here's how:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
getting-started × 10support × 6
api × 3
discussion × 3
faq × 3
documentation × 2
status-completed × 1
feature-request × 1
api-v2 × 1
javascript × 1
stackapps × 1
c# × 1
stackoverflow × 1
api-v1.1 × 1
data-explorer × 1
abuse × 1