Click or drag to resize

IJsonpWsEndUserGetNews 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]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetNews/{jsonp}/{userName}/{token}/{language}")]
Stream GetNews(
	string jsonp,
	string userName,
	string token,
	string language
)

Parameters

jsonp
Type: SystemString
userName
Type: SystemString
token
Type: SystemString
language
Type: SystemString
Value of type System.String language for which you require news

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