Skip to content

Commit

Permalink
Added FormsApi and the related classes, created WIP moments.md exampl…
Browse files Browse the repository at this point in the history
…e file, updated CHANGELOG.md
  • Loading branch information
ib-tjuhasz committed Dec 11, 2024
1 parent a04615b commit 70a5637
Show file tree
Hide file tree
Showing 15 changed files with 2,868 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to the library will be documented in this file.
The format of the file is based on [Keep a Changelog](http://keepachangelog.com/)
and this library adheres to [Semantic Versioning](http://semver.org/) as mentioned in [README.md][readme] file.

## [ [5.1.0](https://github.com/infobip/infobip-api-java-client/releases/tag/5.1.0) ] - 2024-12-13

### Added
* Support for [Infobip Moments](https://www.infobip.com/docs/api/customer-engagement/moments).

## [ [5.0.0](https://github.com/infobip/infobip-api-java-client/releases/tag/5.0.0) ] - 2024-12-06

🎉 **NEW Major Version of `infobip-api-java-client`.**
Expand Down
86 changes: 86 additions & 0 deletions moments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Moments quickstart

This quick guide aims to help you start with [Infobip Moments](https://api-docs.ioinfobip.com/docs/api/customer-engagement/moments). After reading it, you should know how to use Moments.

The first step is to create an `ApiClient` instance with some configuration.

```java
ApiClient apiClient = ApiClient.forApiKey(ApiKey.from(API_KEY))
.withBaseUrl(BaseUrl.from(BASE_URL))
.build();
```

## Flow API

You can now create an instance of `FlowApi` which allows you to manage your flows.

````java
FlowApi flowApi = new FlowApi(apiClient);
````
### Add participants to flow

To add participants to a flow, you can use the following code:

````java
// TODO add code example here
````

### Get a report on participants added to flow

To fetch a report to confirm that all persons have been successfully added to the flow, you can use the following code:

````java
// TODO add code example here
````

### Remove person from flow

To remove a person from a flow, you can use the following code:

````java
// TODO add code example here
````


## Forms API

You can now create an instance of `FormsApi` which allows you to manage your forms.

````java
FormsApi formsApi = new FlowApi(apiClient);
````

### Get forms

To get all forms, you can use the following code:

````java
// TODO add code example here
````

### Get form by ID

To get a specific form by ID, you can use the following code:

````java
// TODO add code example here
````

### Increment form view count

To increase the view counter of a specific form, you can use the following code:

````java
String formId = "cec5dfd2-4238-48e0-933b-9acbdb2e6f5f";
FormsStatusResponse response = formsApi
.incrementViewCount(formId)
.execute();
````

### Submit form data

To submit data to a specific form, you can use the following code:

````java
// TODO add code example here
````
Loading

0 comments on commit 70a5637

Please sign in to comment.