Package dev.dosya.sdk

Class DosyaClient

java.lang.Object
dev.dosya.sdk.DosyaClient

public final class DosyaClient extends Object
The main entry point for the Dosya Java SDK.

Provides access to all Dosya API resources through dedicated sub-resource accessors. Create an instance with either a DosyaClientOptions object for full configuration or a simple API key string for quick setup.


 DosyaClient client = new DosyaClient("dos_your_api_key");
 UserProfile profile = client.me().profile();
 
Since:
0.1.0
  • Constructor Details

    • DosyaClient

      public DosyaClient(@NotNull @NotNull DosyaClientOptions options)
      Creates a new DosyaClient with the given options.
      Parameters:
      options - the client configuration options
      Throws:
      NullPointerException - if options is null
      IllegalArgumentException - if the API key does not start with "dos_"
    • DosyaClient

      public DosyaClient(@NotNull @NotNull String apiKey)
      Creates a new DosyaClient with a simple API key using default settings.
      Parameters:
      apiKey - the Dosya API key (must start with "dos_")
      Throws:
      IllegalArgumentException - if the API key does not start with "dos_"
  • Method Details

    • files

      @NotNull public @NotNull FilesResource files()
      Returns the files resource for file operations.
    • folders

      @NotNull public @NotNull FoldersResource folders()
      Returns the folders resource for folder operations.
    • upload

      @NotNull public @NotNull UploadResource upload()
      Returns the upload resource for file upload operations.
    • download

      @NotNull public @NotNull DownloadResource download()
      Returns the download resource for file download operations.
    • shares

      @NotNull public @NotNull SharesResource shares()
      Returns the shares resource for share link operations.
    • workspaces

      @NotNull public @NotNull WorkspacesResource workspaces()
      Returns the workspaces resource for workspace operations.
    • fileRequests

      @NotNull public @NotNull FileRequestsResource fileRequests()
      Returns the file requests resource for file request operations.
    • search

      @NotNull public @NotNull SearchResource search()
      Returns the search resource for search operations.
    • comments

      @NotNull public @NotNull CommentsResource comments()
      Returns the comments resource for comment operations.
    • me

      @NotNull public @NotNull MeResource me()
      Returns the me resource for authenticated user operations.
    • activity

      @NotNull public @NotNull ActivityResource activity()
      Returns the activity resource for activity log operations.