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
)<OperationContractAttribute>
<WebGetAttribute(ResponseFormat := WebMessageFormat.Json, UriTemplate := "GetNews/{jsonp}/{userName}/{token}/{language}")>
Function GetNews (
jsonp As String,
userName As String,
token As String,
language As String
) As Stream[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat::Json, UriTemplate = L"GetNews/{jsonp}/{userName}/{token}/{language}")]
Stream^ GetNews(
String^ jsonp,
String^ userName,
String^ token,
String^ language
)[<OperationContractAttribute>]
[<WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetNews/{jsonp}/{userName}/{token}/{language}")>]
abstract GetNews :
jsonp : string *
userName : string *
token : string *
language : string -> Stream
function GetNews(
jsonp : String,
userName : String,
token : String,
language : String
) : Stream
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