Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/0.1.1 release #3

Merged
merged 4 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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