An API that serves data to a JavaScript front-end.
- Spring Boot
- PostgreSQL
- Git
- Spring Data JPA
- JUnit/Mockito
- Docker
- Endpoint:
http://localhost:9001/api/v1/search/schools?offset=0&pageSize=10
curl --location --request GET 'http://localhost:9001/api/v1/search/schools?offset=0&pageSize=10' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJmb3J0dW5lbndhY2h1a3d1QGdtYWlsLmNvbSIsImV4cCI6MTY2NDY1NzcxMywiaWF0IjoxNjY0NjU1OTEzfQ.n-GSwjoD9mPKLXFEZ7-3mz2t7G1M5dN3NpVVbmZzHb3pjJotU42WnK8ZqFj17uQOcN4a_7uX0ZH4E43N1waa7Q' \
--data-raw ''
{
"message": "success",
"status": true,
"timeCreated": "2022-10-01T21:29:56.69358",
"data": [
{
"schoolName": "Federal Government College Enugu"
},
{
"schoolName": "GOF International College"
},
{
"schoolName": "Homaj International Secondary School"
},
{
"schoolName": "Emmanuel International College"
},
{
"schoolName": "Brookstone Secondary School"
},
{
"schoolName": "British International School Lagos"
},
{
"schoolName": "Effective International College"
},
{
"schoolName": "Pearlville School"
},
{
"schoolName": "King's College Lagos"
}
]
}
- Endpoint:
http://localhost:9001/api/v1/teacher/register
curl --location --request POST 'http://localhost:9001/api/v1/register/teacher' \
--form 'file=@"/Users/decagon/Downloads/coverPhoto2.jpeg"' \
--form 'registration="{
\"name\":\"Fortunate\",
\"email\":\"[email protected]\",
\"password\":\"1234\",
\"school\" : \"Pearlville School\",
\"yearsOfTeaching\":\"3\",
\"subjectTaught\":\"English\",
\"schoolType\":\"Primary\",
\"phoneNumber\":\"07034999322\",
\"position\":\"HeadTeacher\",
\"status\":\"Active\",
\"about\":\"I am a teacher\"
}";type=application/json'
{
"message": "Registered Successfully",
"status": true,
"timeCreated": "2022-10-01T21:14:00.437287",
"data": {
"name": "Kehinde",
"email": "[email protected]",
"id": 5
}
}
{
"message": "Email Verified Successfully",
"status": true,
"timeCreated": "2022-10-01T21:15:33.796355",
"data": {
"name": "Fortunate",
"email": "[email protected]"
}
}
- Endpoint:
http://localhost:9001/api/v1/teacher/login
curl --location --request POST 'http://localhost:9001/api/v1/login/teacher' \
--header 'Content-Type: application/json' \
--data-raw '{
"email" : "[email protected]",
"password" : "1234"
}'
{
"message": "Login Successful",
"status": true,
"timeCreated": "2022-10-01T21:25:14.129381",
"data": {
"token": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJmb3J0dW5lbndhY2h1a3d1QGdtYWlsLmNvbSIsImV4cCI6MTY2NDY1NzcxMywiaWF0IjoxNjY0NjU1OTEzfQ.n-GSwjoD9mPKLXFEZ7-3mz2t7G1M5dN3NpVVbmZzHb3pjJotU42WnK8ZqFj17uQOcN4a_7uX0ZH4E43N1waa7Q"
}
}
- Endpoint:
http://localhost:9001/api/v1/wallet/teacher/balance
curl --location --request GET 'http://localhost:9001/api/v1/wallet/teacher/balance' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJmb3J0dW5lbndhY2h1a3d1QGdtYWlsLmNvbSIsImV4cCI6MTY2NDY1NzcxMywiaWF0IjoxNjY0NjU1OTEzfQ.n-GSwjoD9mPKLXFEZ7-3mz2t7G1M5dN3NpVVbmZzHb3pjJotU42WnK8ZqFj17uQOcN4a_7uX0ZH4E43N1waa7Q'
{
"message": "success",
"status": true,
"timeCreated": "2022-10-01T21:31:04.374066",
"data": {
"balance": 0.00
}
}
- Endpoint:
http://localhost:9001/api/v1/student/sendReward
curl --location --request Post 'http://localhost:9001/api/v1/student/sendReward' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJmb3J0dW5lbndhY2h1a3d1QGdtYWlsLmNvbSIsImV4cCI6MTY2NDY1NzcxMywiaWF0IjoxNjY0NjU1OTEzfQ.n-GSwjoD9mPKLXFEZ7-3mz2t7G1M5dN3NpVVbmZzHb3pjJotU42WnK8ZqFj17uQOcN4a_7uX0ZH4E43N1waa7Q'
{
"message": "success",
"status": true,
"timeCreated": "2022-10-01T21:31:04.374066",
"data": {
"message": "payment sent successfully"
}
}