From 8aa7f4e01dcaebe28724c8e5b03b381b21f5f0b7 Mon Sep 17 00:00:00 2001 From: dhruvishavaghani Date: Sun, 1 Oct 2023 15:17:39 +0530 Subject: [PATCH 1/6] PasswordGeneratotAPI --- .../PasswordGeneratorAPI/README.md | 9 ++ .../PasswordGeneratorAPI/index.html | 27 +++++ .../PasswordGeneratorAPI/script.js | 16 +++ .../PasswordGeneratorAPI/style.css | 100 ++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 Existing_API_Collection/PasswordGeneratorAPI/README.md create mode 100644 Existing_API_Collection/PasswordGeneratorAPI/index.html create mode 100644 Existing_API_Collection/PasswordGeneratorAPI/script.js create mode 100644 Existing_API_Collection/PasswordGeneratorAPI/style.css diff --git a/Existing_API_Collection/PasswordGeneratorAPI/README.md b/Existing_API_Collection/PasswordGeneratorAPI/README.md new file mode 100644 index 0000000..c7f5f89 --- /dev/null +++ b/Existing_API_Collection/PasswordGeneratorAPI/README.md @@ -0,0 +1,9 @@ +

Password Generator API🌟

+

This API is used to generate strong passwords.

+

Use of API👀

+

User can generate a strong password on a single that contains uppercase, lowercase letters, numbers, and symbols as well.

+

Future Scope Of API📌

+

A Threat-safe password can be easily generated for better security purposes.

+

Preview🤩

+ + diff --git a/Existing_API_Collection/PasswordGeneratorAPI/index.html b/Existing_API_Collection/PasswordGeneratorAPI/index.html new file mode 100644 index 0000000..fe1d862 --- /dev/null +++ b/Existing_API_Collection/PasswordGeneratorAPI/index.html @@ -0,0 +1,27 @@ + + + + + + + Password Generator API + + + + + +
+ + + + + +
+ + \ No newline at end of file diff --git a/Existing_API_Collection/PasswordGeneratorAPI/script.js b/Existing_API_Collection/PasswordGeneratorAPI/script.js new file mode 100644 index 0000000..eee6aa7 --- /dev/null +++ b/Existing_API_Collection/PasswordGeneratorAPI/script.js @@ -0,0 +1,16 @@ +function fun(){ + var length = '10' +$.ajax({ + method: 'GET', + url: 'https://api.api-ninjas.com/v1/passwordgenerator?length=' + length, + headers: { 'X-Api-Key': '9SAecf5e8Llay9jfLxJbOw==Ic2yXmTIbcm2VldF'}, + contentType: 'application/json', + success: function(result) { + document.getElementById("in").value = result.random_password + console.log(result.random_password) + }, + error: function ajaxError(jqXHR) { + console.error('Error: ', jqXHR.responseText); + } +}); +} \ No newline at end of file diff --git a/Existing_API_Collection/PasswordGeneratorAPI/style.css b/Existing_API_Collection/PasswordGeneratorAPI/style.css new file mode 100644 index 0000000..2f0e624 --- /dev/null +++ b/Existing_API_Collection/PasswordGeneratorAPI/style.css @@ -0,0 +1,100 @@ +@import url('https://fonts.googleapis.com/css2?family=Arsenal&display=swap'); + +/* Main logic */ +.password-hide::before { + content: "🧐"; +} + +.password-show::before { + content: "😌"; +} + + +/* App styles */ +*, *::before, *::after { + box-sizing: border-box; + margin: 0; + padding: 0; + + font-family: "Arsenal", sans-serif; + font-size: 100%; +} + +html { + --accent-color: #97266d; + --text-color: #2d3748; + --bg-color: #f7fafc; + + min-block-size: 100vh; + + display: grid; + place-items: center; + + background-color: #edf2f7; + + font-size: 150%; +} + +[mv-app] { + min-inline-size: 25em; + padding: 2em 3.5em; + + color: var(--text-color); + background-color: var(--bg-color); + + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); +} + +label > p { + color: #718096; + + font-size: 80%; +} + +.password { + margin-block-start: 0.4em; + padding: 0.3em 0.5em; + + color: var(--accent-color); +} + +::selection { + color: var(--bg-color); + background-color: var(--accent-color); +} + +[property="toggle"] { + min-inline-size: 5em; + margin-inline-start: 1em; + padding: 0.4em 0.6em; + + font-size: 110%; + color: var(--bg-color); + + background-color: var(--accent-color); + + border: none; + border-radius: 0.3em; + + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); +} + +.password:focus { + outline: none; + + box-shadow: 0 0 1px 3px var(--accent-color); + + border-color: transparent; +} + +[property="toggle"]:focus { + outline-color: var(--accent-color); +} + +:focus:not(:focus-visible) { + outline: none; +} + +.password-show::before, .password-hide::before { + margin-inline-end: 0.3em; +} \ No newline at end of file From 985f3f26921ca753ada55744ebb740039f5a99c8 Mon Sep 17 00:00:00 2001 From: Disha Modi <106090499+dishamodi0910@users.noreply.github.com> Date: Sun, 1 Oct 2023 20:29:51 +0530 Subject: [PATCH 2/6] Update README.md --- Existing_API_Collection/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Existing_API_Collection/README.md b/Existing_API_Collection/README.md index dfaa4fb..3b28014 100644 --- a/Existing_API_Collection/README.md +++ b/Existing_API_Collection/README.md @@ -5,3 +5,4 @@ |[Encoding API](./EncodingAPI)| It explains us how to work with Text Encoder, Text Decoder, TextDecoderStream and TextEncoderStream| |[Country API](./CountryAPI)| It explains us how to get all the information about a particular country| |[Dictionary API](./DictionaryAPI)| It provides us a meaning of a particular word| +|[Github API](./GithubAPI)|It is a set of web-based endpoints and tools provided by GitHub to allow developers to programmatically interact with and access data from the GitHub platform.| From f19df478f27b4ee008b96c147218d254bcd92cdf Mon Sep 17 00:00:00 2001 From: Disha Modi <106090499+dishamodi0910@users.noreply.github.com> Date: Sun, 1 Oct 2023 20:50:28 +0530 Subject: [PATCH 3/6] Update pr_comment.yml --- .github/workflows/pr_comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml index 276f309..48392ce 100644 --- a/.github/workflows/pr_comment.yml +++ b/.github/workflows/pr_comment.yml @@ -11,7 +11,7 @@ jobs: - name: Comment on Opening Pull Request uses: wow-actions/auto-comment@v1 with: - GITHUB_TOKEN : ${{ secrets.APIVerse_SECRET }} + github-token : ${{ secrets.APIVerse_SECRET }} pullRequestOpened: | @{{ author }}, Thank you for creating PR! We will review it super soon. 😇❣️ As we continue to evolve and innovate, we encourage you to share your ideas, feedback, and code to help us push the boundaries of what's possible in the world of APIs🚀. From 6462ff738ca0dc378ed49497993b17774485bfc9 Mon Sep 17 00:00:00 2001 From: Disha Modi <106090499+dishamodi0910@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:11:34 +0530 Subject: [PATCH 4/6] Update pr_comment.yml --- .github/workflows/pr_comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml index 48392ce..6eafb1e 100644 --- a/.github/workflows/pr_comment.yml +++ b/.github/workflows/pr_comment.yml @@ -1,6 +1,6 @@ name: Pull Request related comments on: - pull_request: + pull_request_target: types: - opened From eba83dce048b4b20955a4e7cb18df1449a28b87e Mon Sep 17 00:00:00 2001 From: Disha Modi <106090499+dishamodi0910@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:12:05 +0530 Subject: [PATCH 5/6] Update close_merged_pr.yml --- .github/workflows/close_merged_pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/close_merged_pr.yml b/.github/workflows/close_merged_pr.yml index abf5256..dcfc566 100644 --- a/.github/workflows/close_merged_pr.yml +++ b/.github/workflows/close_merged_pr.yml @@ -1,7 +1,7 @@ name: Comment on PR Closure on: - pull_request: + pull_request_target: types: - closed @@ -45,4 +45,4 @@ jobs: Happy Coding! ✨ Will See you soon❣️`; await github.issues.createComment({ owner, repo, issue_number: number, body: commentBody }); - console.log(`Commented on the closed PR: ${commentBody}.`); \ No newline at end of file + console.log(`Commented on the closed PR: ${commentBody}.`); From 8e700835ce2485055f889d1a12281d8057482394 Mon Sep 17 00:00:00 2001 From: Disha Modi <106090499+dishamodi0910@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:33:01 +0530 Subject: [PATCH 6/6] Update README.md --- Existing_API_Collection/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Existing_API_Collection/README.md b/Existing_API_Collection/README.md index 3b28014..3affe38 100644 --- a/Existing_API_Collection/README.md +++ b/Existing_API_Collection/README.md @@ -6,3 +6,4 @@ |[Country API](./CountryAPI)| It explains us how to get all the information about a particular country| |[Dictionary API](./DictionaryAPI)| It provides us a meaning of a particular word| |[Github API](./GithubAPI)|It is a set of web-based endpoints and tools provided by GitHub to allow developers to programmatically interact with and access data from the GitHub platform.| +|[Password generator API](./PasswordGeneratorAPI)|User can generate a strong password on a single that contains uppercase, lowercase letters, numbers, and symbols as well.|