![]() It has several useful properties. The count is the number of messages sent. The list is a list of their corresponding variables, including: When ordering SMS sending in C#, use Response.Status (object type response from the example above). Responses to different queries to the API handle classes from the Response namespace. For example, the following code functions in the same way as in the previous project: var smsFactory = new (client) Method calls can be chained, starting from the Library and ending with execution (the Execute() method from the base class of all actions). On the other hand, methods of the Action type allow you to set up individual parameters of actions you want to perform. ![]() These are responsible for the individual functions of the Library. The server connection is handled within an object of the Factory class, which serves as a basis for numerous factories, including SMSFactory. Three lines are enough to include the three basic stages of simple SMS handling: creating a client, creating a factory, and applying the right action. Here, a test message sent to a single recipient: var smsFactory = new (client) Once a client is set up, the Library works based on factories and actions, as shown in the example below. The client objects store data later used in authorisation. It is a string of 40 characters, which you can generate in the API Tokens (OAuth) tab and, subsequently, use in Visual Studio: client = new ("token") The connection should be authorised using an API token. ![]() ![]() Where and how to start, then?Īs with most other projects: from the initialisation. Luckily for you, you don’t have to get into the details to use it. It uses HTTP (GET, POST, PUT, DELETE) methods to handle all server communication and the text message campaign. Do it yourself #01 – Customer Portal Walkthrough (video tutorial) First steps in handling SMS campaign: configurationīehind the scenes of our Library operates the RestSharp library that handles HTTP requests. ![]()
0 Comments
Leave a Reply. |