You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k4ever/devel/api

87 lines
2.2 KiB

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
TODO
write loader for url-encoded POST data
write "bash" output format
=== 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 """
user/
GET (=get)
""" get user by authblob string - this function works only when plugin
has unique authblobs """
authblob [REQ] authblob to sear
config/
GET (=get)
""" Display site configuration vars (as in mediaurl) """
wget -qS -O- --auth-no-challenge --http-user=seba --http-password=foobar23 http://devcat.someserver.de:13805/api2/buyable/item/foo