Week 4-Side Hustle Python Team 2 - URL Shortner API project:
The team is made up of " Adesegun, Taiwo, Godfrey, and Cheerilyngz.

Week 4-Side Hustle Python Team 2 - URL Shortner API project: The team is made up of " Adesegun, Taiwo, Godfrey, and Cheerilyngz.

Week 4 started quietly, underestimating the week's task. The task: "- You'll be working as a team with the existing grouping!

  • You are to build a functional URL shortener
  • BE Devs to build API for the shortener
  • This project must go live by the weekend! Let's launch something guys!"

AdesTextegun, (the most experienced) helped with building this URL shortener.

The following are the Endpoints;

  1. Shortener API ListView - 127.0.0.1:8000/api

  2. Shortener API CreateView - 127.0.0.1:8000/api/create

3.Swagger Graphical View - 127.0.0.1:8000/swagger Redoc Documentation - 127.0.0.1:8000/redoc Redirecting from the Shortened Link back to the Original Link - 127.0.0.1:8000/shortened_link"/

This URL Shortener can be upgraded to generate only unique shortened links for one original link It can also be upgraded to request users to register and login before using the URL Shortner

Please note that the serialization file is named serializer.py and NOT serializers.py as is the practice with most Developers

Url Shortener API Url Shortener API with Django Rest Framework.

The project consists to allow a user to transform a long web URL into a pattern-consistent (encoded) small URL easy to share and remember.

At the same time, the user is allowed to transform back (decode) the shortened URL into the original URL

It is partly tested and was developed as a showcase only.

How Url Shortener API Works:

You can send (POST) a full URL and retrieve a small encoded one with http://127.0.0.1:8000 as the base web service URL.

Eg. POST localhost:8000/api/create with github.com/AdesegunAdesolaADEBOYE/Week4UrlS.. result: 127.0.0.1:8000/ztjFCR (6 digits id)

You can get the original URL with the encoded URL on a GET request (done in the previous step)

Eg. GET 127.0.0.1:8000/ztjFCR result: github.com/AdesegunAdesolaADEBOYE/Week4UrlS..

Index: Installation Installing Django API App Usage: Available Endpoints

Installation: 1. Installing Django API App Clone repository and go inside the repository folder "URL-shortener-API" git clone github.com/AdesegunAdesolaADEBOYE/Week4UrlS.. Create your virtualenv and install the packages pip install -r requirements.txt Initialize database and create the database mapping used for persistence in the URL shortener API. python manage.py makemigrations Apply the database mapping from the app to the database; migrate the database. python manage.py migrate Run the application. python manage.py runserver

USAGE

Endpoint List URI Example: localhost:8000/api Available Methods URI Example URL Project Endpoints

POST shorten-url/ localhost:8000/api/create GET / localhost:8000/api