Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Video (info) edit function #53

Merged
merged 4 commits into from
Oct 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,4 @@ dist
test.js
thumbnail.png
yt-auth/
test
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ npm i youtube-videos-uploader

### Usage:
```js
const { upload } = require('youtube-videos-uploader');

import {upload} from 'youtube-videos-uploader' //Typescript
//or
const { upload } = require('youtube-videos-uploader'); //vanilla javascript

// recoveryemail is optional, only required to bypass login with recovery email if prompted for confirmation
const credentials = { email: 'Your Email', pass: 'Your Password', recoveryemail: 'Your Recovery Email' }
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"prettier": "^2.4.1",
"puppeteer": "latest",
"puppeteer-extra": "latest",
"puppeteer-extra-plugin-stealth": "latest",
"typescript": "^4.4.4"
"puppeteer-extra-plugin-stealth": "latest"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -46,6 +45,8 @@
},
"homepage": "https://github.com/fawazahmed0/youtube-uploader#readme",
"devDependencies": {
"@types/fs-extra": "^9.0.13"
"@types/fs-extra": "^9.0.13",
"typescript": "^4.4.4"

}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ upload (credentials, [video1, video2]).then(console.log)
upload (credentials, [video1, video2], {headless:false}).then(console.log)
// Refer Puppeteer documentation for more launch configurations like proxy etc
// https://pptr.dev/#?product=Puppeteer&version=main&show=api-puppeteerlaunchoptions
*/
*/
19 changes: 19 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ export interface Video {
onSuccess?: Function
}

export interface VideoToEdit {
link: string
title?: string
description?: string
tags?: string[]
replaceTags?: string[]
language?: string
playlist?: string
function?: any
thumbnail?: string
publishType?: 'private' | 'unlisted' | 'public' | 'public&premiere'
onSuccess?: Function
}

export interface deleteObj {
link: string
delete:boolean
}

export interface Credentials {
email: string
pass: string
Expand Down