This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
su27 (author)
Wed Mar 11 20:33:54 -0700 2009
gae-dj /
| name | age | message | |
|---|---|---|---|
| |
Makefile | Sat Dec 20 09:23:04 -0800 2008 | |
| |
README | Fri Dec 26 21:30:08 -0800 2008 | |
| |
app.yaml | Wed Dec 17 04:22:36 -0800 2008 | |
| |
doc.py | Wed Mar 11 20:33:54 -0700 2009 | |
| |
index.yaml | Wed Dec 17 04:22:36 -0800 2008 | |
| |
main.py | Wed Mar 11 20:33:54 -0700 2009 | |
| |
simplejson/ | Wed Dec 17 04:22:36 -0800 2008 | |
| |
static/ | Fri Dec 26 21:30:08 -0800 2008 |
README
GAE-DJ implemented a RESTful api for GAE database writing/reading and also for other GAE funny things like url fetching. It's designed particularly for cross-domain javascript access. check /static/*.html as demos. author:damn.su@gmail.com ========database api======= create(must login) or modify(must be creator) model: get /model/[MODEL_NAME]?[PARAS] PARAS can be: keys=key1,key2,key3,... (required) canread=[all(default)|author|owner] canwrite=[all(default)|author|owner] canedit=[all|author(default)|owner] insert record: get/post /post/[MODEL_NAME]?data={JSON} modify record: get/post /modify/[MODEL_NAME]?data={JSON} view record(s): get /view/[MODEL_NAME]/[KEY]/[VALUE]?op=[eq(default)|gt|lt|in] example: get /view/mm/marks/S' get /view/mm/marks/B_C_D?op=in' delete record: get /delete/[MODEL_NAME]/[ID] ========fetch url=========== get/post /fetch?data={JSON} data is: url: (required) method: GET|POST|PUT|DELETE|HEAD fields: {"key":"value"} (for POST/PUT) headers:{'Content-Type': 'application/x-www-form-urlencoded'} decode: GBK|... response: {'content':result.content, 'truncated':result.content_was_truncated, 'status_code':result.status_code} =======user profile========== get /profile response:{"loginurl":"localhost:8080", "user":"test@example.com"} ********************how to use js client****************** just check /static/*.html as demos! <script type="text/javascript" src="/static/gae-dj.js"></script> var dj = new Gaedj(); dj.send('model/mm?keys=name,height',function(r){ alert('try to make a model:'+r.success) }); dj.send('fetch?data={"url":"http://g.cn/","decode":"gbk"}',function(r){ $('#con').html(r.content) })







