Skip to main content
Commonmark migration
Source Link

###Complete Route Listing

Complete Route Listing

###Complete Route Listing

Complete Route Listing

replaced http://stackapps.com/ with https://stackapps.com/
Source Link
updated code samples to rc2.2
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
var factory = new Soapi.RouteFactory("api.stackapps.com","mykey");

var route = factory.UsersById(14);

route.getResponse(function success(data){
   alert(data.users[0]items[0].display_name); //code poet!
}, function failure(error){
   alert(error.message);
});

Remember: the data returned is the JavaScript object returned from the API method call. If you are in doubt as to what is being returned, simply look at the API help page for that route.

The one exception that I have made is to abstract the array property of all 'returns' types to items. This enables more powerful application patterns.

var factory = new Soapi.RouteFactory("api.stackapps.com","mykey");

var route = factory.UsersById(14);

route.getResponse(function success(data){
   alert(data.users[0].display_name); //code poet!
}, function failure(error){
   alert(error.message);
});

Remember: the data returned is the JavaScript object returned from the API method call. If you are in doubt as to what is being returned, simply look at the API help page for that route.

var factory = Soapi.RouteFactory("api.stackapps.com","mykey");

var route = factory.UsersById(14);

route.getResponse(function success(data){
   alert(data.items[0].display_name); //code poet!
}, function failure(error){
   alert(error.message);
});

Remember: the data returned is the JavaScript object returned from the API method call. If you are in doubt as to what is being returned, simply look at the API help page for that route.

The one exception that I have made is to abstract the array property of all 'returns' types to items. This enables more powerful application patterns.

deleted 106 characters in body
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
Loading
added 122 characters in body
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
Loading
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
Loading