- It is a cat API seeded with a list of cats and shelters from Alberta, Canada.
- The url for the API is
https://meowdopt-api.herokuapp.com/
- Note: If it does not open at the first try, give it a minute because free heroku dyno could be sleeping.
Shelters
- Returns an array of shelters objects
[
{
"id": "1",
"name": "Pawsitive Foundation",
"address": "503 Broadway",
"city": "Calgary",
"email": "[email protected]"
},
{
"id": "2",
"name": "Meow Shelter",
"address": "33 Pearl Street SW",
"city": "Calgary",
"email": "[email protected]"
}
]
- Returns a detailed object of a single shelter
[
{
"id": "1",
"name": "Pawsitive Foundation",
"address": "503 Broadway",
"city": "Calgary",
"email": "[email protected]"
}
]
- Returns a list of cats of a specific shelter
[
{
"id": 11,
"name": "Robson",
"gender": "Male",
"age": "Senior",
"description": "This wise, loving senior gentleman was rescued in a small town just outside Calgary and his owners were not able to be located. So he is starting over. After a full health check, a bit of a shave to remove some matts, he is healthy and would like to meet his match as soon as possible. He is not a fan of other cats and would prefer to be the only King in your life.",
"image": "/images/cat0.jpeg",
"shelter_id": 1
},
{
"id": 1717,
"name": "Edu",
"gender": "Male",
"age": "Adult",
"description": "I love to play, and my favorite game is chasing balls. I'm affectionate and I don't like being hugged, but if I have a lap available, I take the opportunity to take a nap and cuddle.",
"image": "/images/cat16.jpeg",
"shelter_id": 1
}
]
Cats
- Returns an array of cat objects
[
{
"id": "11",
"shelter_id": "1",
"name": "Robson",
"image": "/images/cat0.jpeg",
"gender": "Male",
"description": "This wise, loving senior gentleman was rescued in a small town just outside Calgary and his owners were not able to be located. So he is starting over. After a full health check, a bit of a shave to remove some matts, he is healthy and would like to meet his match as soon as possible. He is not a fan of other cats and would prefer to be the only King in your life.",
"age": "Senior"
},
{
"id": "22",
"shelter_id": "2",
"name": "Pedro",
"image": "/images/cat1.jpeg",
"gender": "Male",
"description": "I am a big and sometimes sassy guy. I prefer a quieter place of residence without other pets or kids. I have a weird love/hate relationship with bags. When you handle one it startles me but I like to try to climb inside of them. Despite being kind of picky and oddly not a big fan of Temptations treats, I have a healthy appetite. I do play with toys with you and alone but not for long. Once I settle in with you I will try to take your spot on the couch or at worst lean on you while sitting next to you.",
"age": "Adult"
}
]
- Returns a detailed object of a single cats
{
"id": "44",
"shelter_id": "4",
"name": "Lucas",
"image": "/images/cat3.jpeg",
"gender": "Male",
"description": "This sweet but shy boy was brought in from a rural property. He acts a little unsure when he first meets someone, but once he realizes you want to love him he is soon pushing into your hand for attention. He is good with other cats but does not have dog experience. This attractive tuxedo with a black smooch beside his nose needs a forever human.",
"age": "Kitty"
}
- Add one like for a specific cat
{
"isLiked": true,
"user_id": "1",
"cat_id": "22"
}
- Deletes the given like;
{
"user_id": "1",
"cat_id": "22"
}
Requests
- Returns an array of requests objects
[
{
"id": 1,
"name": "Lucas",
"email": "[email protected]",
"status": "Received",
"cat_id": 22,
"user_id": 1
},
{
"id": 2,
"name": "Lucas",
"email": "[email protected]",
"status": "Received",
"cat_id": 1010,
"user_id": 1
}
]
- Post a new cat request
{
"user_id": 1,
"cat_id": 1010,
"name": "Lucas",
"email": "[email protected]"
}
- Delete a sent request by a user
{
"id": 1
}
Users
- Returns an array of users objects
[
{
"id": 13,
"name": "Olivia",
"username": "olivia",
"email": "[email protected]",
"password": "$2b$10$ATmle6b.W3MCz7/qcnO/7.iFj02SkPxLPKqPo9dhswPMdi09F8DYO"
},
{
"id": 14,
"name": "Maria",
"username": "maria",
"email": "[email protected]",
"password": "$2b$10$YZNtJS7NQCC9Ru8zh8FW3eKI9.cFLCdCNxgXcbtX6DhzRo0fVezVe"
}
]
- Returns an object of a single user
{
"id": 13,
"name": "Olivia",
"username": "olivia",
"email": "[email protected]",
"password": "$2b$10$ATmle6b.W3MCz7/qcnO/7.iFj02SkPxLPKqPo9dhswPMdi09F8DYO"
}
- Returns a list of cats liked by a specific user
[
{
"cat_name": "Robson",
"image": "/images/cat0.jpeg",
"user_name": "Olivia",
"id": 57,
"isLiked": 1,
"cat_id": 11,
"user_id": 13
}
]
- Return a list of requests sent by a specific user
[
{
"cat_name": "Robson",
"image": "/images/cat0.jpeg",
"id": 6,
"name": "Olivia",
"email": "[email protected]",
"status": "Received",
"cat_id": 11,
"user_id": 13
}
]
- Create a new login
{
"name": "Test",
"username": "test",
"email": "[email protected]",
"password": "test"
}
Login
- Verify if the user login exist and sign in
{
"message": "Success"
}
- Download this Repository or clone it:
git clone [email protected]:aramatsolrac/meowdopt-API.git
cd
into the new folder and typenpm install
- To run the project type:
npm start
- Linkedin - Tamara Carlos
- Twitter - @aramatsolrac