Skip to content

Commit

Permalink
Merge branch 'developer-student-clubs:master' into nasa_api
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruti26 authored Oct 3, 2023
2 parents cf7389d + 5da46e1 commit 637f671
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/close_merged_pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Comment on PR Closure

on:
pull_request:
pull_request_target:
types:
- closed

Expand Down Expand Up @@ -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}.`);
console.log(`Commented on the closed PR: ${commentBody}.`);
4 changes: 2 additions & 2 deletions .github/workflows/pr_comment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Pull Request related comments
on:
pull_request:
pull_request_target:
types:
- opened

Expand All @@ -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🚀.
Expand Down
9 changes: 9 additions & 0 deletions Existing_API_Collection/PasswordGeneratorAPI/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<h1>Password Generator API🌟</h1>
<h3>This API is used to generate strong passwords.</h3>
<h2>Use of API👀</h2>
<p>User can generate a strong password on a single that contains uppercase, lowercase letters, numbers, and symbols as well.</p>
<h2>Future Scope Of API📌</h2>
<p>A Threat-safe password can be easily generated for better security purposes.</p>
<h2>Preview🤩</h2>
<img src="https://github.com/dhruvishavaghani/demo/assets/109460833/74fb24e3-f501-4b9c-b4a4-0d7459ecdc27">

27 changes: 27 additions & 0 deletions Existing_API_Collection/PasswordGeneratorAPI/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Generator API</title>
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<main mv-app="passwordToggle">
<meta property="isShown" content="[if(toggle mod 2, true, false)]" />

<label>
<p>Password</p>
<input id="in" class="password" value="password" />
</label>

<button type="button" onclick="fun()" property="toggle" aria-pressed="[isShown]" aria-label="Password is [if(isShown, visible, hidden)]"
class="password-[if(isShown, 'hide', 'show')]">
Get A New Password
</button>
</main>
</body>
</html>
16 changes: 16 additions & 0 deletions Existing_API_Collection/PasswordGeneratorAPI/script.js
Original file line number Diff line number Diff line change
@@ -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);
}
});
}
100 changes: 100 additions & 0 deletions Existing_API_Collection/PasswordGeneratorAPI/style.css
Original file line number Diff line number Diff line change
@@ -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;
}
2 changes: 2 additions & 0 deletions Existing_API_Collection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
|[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.|
|[Password generator API](./PasswordGeneratorAPI)|User can generate a strong password on a single that contains uppercase, lowercase letters, numbers, and symbols as well.|

0 comments on commit 637f671

Please sign in to comment.