Skip to content

DataAPI SDK english MT.DataAPI Endpoint method getBlog

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

getBlog

Retrieve a blog.

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

Parameters

Name Type Required Description
blogId Number | Object | Function yes Blog ID
params Object no Options
callback Function no

Returns

XMLHttpRequest: A XMLHttpRequest object

Example

api.getBlog(blogId, function(response) {
  if (response.error) {
    // Handle error
    return;
  }

  // Do stuff
});

Or

api.getBlog(blogId, {fields: "name,description,url,archiveUrl"}, function(response) {
  if (response.error) {
    // Handle error
    return;
  }

  // Do stuff
});
Clone this wiki locally