Skip to content

Commit

Permalink
feature: Provide Eepty snippets for dedicated services
Browse files Browse the repository at this point in the history
  • Loading branch information
JPPortier committed May 31, 2024
1 parent 70cbc57 commit 76629fd
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 14 deletions.
6 changes: 2 additions & 4 deletions templates/client/src/main/java/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,15 @@ public static void main(String[] args) {
}

// Verification service dedicated business logic processing
// (see
// https://developers.sinch.com/docs/verification)
// (see https://developers.sinch.com/docs/verification)
// comment if unused
if (client.getConfiguration().getApplicationCredentials().isPresent()) {
VerificationQuickStart verification =
new VerificationQuickStart(client.verification());
}

// Voice service dedicated business logic processing
// (see
// https://developers.sinch.com/docs/voice)
// (see https://developers.sinch.com/docs/voice)
// comment if unused
if (client.getConfiguration().getApplicationCredentials().isPresent()) {
VoiceQuickStart voice = new VoiceQuickStart(client.voice());
Expand Down
9 changes: 6 additions & 3 deletions templates/client/src/main/java/numbers/NumbersQuickStart.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

public class NumbersQuickStart {

private final NumbersService service;
private final NumbersService numbersService;

public NumbersQuickStart(NumbersService service) {
this.service = service;
public NumbersQuickStart(NumbersService numbersService) {
this.numbersService = numbersService;

// replace by your code and business logic
Snippet.execute(this.numbersService);
}
}
14 changes: 14 additions & 0 deletions templates/client/src/main/java/numbers/Snippet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package numbers;

import com.sinch.sdk.domains.numbers.NumbersService;
import java.util.logging.Logger;

public class Snippet {

private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName());

static void execute(NumbersService numbersService) {

LOGGER.info("Snippet execution");
}
}
1 change: 0 additions & 1 deletion templates/client/src/main/java/sms/Snippet.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ public class Snippet {
static void execute(SMSService smsService) {

LOGGER.info("Snippet execution");

}
}
14 changes: 14 additions & 0 deletions templates/client/src/main/java/verification/Snippet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package verification;

import com.sinch.sdk.domains.verification.VerificationService;
import java.util.logging.Logger;

public class Snippet {

private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName());

static void execute(VerificationService verificationService) {

LOGGER.info("Snippet execution");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

public class VerificationQuickStart {

private final VerificationService service;
private final VerificationService verificationService;

public VerificationQuickStart(VerificationService service) {
this.service = service;
public VerificationQuickStart(VerificationService verificationService) {
this.verificationService = verificationService;

// replace by your code and business logic
Snippet.execute(this.verificationService);
}
}
14 changes: 14 additions & 0 deletions templates/client/src/main/java/voice/Snippet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package voice;

import com.sinch.sdk.domains.voice.VoiceService;
import java.util.logging.Logger;

public class Snippet {

private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName());

static void execute(VoiceService voiceService) {

LOGGER.info("Snippet execution");
}
}
9 changes: 6 additions & 3 deletions templates/client/src/main/java/voice/VoiceQuickStart.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

public class VoiceQuickStart {

private final VoiceService service;
private final VoiceService voiceService;

public VoiceQuickStart(VoiceService service) {
this.service = service;
public VoiceQuickStart(VoiceService voiceService) {
this.voiceService = voiceService;

// replace by your code and business logic
Snippet.execute(this.voiceService);
}
}

0 comments on commit 76629fd

Please sign in to comment.