View
 

Sites API Methods


sites/list

Show all registered websites.

 

  GET /sites.xml 

 

// Code
sites_list($category_id=null, $page=1, $perpage=6) 

 

Parameters:

  • category_id. Optional. A Category ID.
  • page. Optional. The desired page.
  • perpage. Optional. How many items per page.

sites/search

Search through all registered websites.

 

  GET /sites/search.xml 

 

// Code
sites_search($search, $page=1, $perpage=6) 

 

Parameters:

  • search. Required. Keywords.
  • page. Optional. The desired page.
  • perpage. Optional. How many items per page.

sites/show

Show details about a Website.

 

  GET /sites/#{site_id}.xml 

 

// Code
site_show($site_id) 

 

Parameters:

  • site_id. Required. A Website ID.

sites/listforowner

Affiliates: Show added websites.

 

  GET /sites/listforowner.xml 

 

// Code
sites_listforowner() 

sites/update

Affiliates: Update a website.

 

  PUT /sites/#{site_id}.xml 

 

// Code
site_update($site_id, $site) 

 

Parameters:

  • site_id. Required. A Site ID.
  • site. Required. The modified Site.

sites/destroy

Affiliates: Delete a website.

 

  DELETE /sites/#{site_id}.xml  

 

// Code
site_destroy($site_id) 

 

Parameters:

  • site_id. Required. A Website ID.