Coder Social home page Coder Social logo

gerry-aballa / pickup-lines-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 15 KB

An API endpoint that returns a random pickup line - Built in FastAPI and deployed in aws EC2

Python 100.00%
fastapi pcycopg2 python3 sqlalchemy uvicron aws aws-ec2

pickup-lines-api's Introduction

An API that returns a random pickup line

Test this API

Introduction

Welcome to the Random Lines API! This API allows you to retrieve random lines of text for various purposes. It's a simple and straightforward service that you can use in your applications or scripts.

Base URL

The base URL for the API is:

http://ec2-3-7-73-121.ap-south-1.compute.amazonaws.com:8000

Endpoint

To get a random pickup line make a GET request to the following endpoint:

/lines/random

Usage

Making a Request

You can use any HTTP client library or tool to make a GET request to the API endpoint. Here's an example using curl in the command line:

curl http://ec2-3-7-73-121.ap-south-1.compute.amazonaws.com:8000/lines/random

Response

The API will respond with a JSON object containing the random line of text. An example response looks like this:

{
  "mood": "Flirty",
  "pickupline": "Did you invent the airplane? Because you are clearly Mr. Wright.",
  "id": 107
}

Error Handling

If there is an issue with your request, the API will respond with an error message in JSON format. For example:

{
  "detail": "No pickuplines found."
}

Rate Limiting

Please note that this API may have rate limiting in place to prevent abuse. If you encounter rate limiting, you may need to wait for some time before making additional requests.

Conclusion

That's it! You now know how to use the Random Lines API. Feel free to integrate it into your projects, applications, or scripts as needed and add it to the list below at will.

pickup-lines-api's People

Contributors

gerry-aballa avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.