zenodo
    Preparing search index...

    Class Zenodo

    Index

    Constructors

    Properties

    accessToken: string
    authenticationState: ZenodoAuthenticationStatesType
    baseURL: string
    host: string
    logger?: Logger

    Methods

    • Creates a new record in the Zenodo instance.

      Parameters

      • metadata: ZenodoMetadata

        the metadata for the new record

      Returns Promise<Record>

      The created record object

      If the metadata is invalid or the request fails

    • Lists all records in the Zenodo instance.

      Parameters

      • options: ListDepositionsOptions = {}

        options for listing records

      Returns Promise<Record[]>

      An array of Record objects representing the records in the Zenodo instance.

      Lists all records in the Zenodo instance.

    • Retrieve a public deposition record

      Parameters

      • id: Identifier

        the deposition id

      • options: PublicRecordOptions = {}

        additional options for the request

      Returns Promise<Record>

      The public deposition record

      If the deposition does not exist or the ID is undefined

    • List files in a deposition

      Parameters

      • OptionaldepositionId: Identifier

        the deposition id to retrieve requests for

      Returns Promise<{ hits: { hits: ZenodoReview[]; total: number } }>

      An object containing the total number of requests and the list of requests

    • Retrieve all versions of a deposition

      Parameters

      • id: Identifier

        the deposition id

      Returns Promise<Record[]>

      unvalidated array of deposition versions

    • Verify the authentication state of the Zenodo instance. This method checks if the access token is valid by making a request to the Zenodo API.

      Returns Promise<boolean>

      true if authentication is successful, false otherwise.

    • Create a new Zenodo instance. This method authenticates the user and initializes a new Zenodo instance.

      Parameters

      • options: ZenodoOptions

        the options for creating a Zenodo instance

      Returns Promise<Zenodo>

      a new Zenodo instance

      If the authentication fails