У меня есть что-то вроде этого ....
Книги:
У меня есть программа php, которая принимает только пост-запросы ..., ссылка примерно такая:
http://www.mydomain.com/books.php
Если пользователь хочет сделать запрос, ему нужно сделать что-то вроде этого:
Создайте:
Титулы:
a=c //a = action
d=a array of dataJson //d = a defined books data in Json format
u=user id
s=session key
и я вернусь:
0 / !0 //0 = success case, !0 will give the error code
массив идентификаторов // новые создаваемые элементы
идентификатор массива
Читайте:
Титулы:
a=r //a = action
id=the books id (optional) //read the books from book id
title= a books title (optional) //read the books from title
author= an author (optional) //read the books from author
u=user id
s=session key
// если нет дополнительных параметров, вернуть все книги.
и я вернусь:
0 / !0 //0 = success case, !0 will give the error code
arrayOfBooks //books in array in Json format
Обновление:
Титулы:
a=u //a = action
id=the books id //update the books from book id
d=a dataJson //d = a defined books data in Json format
u=user id
s=session key
и я вернусь:
0 / !0 //0 = success case, !0 will give the error code
Удалить:
Титулы:
a=d //a = action
id=the books id //delete the books from book id
u=user id
s=session key
и я вернусь:
0 / !0 //0 = success case, !0 will give the error code
Это нормально для моего текущего дизайна, чтобы перейти на "ОТДЫХ"? Спасибо.