Class SharesResource

java.lang.Object
dev.dosya.sdk.resource.SharesResource

public final class SharesResource extends Object
Provides operations for managing share links in Dosya workspaces.

This resource handles listing active share links and revoking them.

Since:
0.1.0
  • Constructor Details

    • SharesResource

      public SharesResource(@NotNull @NotNull DosyaHttpClient http)
      Creates a new SharesResource backed by the given HTTP client.
      Parameters:
      http - the HTTP client used to make API requests
  • Method Details

    • list

      @NotNull public @NotNull SharesListResponse list(@NotNull @NotNull String workspaceId)
      Lists all share links in a workspace along with summary statistics.
      Parameters:
      workspaceId - the workspace whose share links to list
      Returns:
      the response containing share links and stats
      Throws:
      DosyaApiException - if the API returns an error
    • revoke

      public void revoke(@NotNull @NotNull String linkId)
      Revokes an active share link, making it inaccessible.
      Parameters:
      linkId - the unique identifier of the share link to revoke
      Throws:
      DosyaApiException - if the API returns an error