AbcComponentsHelper 1.0.0

Package Description

Install-Package AbcComponentsHelper -Version 1.0.0
dotnet add package AbcComponentsHelper --version 1.0.0
<PackageReference Include="AbcComponentsHelper" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AbcComponentsHelper --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Apple Business chat Components Helper

Components of ABC channel
Nuget Package:

https://www.nuget.org/packages/AbcComponentsHelper/

To install the package:

PM> Install-Package AbcComponentsHelper

This library is implemented for the following Messaging Channels:

  • Apple Business Chat

Using Examples:

PS: Almost all these examples accepts an extra/optional argument that sets the order or style of the element.

PS2: Almost all these examples that uses a collection also accepts to be passed as params[].

1. Properties of a listpicker

Channels:
Apple Business Chat

alt text

2. Sending a listPicker

Example:

First of all, you'll create a array of items(or pass items as params[])

var items = new List<ListPickerItem>();               
//Defining Items
items.Add(new ListPickerItem("style", "itemTitle", "imageIdentifier", order, "itemIdentifier"));

Then you'll create the array of images(if there's any image):

var imageArray = new List<Image>();               
//Defining Items
imageArray.Add(new Image("ImageIdentifier", Base64Image));

or

imageArray.Add(new Image("ImageIdentifier", byte[] image));

Then you'll create receveid message item:

 var receivedMessage = new ReceivedMessage("style", "Title", "Subtitle", "ImageIdentifier");

Finally, creating listpicker:

var sections = new List<Section>();
            sections.Add(new Section(items.ToArray()));
            var listPickerDocument = new ListPickerDocument(
                new InteractiveData(
                    new Data(sections),
                    receivedMessage));

Another way of create a listpicker:

var items = new List<Items>();
               items.Add(new Items("ItemTitle", "ItemImageIdentifier", "itemImage", order));
               items.Add(new Items("ItemTitle2", "ItemImageIdentifier2", "itemImage2", order+1));
               var listPicker = new ListPickerDocument("ReceveidMessageTitle", "ReceveidMessageSubTitle", items, multipleSelection));

3. Properties of a TimePicker

alt text

4. Sending a Time Picker

You'll have to initialize receivedMessage as you did in listpicker(replyMessage is optional in both cases), but using TimePickerReceivedMessage and TimePickerReplyMessage.

But instead of a collection of items you'll have a collection of TimeSlots, as you can see down bellow:

 var timeSlots = new List<TimeSlots>();
                    timeSlots.Add(new TimeSlots(duration,
                        time.ToString($"yyyy-MM-ddTHH:mm{timezonestring}"),
                         timeIdentifier));                

Then you can create a TimePicker:

var timePickerDocument = new TimePickerDocument(
                new TimePickerInteractiveData(
                    new TimePickerData("1.0",
                    new Event(string.Empty, "Agendamento", timeSlots)),
                    receivedMessage));

Apple Business chat Components Helper

Components of ABC channel
Nuget Package:

https://www.nuget.org/packages/AbcComponentsHelper/

To install the package:

PM> Install-Package AbcComponentsHelper

This library is implemented for the following Messaging Channels:

  • Apple Business Chat

Using Examples:

PS: Almost all these examples accepts an extra/optional argument that sets the order or style of the element.

PS2: Almost all these examples that uses a collection also accepts to be passed as params[].

1. Properties of a listpicker

Channels:
Apple Business Chat

alt text

2. Sending a listPicker

Example:

First of all, you'll create a array of items(or pass items as params[])

var items = new List<ListPickerItem>();               
//Defining Items
items.Add(new ListPickerItem("style", "itemTitle", "imageIdentifier", order, "itemIdentifier"));

Then you'll create the array of images(if there's any image):

var imageArray = new List<Image>();               
//Defining Items
imageArray.Add(new Image("ImageIdentifier", Base64Image));

or

imageArray.Add(new Image("ImageIdentifier", byte[] image));

Then you'll create receveid message item:

 var receivedMessage = new ReceivedMessage("style", "Title", "Subtitle", "ImageIdentifier");

Finally, creating listpicker:

var sections = new List<Section>();
            sections.Add(new Section(items.ToArray()));
            var listPickerDocument = new ListPickerDocument(
                new InteractiveData(
                    new Data(sections),
                    receivedMessage));

Another way of create a listpicker:

var items = new List<Items>();
               items.Add(new Items("ItemTitle", "ItemImageIdentifier", "itemImage", order));
               items.Add(new Items("ItemTitle2", "ItemImageIdentifier2", "itemImage2", order+1));
               var listPicker = new ListPickerDocument("ReceveidMessageTitle", "ReceveidMessageSubTitle", items, multipleSelection));

3. Properties of a TimePicker

alt text

4. Sending a Time Picker

You'll have to initialize receivedMessage as you did in listpicker(replyMessage is optional in both cases), but using TimePickerReceivedMessage and TimePickerReplyMessage.

But instead of a collection of items you'll have a collection of TimeSlots, as you can see down bellow:

 var timeSlots = new List<TimeSlots>();
                    timeSlots.Add(new TimeSlots(duration,
                        time.ToString($"yyyy-MM-ddTHH:mm{timezonestring}"),
                         timeIdentifier));                

Then you can create a TimePicker:

var timePickerDocument = new TimePickerDocument(
                new TimePickerInteractiveData(
                    new TimePickerData("1.0",
                    new Event(string.Empty, "Agendamento", timeSlots)),
                    receivedMessage));

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 62 6/19/2019