Giter VIP home page Giter VIP logo

therealsaitama / txt-to-qr-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.97 MB

This repository contains a simple API written in Go that generates QR codes from text input. It provides an HTTP endpoint where you can send a text parameter, and the API will return a QR code image encoded with the provided text. The QR code can be used for various purposes, such as sharing URLs or storing information.

License: MIT License

Go 100.00%

txt-to-qr-api's Introduction

Text-to-QR-Code Generator API

This API allows you to generate QR codes from text input. It provides a simple HTTP endpoint where you can send a text parameter, and the API will return a QR code image encoded with the provided text.

Usage

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/your-repo.git
    
    Install the required dependencies:
go mod download

2. Starting The API

1. Navigate to the project directory:
```shell
cd your-repo

2. Run the following command to start the API-server 
```shell
go run main.go
This will start server on "http://localhost:8080"

API Endpoint

The API provides a single endpoint for generating QR codes.
  POST /generate: Generates a QR code from the provided text. The text should be sent as a parameter in the request.

Example

You can use cURL to test the API endpoint:
curl -X POST -d "text=Hello World" http://localhost:8080/generate
The API will respond with the generated QR code image.
Dependencies

This API uses the following dependencies:

  github.com/skip2/go-qrcode: A Go package for generating QR codes.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request. Ensure that you follow the existing code style and maintain appropriate documentation.

License

This project is licensed under the MIT License.

txt-to-qr-api's People

Contributors

therealsaitama 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.