76 lines
1.8 KiB
Plaintext
76 lines
1.8 KiB
Plaintext
API
|
|
kaufen
|
|
produkte
|
|
auflisten
|
|
alle, nach gruppe
|
|
produktgruppen auflisten
|
|
suchen nach namen
|
|
hasDeposit falls kein attribut
|
|
beliebteste produkte (allgemein, nur vom user)
|
|
kaufen eines items (mit oder ohne deposit)
|
|
pfand zurückgeben
|
|
letzte einkäufe
|
|
|
|
|
|
transaction
|
|
auflisten zahlarten (bar, ueberweisung, ...)
|
|
einzahlen
|
|
auszahlen
|
|
letzte einzahlungen
|
|
|
|
api auth stuff
|
|
if plugin identifies by authblob
|
|
getUsersByAuthBlob (oderso)
|
|
else
|
|
authenticateUser(user, authblob)
|
|
listAuthBlobs (fuer alle user, die das plugin erlaubt haben)
|
|
canSuAsUser (noch ordentlich zu benennen)
|
|
|
|
|
|
|
|
cool wäre:
|
|
irgendwann letzte Änderung der produktliste speichern
|
|
|
|
=== REST LIKE API STARTS HERE ===
|
|
|
|
buyable/
|
|
item/<itemId>
|
|
GET (=list)
|
|
""" get a specific item or a full (group) item list """
|
|
group item belonging to group
|
|
POST (=buy)
|
|
""" buy an item"
|
|
deposit Set to > 0 if you want to buy with deposit (default 0)
|
|
amount amount of items to buy (default 1)
|
|
types/
|
|
GET (=list)
|
|
""" list all types (groups) which an item can belong to """
|
|
|
|
account/
|
|
transactions/ or transfers/
|
|
transact/ or transfer/ # sollte eigentlich transfer heißen imo
|
|
GET (=list)
|
|
""" list your transactions """
|
|
num list $num entries
|
|
POST (=pay)
|
|
""" actually transact money """
|
|
amount [REQ] amount to add to your account
|
|
type [REQ] type of transaction (id)
|
|
types/
|
|
GET (=list)
|
|
""" list all available transaction types"
|
|
balance/
|
|
GET (=show)
|
|
""" return current account balance """
|
|
auth/
|
|
blob/
|
|
GET (=get)
|
|
""" return authblob if allowed or auth if str given """
|
|
blob blob to get user from / auth user with, returns User or NULL
|
|
POST
|
|
""" set authblob if allowed """
|
|
|
|
|
|
|
|
wget -qS -O- --auth-no-challenge --http-user=seba --http-password=foobar23 http://devcat.someserver.de:13805/api2/buyable/item/foo
|