Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

doodstream

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doodstream

A simple API client for interacting with Doodstream, including file uploads, account management, and more.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

About DoodStream

DoodStream is a video hosting service where you can upload videos, share them with others, and monetize your content. It's an excellent platform for content creators to host and distribute videos while earning money.

There are no bandwidth limitations on DoodStream, meaning you can upload and share as many videos as you want without worrying about bandwidth restrictions.

How to Get an API Key

To use the features of this package, you will need a DoodStream API key. If you don't have one yet, you can sign up and get your API key by following these steps:

  1. Visit the DoodStream website.
  2. Sign up for a new account.
  3. Once registered, go to Settings section, you'll find your API Key.

Once you have your API key, you can start using the DoodStream API with this package!

Support me

Classes

Doodstream
DoodstreamErrorError
UnauthorizedDoodstreamError
NotFoundDoodstreamError
UnsupportedMediaTypeDoodstreamError
Request

Doodstream

Kind: global class

new Doodstream()

A class for interacting with the Doodstream API. This class includes methods for performing actions related to account info, file uploads, folder management, and other operations provided by the Doodstream API.

new Doodstream(apiKey)

Creates an instance of the Doodstream class with the provided API key. The API key will be used for authenticating requests to the Doodstream API.

ParamTypeDescription
apiKeystringThe API key to authenticate with the Doodstream API.

doodstream.accountInfo() ⇒ Promise.<Object>

Get basic information about the account associated with the provided API key.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the account information.
Throws:

doodstream.accountReports([options]) ⇒ Promise.<Object>

Get reports of your account (default last 7 days).

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the account report data.
Throws:

ParamTypeDefaultDescription
[options]Object{}The options for retrieving the account reports.
[options.last]numberThe number of days of reports to retrieve (optional, default is last 7 days).
[options.fromDate]stringThe start date for the report in YYYY-MM-DD format (optional).
[options.toDate]stringThe end date for the report in YYYY-MM-DD format (optional).

doodstream.dmcaList([options]) ⇒ Promise.<Object>

Get a list of DMCA reported files (500 results per page).

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the DMCA reported files list.
Throws:

ParamTypeDefaultDescription
[options]Object{}The options for retrieving the DMCA reported files list.
[options.perPage]numberThe number of results per page (optional, default is 500).
[options.page]numberThe page number for pagination (optional).

doodstream.uploadUrl() ⇒ Promise.<Object>

Get the URL for uploading local files.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the upload URL for local files.
Throws:

doodstream.localUpload(filePath) ⇒ Promise.<Object>

Upload local files to the server using the API.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the result of the file upload.
Throws:

ParamTypeDescription
filePathstringThe file path of the local file to upload.

doodstream.cloneVideo(fileCode, [options]) ⇒ Promise.<Object>

Copy or clone your own or another user's file.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the result of the clone operation.
Throws:

ParamTypeDefaultDescription
fileCodestringThe file code of the file to clone.
[options]Object{}Optional parameters for the cloning process.
[options.folderId]stringThe folder ID where the file will be copied to (optional).

doodstream.remoteAdd(url, [options]) ⇒ Promise.<Object>

Upload files using direct links.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the result of the upload operation.
Throws:

ParamTypeDefaultDescription
urlstringThe URL of the file to upload.
[options]Object{}Optional parameters for the upload.
[options.folderId]stringThe folder ID where the file will be uploaded to (optional).
[options.newTitle]stringThe new title to set for the uploaded file (optional).

doodstream.remoteList() ⇒ Promise.<Object>

Get the list of remote uploads and their status.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the list of remote uploads and their status.
Throws:

doodstream.remoteStatus(fileCode) ⇒ Promise.<Object>

Get the status of a remote upload.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the status of the remote upload.
Throws:

ParamTypeDescription
fileCodestringThe file code of the file to check the status for.

doodstream.remoteSlots() ⇒ Promise.<Object>

Get the total and used remote upload slots.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the total and used remote upload slots.
Throws:

doodstream.remoteActions(restartErrors, [options]) ⇒ Promise.<Object>

Perform various actions on remote uploads.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the result of the remote upload action.
Throws:

ParamTypeDefaultDescription
restartErrorsbooleanWhether to restart all errors (required).
[options]Object{}Optional parameters for performing actions.
[options.clearErrors]booleanWhether to clear all errors (optional).
[options.clearAll]booleanWhether to clear all (optional).
[options.deleteCode]stringThe file code to delete a transfer (optional).

doodstream.createFolder(name, [options]) ⇒ Promise.<Object>

Create a new folder.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the result of the folder creation.
Throws:

ParamTypeDefaultDescription
namestringThe name of the folder to create (required).
[options]Object{}Optional parameters for the folder creation.
[options.parentId]stringThe ID of the parent folder where the new folder will be created (optional).

doodstream.renameFolder(folderId, name) ⇒ Promise.<Object>

Rename an existing folder.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the result of the folder renaming operation.
Throws:

ParamTypeDescription
folderIdstringThe ID of the folder to rename (required).
namestringThe new name for the folder (required).

doodstream.listFolder(folderId, [options]) ⇒ Promise.<Object>

List all folders within a specified folder.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the list of folders.
Throws:

ParamTypeDefaultDescription
folderIdstringThe ID of the folder whose contents (subfolders) will be listed (required).
[options]Object{}Optional parameters for listing the folders.
[options.onlyFolders]booleanWhether to list only folders (optional).

doodstream.listFiles([options]) ⇒ Promise.<Object>

List all files with optional filters.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the list of files.
Throws:

ParamTypeDefaultDescription
[options]Object{}Optional parameters for listing the files.
[options.page]numberThe page number for pagination (optional).
[options.perPage]numberThe maximum number of videos per page (maximum 200, optional).
[options.folderId]stringThe ID of the folder to list files from (optional).
[options.created]stringShow files uploaded after a specified timestamp or within X minutes ago (optional).

doodstream.fileStatus(fileCode) ⇒ Promise.<Object>

Check the status of a specific file.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the status of the file.
Throws:

ParamTypeDescription
fileCodestringThe file code of the file to check the status for (required).

doodstream.fileInfo(fileCode) ⇒ Promise.<Object>

Get detailed information about a specific file.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the file information.
Throws:

ParamTypeDescription
fileCodestringThe file code of the file to retrieve information for (required).

doodstream.fileImage(fileCode) ⇒ Promise.<Object>

Get the splash, single, or thumbnail image of a specific file.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the file's image data.
Throws:

ParamTypeDescription
fileCodestringThe file code of the file to retrieve the image for (required).

doodstream.renameFile(fileCode, title) ⇒ Promise.<Object>

Rename a specific file.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the result of the file renaming operation.
Throws:

ParamTypeDescription
fileCodestringThe file code of the file to rename (required).
titlestringThe new name for the file (required).

doodstream.moveFile(fileCode, folderId) ⇒ Promise.<Object>

Move a file from one folder to another.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the result of the file move operation.
Throws:

ParamTypeDescription
fileCodestringThe file code of the file to move (required).
folderIdstringThe ID of the folder to move the file to (required). Use 0 to move to the root directory.

doodstream.searchFile(searchTerm) ⇒ Promise.<Object>

Search for files using a specified search term.

Kind: instance method of Doodstream
Returns: Promise.<Object> - - A promise that resolves to the search results.
Throws:

ParamTypeDescription
searchTermstringThe term to search for in the files (required).

DoodstreamError ⇐ Error

Kind: global class
Extends: Error

new DoodstreamError(code, message)

Custom error class that extends the built-in Error class. Represents a general error for the Doodstream application.

ParamTypeDescription
codestringThe error code associated with the error.
messagestringThe error message describing the error.

Unauthorized ⇐ DoodstreamError

Kind: global class
Extends: DoodstreamError

new Unauthorized(code, message)

Custom error class for unauthorized access, extends DoodstreamError. Represents an error when the user is not authorized to perform a given action.

ParamTypeDescription
codestringThe error code associated with the unauthorized error.
messagestringThe error message describing the unauthorized access.

NotFound ⇐ DoodstreamError

Kind: global class
Extends: DoodstreamError

new NotFound(code, message)

Custom error class for not found errors, extends DoodstreamError. Represents an error when the requested resource cannot be found.

ParamTypeDescription
codestringThe error code associated with the not found error.
messagestringThe error message describing the missing resource.

UnsupportedMediaType ⇐ DoodstreamError

Kind: global class
Extends: DoodstreamError

new UnsupportedMediaType(code, message)

Custom error class for unsupported media type errors, extends DoodstreamError. Represents an error when the media type of the request is unsupported by the server.

ParamTypeDescription
codestringThe error code associated with the unsupported media type error.
messagestringThe error message describing the unsupported media type.

Request

Kind: global class

new Request()

A class that provides utility methods for making HTTP requests using Axios. It includes methods for sending GET and POST requests, with handling for API key validation errors.

Request.get(url) ⇒ Promise.<Object>

Makes a GET request to the specified URL using Axios. If the response contains a specific error message related to the API key, an Unauthorized error is thrown.

Kind: static method of Request
Returns: Promise.<Object> - - The data returned from the GET request.
Throws:

  • Unauthorized - If no API key is provided or if the API key is invalid.
ParamTypeDescription
urlstringThe URL to send the GET request to.

Request.post(url, [data], [headers]) ⇒ Promise.<Object>

Makes a POST request to the specified URL using Axios. If the response contains a specific error message related to the API key, an Unauthorized error is thrown.

Kind: static method of Request
Returns: Promise.<Object> - - The data returned from the POST request.
Throws:

  • Unauthorized - If no API key is provided or if the API key is invalid.
ParamTypeDefaultDescription
urlstringThe URL to send the POST request to.
[data]Object{}The data to send in the body of the POST request (optional).
[headers]Object{}The headers to include with the POST request (optional).

Keywords

FAQs

Package last updated on 22 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc