getThemes()
Pixelsilk API function to get the themes in the site--requires the edit-skin permission
Parameters:
The function getThemes has no parameters.
Output:
The function getThemes returns a collection of theme objects
C# Example:
IEnumerable<object> themes = GetThemes();
Note the capital first letter of the C# method.
HTTP Example:
Request Headers:
POST /api2/getThemes HTTP/1.1
HOST: www.example.com
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
Cookie: auth=EB280E4D5179...F33017BE0AF9
Request Data:
Unencoded Data:
token=7AdbNHZQBtwc...RPTEK8UvSUQ=
Url-encoded Data:
token=7AdbNHZQBtwc...TEK8UvSUQ%3d
Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=DB010F277580...3A9A1FECBE0; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 765
Response Data:
[
{
"id":"5c610500-d09d-4683-8414-8bd9033f7336",
"name":"Default",
"groupName":""
},
{
"id":"221470d4-1876-4a01-89f6-3aa52460b0db",
"name":"Group Theme 1",
"groupName":"Pixelsilk"
},
{
"id":"b38b47c4-cd1a-4ab5-b6a7-75900c43703c",
"name":"Site Theme 1",
"groupName":"Pixelsilk"
}
]
Note: some of the themes were removed to make reading easier.
JavaScript Example:
Method Call:
pixelsilk2.getThemes(callback);
Input Object:
The function getThemes has no parameters.
Returned Data:
[
{
"id":"5c610500-d09d-4683-8414-8bd9033f7336",
"name":"Default",
"groupName":""
},
{
"id":"221470d4-1876-4a01-89f6-3aa52460b0db",
"name":"Group Theme 1",
"groupName":"Pixelsilk"
},
{
"id":"b6d75673-3b03-43e2-ad61-d122a6dcc080",
"name":"NewTheme",
"groupName":""
}
]
Back to Themes »