Skip to content

DataAPI SDK english MT.DataAPI Endpoint method listBlogsForUser

Taku AMANO edited this page Aug 28, 2013 · 2 revisions

listBlogsForUser

Retrieve a list of blogs for an user.

GET https://your-host/your-mt-api.cgi/v1/users/:user_id/sites Detail

Parameters

Name Type Required Description
userId Number | Object | Function yes User ID
params Object no Options
callback Function no

Returns

XMLHttpRequest: A XMLHttpRequest object

Example

api.listBlogsForUser(userId, function(response) {
  if (response.error) {
    // Handle error
    return;
  }

  // Do stuff
});

Or

var params = {
  includeIds: "1,2,3,4",
  fields: "name,description,url,archiveUrl"
};
api.listBlogsForUser(userId, params, function(response) {
  if (response.error) {
    // Handle error
    return;
  }

  // Do stuff
});
Clone this wiki locally