Class RCSBusinessMessaging.Files

  • Enclosing class:
    RCSBusinessMessaging

    public class RCSBusinessMessaging.Files
    extends java.lang.Object
    The "files" collection of methods.
    • Constructor Detail

      • Files

        public Files()
    • Method Detail

      • create

        public RCSBusinessMessaging.Files.Create create​(CreateFileRequest content)
                                                 throws java.io.IOException
        Uploads a file for use in media or rich card messages. The agent provides the URL or binary of the file and (optionally) the URL of the corresponding thumbnail file. The RBM platform caches the file for 60 days and returns a unique name that you can use to identify the file when sending agent messages. To upload a file binary, make an HTTP POST request to the Upload URI, omit the `fileUrl` field from the JSON request body, and specify the binary as the POST request body. For example, use the `--upload-file` cURL flag with the fully qualified file path of the binary file. Create a request for the method "files.create". This request holds the parameters needed by the rcsbusinessmessaging server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        content - the CreateFileRequest
        Returns:
        the request
        Throws:
        java.io.IOException
      • create

        public RCSBusinessMessaging.Files.Create create​(CreateFileRequest content,
                                                        com.google.api.client.http.AbstractInputStreamContent mediaContent)
                                                 throws java.io.IOException
        Uploads a file for use in media or rich card messages. The agent provides the URL or binary of the file and (optionally) the URL of the corresponding thumbnail file. The RBM platform caches the file for 60 days and returns a unique name that you can use to identify the file when sending agent messages. To upload a file binary, make an HTTP POST request to the Upload URI, omit the `fileUrl` field from the JSON request body, and specify the binary as the POST request body. For example, use the `--upload-file` cURL flag with the fully qualified file path of the binary file. Create a request for the method "files.create". This request holds the parameters needed by the the rcsbusinessmessaging server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

        This method should be used for uploading media content.

        Parameters:
        content - the CreateFileRequest media metadata or null if none
        mediaContent - The media HTTP content or null if none.
        Returns:
        the request
        Throws:
        java.io.IOException - if the initialization of the request fails