MCServe API :: Load MCServe Sites (All)

Load all MCServe Sites

Example (.NET C#) :
MCServeApi MCServeApi = new MCServeApi(true);
String Command = ApiCommands.WEBSITE;
ApiValues Values = new ApiValues();
ApiResult Response = null;

Response = MCServeApi.Query(Command, Values);
JsonWebsiteResult JsonResult = JsonConvert.DeserializeObject<JsonWebsiteResult>(Response.Message);

Example (.NET Visual Basic) :
Dim MCServeApi As New MCServeApi(True)
Dim Command As [String] = ApiCommands.WEBSITE
Dim Values As New ApiValues()
Dim Response As ApiResult = Nothing

Response = MCServeApi.Query(Command, Values)
Dim JsonResult As JsonWebsiteResult = JsonConvert.DeserializeObject(Of JsonWebsiteResult)(Response.Message)
Response :
{
    "Result": true,
    "Message": "The API query was successful",
    "Code": 0,
    "Sites": [
        {
            "Guid": "fbea6238-45dd-4d98-8a44-632e5c662a83",
            "Uri": "http://www.mcserve.org",
            "Title": "MCServe Comunity"
        },
        {
            "Guid": "7417f312-aa1b-4c94-9726-1106d0038000",
            "Uri": "http://dev.mcserve.org",
            "Title": "MCServe Development"
        },
        {
            "Guid": "53e99b9f-400f-4742-a3db-ff50778f97e4",
            "Uri": "http://res.mcserve.org",
            "Title": "MCServe Resources"
        },
        {
            "Guid": "653eb829-2d3d-460e-9f74-acf9ddaedd4d",
            "Uri": "http://api.mcserve.org",
            "Title": "MCServe API"
        }
    ]
}

Last edited Mar 9, 2013 at 10:07 AM by Xe77a, version 19

Comments

No comments yet.