Skip to content

An api I once created that would provide an API to create and view cards using JSON and provide a dashboard to view the created cards.

Notifications You must be signed in to change notification settings

devabuse/cards_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cards API

The idea is someone wants to send someone else a card and would then subscribe to have a card send with a personal message. I created the backend application of storing these subscriptions and providing an admin backend for our client. The client would create a card with the provided personal message and send it, this was provided as a free service over cristmas and has since been taken offline. The backend part is provided as is and still functions. I am certain it can be adapted as base for other forms of APIs, as in my opinion it is a solid base created using Silex

The frontend application for the API is no longer available. The backend API was created early in 2014, it still used PSR-0 :D and I may been slacking a bit on the commenting here and there.

Installation

Create a copy of default.settings.local.php in the config directory and provide your database credentials and admin password in sha256 (defaults to test) From your terminal run: php console.php doctrine:schema:load to import the database schema

Usage

Creating cards

curl -H "Content-Type: application/json" -X POST -d '{ "receiver": { "name": "Mike", "email": "[email protected]" }, "sender": { "name": "Erik", "email": "[email protected]" }, "message" : "You are awesome!" }' cards.dev/api/card

In your case the url used might differ from cards.dev/api/card

Viewing cards In your browser go to cards.dev/api/card/hash (base url might differ in your case)

Admin panel

  • cards.dev/login
  • login with credentials (defaults to: admin and password: test)
  • View dashboard of cards

About

An api I once created that would provide an API to create and view cards using JSON and provide a dashboard to view the created cards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published