Class SORIApiClient

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final AuthResult authenticate() This function performs an authentication request to the Sori API and retrieves a token, updated status, and URL from the response.
      final String downloadAudioPack(String fileUrl) This function downloads an updated audio pack from a given URL returns the local file path where the audio pack is saved.
      final SORICampaign postActivity(String materialId, SORIActivityTrait trait, Boolean skipNetworkCheck) This function posts an activity to the Sori API and retrieves a campaign object from the response.
      final URL visitActionUrl(URL url)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • authenticate

         final AuthResult authenticate()

        This function performs an authentication request to the Sori API and retrieves a token, updated status, and URL from the response. It authenticates the user with the Sori API using the provided application ID, secret key, and session ID.

      • downloadAudioPack

         final String downloadAudioPack(String fileUrl)

        This function downloads an updated audio pack from a given URL returns the local file path where the audio pack is saved.

        Parameters:
        fileUrl - The URL of the audio pack to download
        Returns:

        The local file path where the audio pack is saved

      • postActivity

         final SORICampaign postActivity(String materialId, SORIActivityTrait trait, Boolean skipNetworkCheck)

        This function posts an activity to the Sori API and retrieves a campaign object from the response.

        Parameters:
        materialId - The ID of the material to post
        skipNetworkCheck - Skip network availability check (for internal retry)
        Returns:

        A SORICampaign object containing campaign details, or null if the request fails