IJsonPostWsEndUserGetNews Method
|
Gets the news even read ada for the authenticated user
Using the method GetNews () WsEndUser of Aruba, you can user the list of news.
Namespace:
Aruba.Cloud.WsEndUser
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
[WebInvokeAttribute(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
Stream GetNews(
GetNewsRequest request
)
<OperationContractAttribute>
<WebInvokeAttribute(Method := "POST", ResponseFormat := WebMessageFormat.Json)>
Function GetNews (
request As GetNewsRequest
) As Stream
[OperationContractAttribute]
[WebInvokeAttribute(Method = L"POST", ResponseFormat = WebMessageFormat::Json)]
Stream^ GetNews(
GetNewsRequest^ request
)
[<OperationContractAttribute>]
[<WebInvokeAttribute(Method = "POST", ResponseFormat = WebMessageFormat.Json)>]
abstract GetNews :
request : GetNewsRequest -> Stream
function GetNews(
request : GetNewsRequest
) : Stream
Parameters
- request
- Type: Aruba.Cloud.WsEndUser.JsonGetNewsRequest
Return Value
Type:
Stream
The method returns an object of class WsResult<News[]> containing detailed information on News.
Examples
In the following example describes a method, called GetAllNews (),
or through a call to GetNews () to Aruba WsEndUser, get license information affordable.
private News[] GetAllNews()
{
try
{
String language="it";
WsResultOfArrayOfNews result = client.GetNews(language);
if (result.Success)
{
return result.Value;
}
else
{
throw new ApplicationException (String.Format(
"An error has occurred while invoking GetNews(). {0}", result.ResultMessage));
}
}
catch (Exception ex)
{
throw new ApplicationException(String.Format("An error has occurred while getting News {0}", ex.Message));
}
}
See Also