Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Interfaces

Variables

Functions

Variables

Const DEFAULT_OPTIONS

DEFAULT_OPTIONS: Readonly<{ checksum: boolean; sandbox: boolean }> = ...

Functions

create_draft

  • create_draft(deposition_id: number, access_token: string, options?: Options): Promise<ZenodoDraft>
  • Create a draft from an existing Zenodo upload

    For example to create a draft from https://zenodo.org/record/1234567.

    import { create_draft } from '@iomeg/zenodo-upload';
    
    const deposition_id = 1234567;
    const access_token = 'sometoken';
    
    const draft = await create_draft(deposition_id, access_token);
    draft.discard();
    
    throws

    {Error} When communication with Zenodo API fails

    Parameters

    • deposition_id: number

      The deposition identifier of a Zenodo upload

    • access_token: string

      The Zenodo personal access token with the deposit:actions and deposit:write scopes.

    • options: Options = ...

    Returns Promise<ZenodoDraft>

Generated using TypeDoc