Returns a list of co-workers of the current user.

Syntax

Visual Basic (declaration)
Public Function GetCoWorkers( _ 
ByVal AuthenticationTicket as String) as XmlNode

C# (declaration)
public XmlNode GetCoWorkers( 
string AuthenticationTicket)

Parameters

AuthenticationTicket
    string infoRouter ticket

Return Value

returns xml fragment.
<response success="true" error="">
if success = "true", The list of the users returns as in the subnodes
if success = "false", the error attribute returns the error description.

<response success="true" error="">
<users>
<User exists="true" Domain="Developer Center" UserName="JoeD" FirstName="Joe" LastName="Doe" Email="joed@acme.com" .... />
<User exists="true" Domain="" UserName="Guest" FirstName="Guest" LastName="NA" Email="" .../>
</users>
</response>

Remarks

Co-workers are a list of inforouter users that are visible to the logged in user.

minus gif Example

Visual Basic Example
Public Sub ListCoWorkers()
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxxx"
        Dim xmlResponse As System.Xml.XmlElement
        Dim IR_Obj As InfoRouter.srv
        Try
            'Create InfoRouter Object
            IR_Obj = New InfoRouter.srv

            xmlResponse = IRObj.GetCoWorkers(IR_AuthenticationTicket)
            If xmlResponse.GetAttribute("success") = "true" Then
                'get co-workers elem
                Dim xmlcoworkers As System.Xml.XmlElement = xmlResponse.FirstChild

                Console.WriteLine("Co-workers of " & IR_UID)
                Console.WriteLine("----------------------------------")
                'loop trough users
                Dim xmlUserElem As System.Xml.XmlElement
                For Each xmlUserElem In xmlcoworkers
                    Console.WriteLine(xmlUserElem.GetAttribute("DomainName") & vbTab & _
                                      xmlUserElem.GetAttribute("UserName") & vbTab & _
                                      xmlUserElem.GetAttribute("FirstName") & vbTab & _
                                      xmlUserElem.GetAttribute("LastName") & vbTab & _
                                      xmlUserElem.GetAttribute("Email"))
                Next
                Console.WriteLine("----------------------------------")

            Else
                Console.WriteLine("Server Response:" & xmlResponse.GetAttribute("error"))
            End If
            xmlResponse = Nothing

        Catch ex As Exception
            Console.WriteLine("Error:" & ex.message)
        Finally
            IR_Obj = Nothing
        End Try
End Sub

See Also