The service enables you to view list of group to which a message has been sent.
The operation returns an array of SentGroupsData with each group id, name and isQuery value.
Parameters:
-
int sendid
The send id of the message.
Java Code:
//get a reference to the service InwiseWebServices ws = new InwiseWebServices();
InwiseWebServicesSoap inwiseWebServicesSoap = ws.getInwiseWebServicesSoap();
//fill the security header
HeaderHandler hh = new HeaderHandler("myusername", "myPassword");
hh.setHeader(inwiseWebServicesSoap);
//the send id of the message
int sendid = 144;
//call the operation
inwise.ArrayOfSentGroupsData groups= inwiseWebServicesSoap.messagesGetSentGroups(sendid);
Iterator<SentGroupsData> it=groups.getSentGroupsData().iterator();
while (it.hasNext())
{
SentGroupsData group = it.next();
int groupid = group.getId();//the id of the group
String groupName = group.getName();//the name of the group
boolean isQuery = group.isIsQuery();//is the group actually a query
}
C# Code:
//get a reference to the service
InwiseWebServices.InwiseWebServices ws = new InwiseWebServices.InwiseWebServices();
//fill the security header
InwiseWebServices.SecHeader header = new InwiseWebServices.SecHeader();
header.username = "username";
header.pass = "myPassword";
ws.SecHeaderValue = header;//set credentials
//the send id of the message
int sendid = 144;
//call the operation
InwiseWebServices.SentGroupsData[] groups= ws.Messages_GetSentGroups(sendid);
for (int i = 0; i < groups.Length; i++)
{
InwiseWebServices.SentGroupsData group = groups[i];
int groupid = group.Id;//the id of the group
string groupName = group.Name;//the name of the group
bool isQuery = group.IsQuery;//is the group actually a query
}
VB Code:
'get a reference to the service
Dim ws As InwiseWebServices.InwiseWebServices = New InwiseWebServices.InwiseWebServices()
'fill the security header
Dim header As InwiseWebServices.SecHeader = New InwiseWebServices.SecHeader()
header.username = "username"
header.pass = "myPassword"
ws.SecHeaderValue = header 'set credentials
'the send id of the message
Dim sendid As Integer = 144
'call the operation
Dim groups() As InwiseWebServices.SentGroupsData = ws.Messages_GetSentGroups(sendid)
Dim i As Integer
For i = 0 To groups.Length - 1 Step i + 1
Dim group As InwiseWebServices.SentGroupsData = groups(i)
Dim groupid As Integer = group.Id 'the id of the group
Dim groupName As String = group.Name 'the name of the group
Dim isQuery As Boolean = group.IsQuery 'is the group actually a query
Next