Difference between revisions of "GetUnsubscribedNumbers"

From CDYNE Wiki
Jump to navigation Jump to search
imported>Bdriggers
(Created page with "== JSON == <PRE> http://messaging.cdyne.com/Messaging.svc/GetUnsubscribedNumbers?LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591 </PRE> == C# == <code type=csharp> /*http:/...")
 
imported>Bdriggers
(C#)
Line 34: Line 34:
 
     }
 
     }
 
}
 
}
 +
 +
</code>
 +
 +
== VB.Net ==
 +
 +
<code type=vbnet>
 +
 +
'http://messaging.cdyne.com/Messaging.svc?wsdl was added as Service Reference and given the name WSDL
 +
 +
Imports GetUnsubscribedNumbers.WSDL
 +
 +
Module Module1
 +
 +
    Sub Main()
 +
        Dim client As WSDL.MessagingClient = New MessagingClient("mms2wsHttpBinding")
 +
 +
        Dim resp As GetUnsubscribedNumbers.WSDL.UnsubscribedNumber() = client.GetUnsubscribedNumbers(New Guid("f01d89fd-5155-5455-5585-e84ab8de8591"))
 +
 +
        For Each item In resp
 +
 +
            Console.WriteLine("Phone Number: " + item.PhoneNumber + Environment.NewLine +
 +
                              "UTC Entry Date: " + item.EntryDate + Environment.NewLine)
 +
 +
        Next
 +
 +
        Console.ReadLine()
 +
 +
        client.Close()
 +
    End Sub
 +
 +
End Module
  
 
</code>
 
</code>

Revision as of 16:32, 12 October 2017

JSON

http://messaging.cdyne.com/Messaging.svc/GetUnsubscribedNumbers?LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591

C#

/*http://messaging.cdyne.com/Messaging.svc?wsdl was added as Service Reference and given the name WSDL*/

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using GetUnsubscribedNumbers.WSDL;

namespace GetUnsubscribedNumbers {

   class Program
   {
       static void Main(string[] args)
       {
           MessagingClient client = new MessagingClient("mms2wsHttpBinding");
           UnsubscribedNumber[] resp = client.GetUnsubscribedNumbers(new Guid("f01d89fd-5155-5455-5585-e84ab8de8591"));
           foreach (var item in resp)
           {
               Console.WriteLine("Phone Number: " + item.PhoneNumber + Environment.NewLine + 
                                 "Entry Date: "+ item.EntryDate + Environment.NewLine + Environment.NewLine);
           }
       }
   }

}

VB.Net

'http://messaging.cdyne.com/Messaging.svc?wsdl was added as Service Reference and given the name WSDL

Imports GetUnsubscribedNumbers.WSDL

Module Module1

   Sub Main()
       Dim client As WSDL.MessagingClient = New MessagingClient("mms2wsHttpBinding")
       Dim resp As GetUnsubscribedNumbers.WSDL.UnsubscribedNumber() = client.GetUnsubscribedNumbers(New Guid("f01d89fd-5155-5455-5585-e84ab8de8591"))
       For Each item In resp
           Console.WriteLine("Phone Number: " + item.PhoneNumber + Environment.NewLine +
                             "UTC Entry Date: " + item.EntryDate + Environment.NewLine)
       Next
       Console.ReadLine()
       client.Close()
   End Sub

End Module