diff --git a/src/utilities/api-call.js b/src/utilities/api-call.js
index 1718e73..7f44bef 100644
--- a/src/utilities/api-call.js
+++ b/src/utilities/api-call.js
@@ -1,12 +1,21 @@
-const getCatFacts = (url) => {
- return fetch(url)
+const getCatPhotos = () => {
+ return fetch('https://api.thecatapi.com/v1/images/search?size=med&mime_types=jpg&format=json&has_breeds=true&order=RANDOM&page=0&limit=10', {
+ method: 'GET',
+ headers: {
+ "Content-Type": "application/json",
+ "x-api-key" : "live_FuFFXKaSKCVUcKTZnk9uNsM0iH56QnCHDr36p2iLRV7HIYpsbrjBdkcThRCCUjQT"
+ }
+ })
.then(res => {
if (!res.ok) {
throw new Error(res.status);
} else {
return res.json();
}
- });
-};
+ })
+ .catch(err => {
+ console.log(err)
+ })
+}
-export default getCatFacts;
\ No newline at end of file
+export { getCatPhotos };
\ No newline at end of file
diff --git a/src/utilities/arrow-icon.png b/src/utilities/arrow-icon.png
new file mode 100644
index 0000000..d042aa1
Binary files /dev/null and b/src/utilities/arrow-icon.png differ
diff --git a/src/utilities/dataCleaner.js b/src/utilities/dataCleaner.js
new file mode 100644
index 0000000..18260fa
--- /dev/null
+++ b/src/utilities/dataCleaner.js
@@ -0,0 +1,22 @@
+const dataCleaner = (catApiData) => {
+
+ return catApiData.map(cat =>{
+
+ return {
+ affectionLevel: cat.breeds[0].affection_level,
+ description: cat.breeds[0].description,
+ dogFriendly: cat.breeds[0].dog_friendly >= 5 ? "Yes" : "No",
+ energyLevel: cat.breeds[0].energy_level,
+ id: cat.id,
+ image: cat.url,
+ name: cat.breeds[0].name,
+ origin: cat.breeds[0].origin,
+ temperament: cat.breeds[0].temperament,
+ vcaUrl: cat.breeds[0].vcahospitals_url,
+ wikiUrl: cat.breeds[0].wikipedia_url,
+ favorited: false,
+ }
+ })
+}
+
+export default dataCleaner;
\ No newline at end of file
diff --git a/src/utilities/expand-arrow.png b/src/utilities/expand-arrow.png
new file mode 100644
index 0000000..1189972
Binary files /dev/null and b/src/utilities/expand-arrow.png differ
diff --git a/src/utilities/expand-icon.png b/src/utilities/expand-icon.png
new file mode 100644
index 0000000..34b4bac
Binary files /dev/null and b/src/utilities/expand-icon.png differ
diff --git a/src/utilities/full-size-kitty.jpg b/src/utilities/full-size-kitty.jpg
new file mode 100644
index 0000000..93f4533
Binary files /dev/null and b/src/utilities/full-size-kitty.jpg differ
diff --git a/src/utilities/heart.png b/src/utilities/heart.png
new file mode 100644
index 0000000..3c5edd0
Binary files /dev/null and b/src/utilities/heart.png differ
diff --git a/src/utilities/home-page-kitty.jpg b/src/utilities/home-page-kitty.jpg
new file mode 100644
index 0000000..ccbc4c4
Binary files /dev/null and b/src/utilities/home-page-kitty.jpg differ
diff --git a/src/utilities/test-data.js b/src/utilities/test-data.js
new file mode 100644
index 0000000..7bf83c3
--- /dev/null
+++ b/src/utilities/test-data.js
@@ -0,0 +1,99 @@
+const testData = [{
+ breeds: [{
+ adaptability: 5,
+ affection_level: 5,
+ alt_names: "Siam, Thai Cat",
+ cfa_url: "http://cfa.org/Breeds/BreedsSthruT/Siamese.aspx",
+ child_friendly: 4,
+ country_code: "TH",
+ country_codes: "TH",
+ description: "While Siamese cats are extremely fond of their people, they will follow you around and supervise your every move, being talkative and opinionated. They are a demanding and social cat, that do not like being left alone for long periods.",
+ dog_friendly: 5,
+ energy_level: 5,
+ experimental: 0,
+ grooming: 1,
+ hairless: 0,
+ health_issues: 1,
+ hypoallergenic: 1,
+ id: "siam",
+ indoor: 0,
+ intelligence: 5,
+ lap: 1,
+ life_span: "12 - 15",
+ name: "Siamese",
+ natural: 0,
+ origin: "Thailand",
+ rare: 0,
+ reference_image_id: "ai6Jps4sx",
+ rex: 0,
+ shedding_level: 2,
+ short_legs: 0,
+ social_needs: 5,
+ stranger_friendly: 5,
+ suppressed_tail: 0,
+ temperament: "Active, Agile, Clever, Sociable, Loving, Energetic",
+ vcahospitals_url: "https://vcahospitals.com/know-your-pet/cat-breeds/siamese",
+ vetstreet_url: "http://www.vetstreet.com/cats/siamese",
+ vocalisation: 5,
+ weight: {
+ imperial: "8 - 15",
+ metric: "4 - 7"
+ },
+ wikipedia_url: "https://en.wikipedia.org/wiki/Siamese_(cat)"
+ }],
+ height: 809,
+ id: "uTG1YFzJV",
+ url: "https://cdn2.thecatapi.com/images/uTG1YFzJV.jpg",
+ width: 1080
+},
+{
+ breeds: [{
+ adaptability: 5,
+ affection_level: 5,
+ alt_names: "Siam, Thai Cat",
+ cfa_url: "http://cfa.org/Breeds/BreedsSthruT/Siamese.aspx",
+ child_friendly: 4,
+ country_code: "TH",
+ country_codes: "TH",
+ description: "While Siamese cats are extremely fond of their people, they will follow you around and supervise your every move, being talkative and opinionated. They are a demanding and social cat, that do not like being left alone for long periods.",
+ dog_friendly: 5,
+ energy_level: 5,
+ experimental: 0,
+ grooming: 1,
+ hairless: 0,
+ health_issues: 1,
+ hypoallergenic: 1,
+ id: "siam",
+ indoor: 0,
+ intelligence: 5,
+ lap: 1,
+ life_span: "12 - 15",
+ name: "I swear this isn't a siamese cat",
+ natural: 0,
+ origin: "Def not Thailand",
+ rare: 0,
+ reference_image_id: "ai6Jps4sx",
+ rex: 0,
+ shedding_level: 2,
+ short_legs: 0,
+ social_needs: 5,
+ stranger_friendly: 5,
+ suppressed_tail: 0,
+ temperament: "Active, Agile, Clever, Sociable, Loving, Energetic",
+ vcahospitals_url: "https://vcahospitals.com/know-your-pet/cat-breeds/siamese",
+ vetstreet_url: "http://www.vetstreet.com/cats/siamese",
+ vocalisation: 5,
+ weight: {
+ imperial: "8 - 15",
+ metric: "4 - 7"
+ },
+ wikipedia_url: "https://en.wikipedia.org/wiki/Siamese_(cat)"
+ }],
+ height: 809,
+ id: "uTG1YFzJV",
+ url: "https://cdn2.thecatapi.com/images/uTG1YFzJV.jpg",
+ width: 1080
+}
+]
+
+export default testData;
\ No newline at end of file
diff --git a/src/utilities/trash-icon.png b/src/utilities/trash-icon.png
new file mode 100644
index 0000000..895e47f
Binary files /dev/null and b/src/utilities/trash-icon.png differ