Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions link_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ func (c *Client) ListRevisions(ctx context.Context, shareID, linkID string) ([]R
return res.Revisions, nil
}

func (c *Client) GetRevisionAllBlocks(ctx context.Context, shareID, linkID, revisionID string) (Revision, error) {
var res struct {
Revision Revision
}

if err := c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
return r.
SetResult(&res).
Get("/drive/shares/" + shareID + "/files/" + linkID + "/revisions/" + revisionID)
}); err != nil {
return Revision{}, err
}

return res.Revision, nil
}

func (c *Client) GetRevision(ctx context.Context, shareID, linkID, revisionID string, fromBlock, pageSize int) (Revision, error) {
if fromBlock < 1 {
return Revision{}, fmt.Errorf("fromBlock must be greater than 0")
Expand Down