Coder Social home page Coder Social logo

paste-api's Introduction

Paste-API

Simple API for https://github.com/ambozz/Paste

Install

Same Directory as Pasting Site

  1. Download api.php to your Webserver.
  2. Done.

Different Directory as Pasting Site

  1. Download Source Code to your Webserver.
  2. Edit config.php to fill in your Database Configuration.
  3. Done.

Documentation

Create Paste

Example Request:

GET api.php?action=create&content=test

Example Response:

{"error":false,"id":"62a5439ac5917"}

Get Paste

Example Request:

GET api.php?action=get&id=62a5439ac5917

Example Response:

{"error":false,"content":"test","create_time":1654997914}

Error Messages

General

  • ACTION_UNDEFINED: No action GET Parameter set.
  • ACTION_INVALID: action GET Parameter does not contain a valid action.

Create Paste

  • CONTENT_UNDEFINED: No content GET Parameter set.
  • CONTENT_EMPTY: content GET Parameter is empty.
  • CREATE_FAILED: Failed to insert paste into database.

Get Paste

  • ID_UNDEFINED: No id GET Parameter set.
  • ID_EMPTY: id GET Parameter is empty.
  • PASTE_NOT_FOUND: A paste with that id does not exist.

paste-api's People

Contributors

ambozz avatar

Stargazers

 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.