From 11b2515290656a957629b0db6dfb402dbbb7548f Mon Sep 17 00:00:00 2001 From: Justin Joshi Date: Sat, 4 Oct 2025 22:28:45 -0400 Subject: [PATCH 1/2] first commit --- README.md | 26 ++++++++++++++++++++++---- css/style.css | 0 index.html | 14 ++++++++++++++ js/main.js | 18 ++++++++++++++++++ 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 css/style.css create mode 100644 index.html create mode 100644 js/main.js diff --git a/README.md b/README.md index 788ab5a..584995b 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,27 @@ - (1 to 5 no 3) I feel good about my code - Anything specific on which you want feedback! -Example: -``` + + I completed the challenge: 5 I feel good about my code: 4 -I'm not sure if my constructors are setup cleanly... -``` + +Get doggy + +press button, get doggie! + +Tech used: HTML, CSS, JavaScript + +I used a simple fetch request to get doggy! + +Optimizations + +I would get more doggy + +... + +(actually, i would style it a little bit) + +Lessons Learned: + +I learned how to get doggy through doggie api. \ No newline at end of file diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html new file mode 100644 index 0000000..9792d4f --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + Document + + + + +
+ + + \ No newline at end of file diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..4e726a1 --- /dev/null +++ b/js/main.js @@ -0,0 +1,18 @@ +document.querySelector('#first').addEventListener('click', getData) + + +async function getData() { + const url = "https://dog.ceo/api/breeds/image/random"; + try { + const response = await fetch(url); + if (!response.ok) { + throw new Error(`Response status: ${response.status}`); + } + + const result = await response.json(); + + document.querySelector('div').innerHTML += `` + } catch (error) { + console.error(error.message); + } +} From 0888cdcab43600dc656d7b896b43dca80876882a Mon Sep 17 00:00:00 2001 From: Justin Joshi Date: Tue, 7 Oct 2025 13:40:25 -0400 Subject: [PATCH 2/2] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 584995b..41d1792 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ Get doggy press button, get doggie! +https://justinjoshi.github.io/simple-api2-bootcamp/ + Tech used: HTML, CSS, JavaScript I used a simple fetch request to get doggy! @@ -37,4 +39,4 @@ I would get more doggy Lessons Learned: -I learned how to get doggy through doggie api. \ No newline at end of file +I learned how to get doggy through doggie api.