Skip to main content
Commonmark migration
Source Link

##JavaSript / Soapi.JS

JavaSript / Soapi.JS

##JavaSript / Soapi.JS

JavaSript / Soapi.JS

replaced http://stackapps.com/ with https://stackapps.com/
Source Link

using Soapi.JS

using Soapi.JS

Post Made Community Wiki
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60

##JavaSript / Soapi.JS


using Soapi.JS


Questions

Soapi.RouteFactory("api.stackapps.com", apiKey) // get all users
.Users({ pagesize: 100 }).getPagedResponse(function(data) {

    var output = "";
    data.items.sort(function(a, b) { return b.question_count - a.question_count });
    for (var i = 0; i < data.items.length; i++) {
        output += data.items[i].question_count + " " + data.items[i].display_name + "\r\n";
    }

    document.getElementById("output").innerHTML = output;
});
   

Output:

97 code poet
56 George Edison
21 S.Mark
19 systempuntoout
14 Felix
13 Kevin Montrose
11 Franci Penov
11 Jedi Master Spooky
10 Dave Swersky
10 Steffen Opel
9 carson
9 Bill the Lizard
9 ColinD
7 Dennis Williamson
6 Dave DeLong
6 jjnguy
5 TheHurt
5 SztupY
5 radius
5 johnwards
4 Matt S.
4 Jason
4 Farseeker
4 Soviut
4 Yacoby
4 Jonathan
3 Joel Potter
3 Adam Wright
3 Edan Maor
3 codeka
3 Mark Rushakoff
3 Shay Erlichmen
3 swanson
3 Igor Zevaka
3 Adam
3 Nick Presta
3 eWolf
3 Koning Baard
3 Peter Mourfield
3 phsr
3 Greg Bray
3 mlaw
2 lfoust
2 Maxim Zaslavsky
2 Martin Plante
2 nabeelmukhtar
2 Catchwa
2 Thomas McDonald
2 Kyle Cronin
2 Ryan Brunner
2 Robert Munteanu
2 Josh Kelley
2 Peter Mortensen
2 mikej
2 svick
2 Shane
2 Peter Ajtai
2 Jim McKeeth
2 chanchal1987
2 TheKaptain
1 Chacha102
1 balpha
1 Ricky
1 Martijn Laarman
1 adrianbanks
1 AidenMontgomery
1 voyager
1 Evan
1 Tim Post
1 scunliffe
1 Lucas Jones
1 Robert Cartaino
1 Jeff Atwood
1 InfinitiesLoop
1 Heavy Bytes
1 Nathan Reed
1 RichH
1 Jan Fabry
1 conmulligan
1 Bialecki
1 Michael B.
1 Riduidel
1 Kevin
1 James A. Rosen
1 Soldier.moth
1 Matthew Pelser
1 denny
1 iconiK
1 Chris S
1 Nippysaurus
1 jmoy
1 Nathan Voxland
1 Alexandre Rafalovitch
1 Mark Hurd
1 Lucas McCoy
1 Cristian Castiblanco
1 Casebash
1 tonklon
1 coobird
1 Robert Love
1 Charles Stewart
1 C.W.Holeman II
1 Frank Krueger
1 Roy Tang
1 David
1 ripper234
1 Simon Brown
1 Artefacto
1 JL01
1 Shimmy
1 Can Berk Güder
1 Fernando
1 crucible
1 Nicolas Raoul
1 Vitaly Polonetsky
1 ADB
1 Wei Hu
1 stacker
1 zengr
1 Vicky
1 Portman
1 Ngu Soon Hui
1 Dan Atkinson
1 chalup
1 Matt Huggins
1 hvgotcodes
1 arinte
1 peter.newhook
1 blork
1 fukas78
1 Joe
1 John Bristowe
1 chenyuejie
1 daltojr
1 bpedro
1 Fatal510
1 magcius
1 Matt Culbreth
1 James Johnson
1 tsudot
1 pierocampanelli
1 user1711
1 Michal
1 DC01
1 Mattias Konradsson
1 Alienfluid
1 theplic
1 Dinis Cruz
1 pufferfish
1 RichOrr
1 Bidhan Baruah

Answers

Soapi.RouteFactory("api.stackapps.com", apiKey) // get all users
.Users({ pagesize: 100 }).getPagedResponse(function(data) {

    var output = "";
    data.items.sort(function(a, b) { return b.answer_count - a.answer_count });
    for (var i = 0; i < data.items.length; i++) {
        output += data.items[i].answer_count + " " + data.items[i].display_name + "\r\n";
    }

    document.getElementById("output").innerHTML = output;
});

   

Output:

204 Kevin Montrose
102 code poet
69 George Edison
34 S.Mark
20 jjnguy
18 Chacha102
12 lfoust
12 systempuntoout
12 Matt S.
10 Maxim Zaslavsky
9 Joel Potter
8 carson
8 Franci Penov
8 Bill the Lizard
8 Farseeker
7 Edan Maor
7 Dennis Williamson
6 Dave Swersky
6 Soviut
6 Steffen Opel
6 codeka
6 Igor Zevaka
6 ColinD
5 Catchwa
5 Jeff Atwood
4 Dave DeLong
4 TheHurt
4 Adam Wright
4 Lucas Jones
4 Jonathan
4 Greg Bray
3 Jason
3 Joel Spolsky
3 Geoff Dalgas
3 SztupY
3 Robert Cartaino
3 Yacoby
3 conmulligan
3 Riduidel
3 Chris S
3 badp
2 nabeelmukhtar
2 Tim Post
2 Felix
2 Jedi Master Spooky
2 Shay Erlichmen
2 swanson
2 Thomas McDonald
2 Adam
2 InfinitiesLoop
2 Nathan Reed
2 Chris Lawlor
2 rockinthesixstring
2 Simon Brown
2 Sathya
2 Darren Newton
2 Arjan
2 Prashant
2 daltojr
2 Yuval Cohen
2 moberley
1 balpha
1 adrianbanks
1 John Sheehan
1 RedFilter
1 Mef
1 Evan
1 Greg Roberts
1 Nick Craver
1 radius
1 Kyle Cronin
1 Nick Presta
1 eWolf
1 Ryan Brunner
1 Heavy Bytes
1 ChrisF
1 Robert Munteanu
1 Koning Baard
1 Michael B.
1 CMS
1 John Siracusa
1 rchern
1 Alexandre Rafalovitch
1 Lucas McCoy
1 Cristian Castiblanco
1 Yuval A
1 Greg Hurlman
1 joshperry
1 lexu
1 Oscar Reyes
1 C.W.Holeman II
1 Brock Woolf
1 Peter Ajtai
1 Jared Harley
1 cyberzed
1 TWith2Sugars
1 Nick Bedford
1 dag729
1 ooo
1 msorens
1 Rox
1 R. Bemrose
1 Portman
1 Ngu Soon Hui
1 Roger Pate
1 Randolpho
1 George Stocker
1 Daniel Ribeiro
1 slf
1 Toby Allen
1 openfrog
1 JR Lawhorne
1 Steven A. Lowe
1 torbengb
1 naugtur
1 blork
1 TheKaptain
1 Joe
1 mlaw
1 brheal
1 JonB
1 Tripp Lilley
1 Lanny Heidbreder
1 user2070
1 jjesse
1 tutuca
1 maco