Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e31a928

Browse files
Update user-agent
1 parent a6549da commit e31a928

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

‎src/main/java/com/messagemedia/webhooks/controllers/APIController.java‎

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
import com.messagemedia.webhooks.http.client.APICallBack;
2323
import com.messagemedia.webhooks.controllers.syncwrapper.APICallBackCatcher;
2424

25-
public class APIController extends BaseController {
25+
public class APIController extends BaseController {
2626
//private static variables for the singleton pattern
2727
private static Object syncObject = new Object();
2828
private static APIController instance = null;
2929

3030
/**
31-
* Singleton pattern implementation
32-
* @return The singleton instance of the APIController class
31+
* Singleton pattern implementation
32+
* @return The singleton instance of the APIController class
3333
*/
3434
public static APIController getInstance() {
3535
synchronized (syncObject) {
@@ -84,9 +84,9 @@ public static APIController getInstance() {
8484
* <li>the `method` is null </li>
8585
* <li>the `headers` has a `ContentType` attribute </li>
8686
* </ul>
87-
* @param contentType Required parameter: Example:
88-
* @param body Required parameter: Example:
89-
* @return Returns the DynamicResponse response from the API call
87+
* @param contentType Required parameter: Example:
88+
* @param body Required parameter: Example:
89+
* @return Returns the DynamicResponse response from the API call
9090
*/
9191
public DynamicResponse create(
9292
final String contentType,
@@ -143,9 +143,9 @@ public DynamicResponse create(
143143
* <li>the `method` is null </li>
144144
* <li>the `headers` has a `ContentType` attribute </li>
145145
* </ul>
146-
* @param contentType Required parameter: Example:
147-
* @param body Required parameter: Example:
148-
* @return Returns the void response from the API call
146+
* @param contentType Required parameter: Example:
147+
* @param body Required parameter: Example:
148+
* @return Returns the void response from the API call
149149
*/
150150
public void createAsync(
151151
final String contentType,
@@ -168,7 +168,7 @@ public void run() {
168168
private static final long serialVersionUID = 5307147615583971842L;
169169
{
170170
put( "Content-Type", contentType );
171-
put( "user-agent", "messagesmedia-webhooks" );
171+
put( "user-agent", "messagemedia-webhooks-java-sdk-1.0.0" );
172172
put( "accept", "application/json" );
173173
}
174174
};
@@ -195,7 +195,7 @@ public void onSuccess(HttpContext _context, HttpResponse _response) {
195195
try {
196196

197197
//invoke the callback after response if its not null
198-
if (getHttpCallBack() != null)
198+
if (getHttpCallBack() != null)
199199
{
200200
getHttpCallBack().OnAfterResponse(_context);
201201
}
@@ -244,8 +244,8 @@ public void onFailure(HttpContext _context, Throwable _error) {
244244
* <ul>
245245
* <li>there is no webhook with this `webhookId` </li>
246246
* </ul>
247-
* @param webhookId Required parameter: Example:
248-
* @return Returns the void response from the API call
247+
* @param webhookId Required parameter: Example:
248+
* @return Returns the void response from the API call
249249
*/
250250
public void deleteDeleteAndUpdateWebhook(
251251
final UUID webhookId
@@ -263,8 +263,8 @@ public void deleteDeleteAndUpdateWebhook(
263263
* <ul>
264264
* <li>there is no webhook with this `webhookId` </li>
265265
* </ul>
266-
* @param webhookId Required parameter: Example:
267-
* @return Returns the void response from the API call
266+
* @param webhookId Required parameter: Example:
267+
* @return Returns the void response from the API call
268268
*/
269269
public void deleteDeleteAndUpdateWebhookAsync(
270270
final UUID webhookId,
@@ -312,7 +312,7 @@ public void onSuccess(HttpContext _context, HttpResponse _response) {
312312
try {
313313

314314
//invoke the callback after response if its not null
315-
if (getHttpCallBack() != null)
315+
if (getHttpCallBack() != null)
316316
{
317317
getHttpCallBack().OnAfterResponse(_context);
318318
}
@@ -360,9 +360,9 @@ public void onFailure(HttpContext _context, Throwable _error) {
360360
* <li>the `page` query parameter is not valid </li>
361361
* <li>the `pageSize` query parameter is not valid </li>
362362
* </ul>
363-
* @param page Optional parameter: Example:
364-
* @param pageSize Optional parameter: Example:
365-
* @return Returns the RetrieveResponse response from the API call
363+
* @param page Optional parameter: Example:
364+
* @param pageSize Optional parameter: Example:
365+
* @return Returns the RetrieveResponse response from the API call
366366
*/
367367
public RetrieveResponse retrieve(
368368
final Integer page,
@@ -382,9 +382,9 @@ public RetrieveResponse retrieve(
382382
* <li>the `page` query parameter is not valid </li>
383383
* <li>the `pageSize` query parameter is not valid </li>
384384
* </ul>
385-
* @param page Optional parameter: Example:
386-
* @param pageSize Optional parameter: Example:
387-
* @return Returns the void response from the API call
385+
* @param page Optional parameter: Example:
386+
* @param pageSize Optional parameter: Example:
387+
* @return Returns the void response from the API call
388388
*/
389389
public void retrieveAsync(
390390
final Integer page,
@@ -435,7 +435,7 @@ public void onSuccess(HttpContext _context, HttpResponse _response) {
435435
try {
436436

437437
//invoke the callback after response if its not null
438-
if (getHttpCallBack() != null)
438+
if (getHttpCallBack() != null)
439439
{
440440
getHttpCallBack().OnAfterResponse(_context);
441441
}
@@ -485,25 +485,25 @@ public void onFailure(HttpContext _context, Throwable _error) {
485485
}
486486

487487
/**
488-
* This will update a webhook and returned the updated Webhook.
488+
* This will update a webhook and returned the updated Webhook.
489489
* you can update all the attributes individually or together.
490490
* PS : the new value will override the previous one.
491491
* ### Parameters
492492
* + same parameters rules as create webhook apply
493493
* a **Response 404 is returned when** :
494494
* <ul>
495495
* <li>there is no webhook with this `webhookId` </li>
496-
* </ul>
496+
* </ul>
497497
* a **Response 400 is returned when** :
498498
* <ul>
499499
* <li>all attributes are null </li>
500500
* <li>events array is empty </li>
501501
* <li>content-Type is set in the headers instead of using the `encoding` attribute </li>
502502
* </ul>
503-
* @param webhookId Required parameter: Example:
504-
* @param contentType Required parameter: Example:
505-
* @param body Required parameter: Example:
506-
* @return Returns the void response from the API call
503+
* @param webhookId Required parameter: Example:
504+
* @param contentType Required parameter: Example:
505+
* @param body Required parameter: Example:
506+
* @return Returns the void response from the API call
507507
*/
508508
public void update(
509509
final UUID webhookId,
@@ -518,25 +518,25 @@ public void update(
518518
}
519519

520520
/**
521-
* This will update a webhook and returned the updated Webhook.
521+
* This will update a webhook and returned the updated Webhook.
522522
* you can update all the attributes individually or together.
523523
* PS : the new value will override the previous one.
524524
* ### Parameters
525525
* + same parameters rules as create webhook apply
526526
* a **Response 404 is returned when** :
527527
* <ul>
528528
* <li>there is no webhook with this `webhookId` </li>
529-
* </ul>
529+
* </ul>
530530
* a **Response 400 is returned when** :
531531
* <ul>
532532
* <li>all attributes are null </li>
533533
* <li>events array is empty </li>
534534
* <li>content-Type is set in the headers instead of using the `encoding` attribute </li>
535535
* </ul>
536-
* @param webhookId Required parameter: Example:
537-
* @param contentType Required parameter: Example:
538-
* @param body Required parameter: Example:
539-
* @return Returns the void response from the API call
536+
* @param webhookId Required parameter: Example:
537+
* @param contentType Required parameter: Example:
538+
* @param body Required parameter: Example:
539+
* @return Returns the void response from the API call
540540
*/
541541
public void updateAsync(
542542
final UUID webhookId,
@@ -593,7 +593,7 @@ public void onSuccess(HttpContext _context, HttpResponse _response) {
593593
try {
594594

595595
//invoke the callback after response if its not null
596-
if (getHttpCallBack() != null)
596+
if (getHttpCallBack() != null)
597597
{
598598
getHttpCallBack().OnAfterResponse(_context);
599599
}
@@ -634,4 +634,4 @@ public void onFailure(HttpContext _context, Throwable _error) {
634634
APIHelper.getScheduler().execute(_responseTask);
635635
}
636636

637-
}
637+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /