Skip to content

Commit

Permalink
feature: finish delete sign interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dengwtJpush committed Oct 23, 2019
1 parent e89359e commit 8046373
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
30 changes: 15 additions & 15 deletions example/main/java/cn/jsms/api/JSMSExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public static void main(String[] args) {
// testCreateSign();pass
// testUpdateSign();no pass
// testCheckSign();pass
testDeleteSign();
// testSendVoiceSMSCode();
// testSendTemplateSMS();
}
Expand Down Expand Up @@ -464,20 +465,19 @@ public static void testCheckSign(){
}
}

// public static void testDefaultSign(){
// try {
// SMSClient client = new SMSClient(masterSecret, appkey);
// DefaultSignPayload payload = DefaultSignPayload.newBuilder().
// id(10859).name("SDK6").build();
// ResponseWrapper result = client.setDefaultSign(payload);
// LOG.info(result.toString());
// }catch (APIConnectionException e) {
// LOG.error("Connection error. Should retry later. ", e);
// } catch (APIRequestException e) {
// LOG.error("Error response from JPush server. Should review and fix it. ", e);
// LOG.info("HTTP Status: " + e.getStatus());
// LOG.info("Error Message: " + e.getMessage());
// }
// }
public static void testDeleteSign(){
try {
SMSClient client = new SMSClient(masterSecret, appkey);
ResponseWrapper result = client.deleteSign(10859);
LOG.info(result.toString());
}catch (APIConnectionException e) {
LOG.error("Connection error. Should retry later. ", e);
} catch (APIRequestException e) {
LOG.error("Error response from JPush server. Should review and fix it. ", e);
LOG.info("HTTP Status: " + e.getStatus());
LOG.info("Error Message: " + e.getMessage());
}
}


}
20 changes: 10 additions & 10 deletions src/main/java/cn/jsms/api/JSMSClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,14 @@ public SignInfoResult checkSign(int signId) throws APIConnectionException, APIRe
return _smsClient.checkSign(signId);
}

/**
* set default sign
* @param payload
* @return
* @throws APIConnectionException
* @throws APIRequestException
*/
public ResponseWrapper setDefaultSign(DefaultSignPayload payload) throws APIConnectionException, APIRequestException{
return _smsClient.setDefaultSign(payload);
}
// /**
// * set default sign
// * @param payload
// * @return
// * @throws APIConnectionException
// * @throws APIRequestException
// */
// public ResponseWrapper setDefaultSign(DefaultSignPayload payload) throws APIConnectionException, APIRequestException{
// return _smsClient.setDefaultSign(payload);
// }
}

0 comments on commit 8046373

Please sign in to comment.