Skip to content

Commit

Permalink
README: Add endpoint documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
otsembo committed Mar 21, 2023
1 parent ae05fae commit e592000
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ This section will describe the schema definitions for our database.
- This section describes all the API endpoints including their expected request and response objects.


1. `/projects` - List all projects submitted.
1. `/guest/projects` - List all accepted submissions.

```{json}
--------------
@METHOD => GET
--------------
---------------
@AUTH => Bearer
@AUTH => None
---------------
----------------
Expand All @@ -184,6 +184,42 @@ This section will describe the schema definitions for our database.
}],
"message": "SUCCESS"
}
-----------------
```
2. `/guest/projects/search/:query` - Search for accepted submissions that have their titles or description match the `:query` path parameter.

```{json}
--------------
@METHOD => GET
--------------
---------------
@AUTH => None
---------------
----------------
@REQUEST => None
----------------
-----------------
@RESPONSE => JSON
{
"data": [
{
"id": 2,
"title": "The force",
"category": "Fin-tech",
"description": "The force is here.",
"repository_link": "https://github.com/sinatra-pod/the-force",
"banner_image": "https://calebbii.io/banner.png",
"tech_stacks": "React, Ruby, Typscript",
"license": "https://github.com/lisence-moringahub"
"status": "CREATED"
}],
"message": "SUCCESS"
}
-----------------
```

0 comments on commit e592000

Please sign in to comment.