Skip to content

Commit

Permalink
Merge pull request #3 from aybruhm/feat/0.1.1-release
Browse files Browse the repository at this point in the history
Feat/0.1.1 release
  • Loading branch information
aybruhm authored Jun 28, 2023
2 parents d9827dc + eae2420 commit 6ba4abe
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 43 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,10 @@ Change Log
- Modified test cases
- Renamed package name, changed description and url
- Modified README documentation
- Bump version to 0.1
- Bump version to 0.1

0.1.1 (28/06/2023)
--------------------
- Modified README documentation
- Bump version to 0.1.1
- Changed home page url
75 changes: 38 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pip install rest-api-response
2). In the file (.py) that you wish to use it, import it:

```python
from rest_api_response import success_response, error_response
from rest_api_response import success_response, error_response
```

That's pretty much it - you can now call the function and pass the required arguments!
Expand All @@ -41,23 +41,23 @@ class PostListAPIView(views.APIView):
The API response would be:

```json
[
{
"title": "First blog post",
"content": "Lorem ipsume content",
"author": 1
},
{
"title": "Second blog post",
"content": "Lorem ipsume content",
"author": 2
},
{
"title": "Third blog post",
"content": "Lorem ipsume content",
"author": 3
}
]
[
{
"title": "First blog post",
"content": "Lorem ipsume content",
"author": 1
},
{
"title": "Second blog post",
"content": "Lorem ipsume content",
"author": 2
},
{
"title": "Third blog post",
"content": "Lorem ipsume content",
"author": 3
}
]
```

This works too, but let's take the response to the next level by doing this:
Expand Down Expand Up @@ -86,26 +86,27 @@ class PostListAPIView(views.APIView):
The API response would be:

```json
[ "status": true,
"message": "Posts retrieved!",
"data": [
{
"title": "First blog post",
"content": "Lorem ipsume content",
"author": 1
},
{
"title": "Second blog post",
"content": "Lorem ipsume content",
"author": 2
},
{
"title": "Third blog post",
"content": "Lorem ipsume content",
"author": 3
}
]
[
"status": true,
"message": "Posts retrieved!",
"data": [
{
"title": "First blog post",
"content": "Lorem ipsume content",
"author": 1
},
{
"title": "Second blog post",
"content": "Lorem ipsume content",
"author": 2
},
{
"title": "Third blog post",
"content": "Lorem ipsume content",
"author": 3
}
]
]
```

And that's it. You have a nicely catchy response. :-)
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[metadata]
name = rest-api-response
version = 0.1
version = 0.1.1
author = Abram
author_email = israelvictory87@gmail.com
description = A go-to production API response with an easy format for building APIs with Python.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/israelabraham/api-response
url = https://github.com/aybruhm/api-response
project_urls =
Bug Tracker = https://github.com/israelabraham/api-response/issues
Bug Tracker = https://github.com/aybruhm/api-response/issues
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Education
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

setup(
name="rest_api_response",
version="0.1",
version="0.1.1",
description="A go-to production API response with an easy format for building APIs with Python.", # noqa: E501
long_description_content_type="text/markdown",
long_description=open("README.md").read(),
url="https://github.com/israelabraham/api-response",
url="https://github.com/aybruhm/api-response",
author="Abram",
author_email="israelvictory87@gmail.com",
license="MIT",
Expand Down

0 comments on commit 6ba4abe

Please sign in to comment.