-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessagesApiTest.java
More file actions
141 lines (121 loc) · 4.59 KB
/
MessagesApiTest.java
File metadata and controls
141 lines (121 loc) · 4.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*
* Late API
* API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package dev.getlate.api;
import dev.getlate.ApiException;
import dev.getlate.model.GetInboxConversation200Response;
import dev.getlate.model.GetInboxConversationMessages200Response;
import dev.getlate.model.InlineObject;
import dev.getlate.model.ListInboxConversations200Response;
import dev.getlate.model.SendInboxMessage200Response;
import dev.getlate.model.SendInboxMessage400Response;
import dev.getlate.model.SendInboxMessageRequest;
import dev.getlate.model.UpdateInboxConversation200Response;
import dev.getlate.model.UpdateInboxConversationRequest;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* API tests for MessagesApi
*/
@Disabled
public class MessagesApiTest {
private final MessagesApi api = new MessagesApi();
/**
* Get conversation details
*
* Retrieve details and metadata for a specific conversation. Requires accountId query parameter.
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void getInboxConversationTest() throws ApiException {
String conversationId = null;
String accountId = null;
GetInboxConversation200Response response =
api.getInboxConversation(conversationId, accountId);
// TODO: test validations
}
/**
* Get messages in a conversation
*
* Fetch messages for a specific conversation. Requires accountId query parameter.
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void getInboxConversationMessagesTest() throws ApiException {
String conversationId = null;
String accountId = null;
GetInboxConversationMessages200Response response =
api.getInboxConversationMessages(conversationId, accountId);
// TODO: test validations
}
/**
* List conversations across all accounts
*
* Fetch conversations (DMs) from all connected messaging accounts in a single API call. Supports filtering by profile and platform. Results are aggregated and deduplicated. **Supported platforms:** Facebook, Instagram, Bluesky, Reddit, Telegram
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void listInboxConversationsTest() throws ApiException {
String profileId = null;
String platform = null;
String status = null;
String sortOrder = null;
Integer limit = null;
String cursor = null;
String accountId = null;
ListInboxConversations200Response response =
api.listInboxConversations(profileId, platform, status, sortOrder, limit, cursor, accountId);
// TODO: test validations
}
/**
* Send a message
*
* Send a message in a conversation. Requires accountId in request body. **Attachment support by platform:** - Telegram: Images, videos, documents (up to 50MB) - Facebook Messenger: Images, videos, audio, files - Twitter/X: Images, videos (requires media upload) - Instagram: Not supported (API limitation) - Bluesky: Not supported (API limitation) - Reddit: Not supported (API limitation)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void sendInboxMessageTest() throws ApiException {
String conversationId = null;
SendInboxMessageRequest sendInboxMessageRequest = null;
SendInboxMessage200Response response =
api.sendInboxMessage(conversationId, sendInboxMessageRequest);
// TODO: test validations
}
/**
* Update conversation status
*
* Archive or activate a conversation. Requires accountId in request body.
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void updateInboxConversationTest() throws ApiException {
String conversationId = null;
UpdateInboxConversationRequest updateInboxConversationRequest = null;
UpdateInboxConversation200Response response =
api.updateInboxConversation(conversationId, updateInboxConversationRequest);
// TODO: test validations
}
}