|
|
| Line 844: |
Line 844: |
| } | | } |
| ] | | ] |
| }
| |
|
| |
| * Related Resource Projects here can be accessed by http://127.0.0.1:8000/api/v1/projects/?format=json
| |
| {
| |
| "meta": {
| |
| "limit": 20,
| |
| "next": null,
| |
| "offset": 0,
| |
| "previous": null,
| |
| "total_count": 5
| |
| },
| |
| "objects": [
| |
| {
| |
| "Likes": 3,
| |
| "comment": [
| |
| {
| |
| "entry": "Another story i am covering and i want to test the constrains this time",
| |
| "resource_uri": "",
| |
| "text": "MAhn this is some awesome shit "
| |
| },
| |
| {
| |
| "entry": "Another story i am covering and i want to test the constrains this time",
| |
| "resource_uri": "",
| |
| "text": "cool Man comments are returned in APIs"
| |
| }
| |
| ],
| |
| "desc": "here is another hack by me and I am doing this right now",
| |
| "owner": "aregee",
| |
| "screenshot": "/media/projects/Screenshot_from_2013-01-21_030756.png",
| |
| "shared_date": "2013-06-25T18:48:18.205760",
| |
| "src": "/media/proejcts/admin.py",
| |
| "title": "Another story i am covering and i want to test the constrains this time"
| |
| },
| |
| {
| |
| "Likes": 1,
| |
| "comment": [],
| |
| "desc": "Wired Hack ",
| |
| "owner": "aregee",
| |
| "screenshot": "/media/projects/background.png",
| |
| "shared_date": "2013-06-26T05:59:48.445868",
| |
| "src": "/media/proejcts/startconky.sh",
| |
| "title": "Someting Wong"
| |
| },
| |
| {
| |
| "Likes": 3,
| |
| "comment": [],
| |
| "desc": "This is my first hello world code",
| |
| "owner": "testuser",
| |
| "screenshot": "/media/projects/Screenshot_from_2013-02-03_173238.png",
| |
| "shared_date": "2013-06-27T15:31:22.560494",
| |
| "src": "/media/proejcts/hello.c",
| |
| "title": "First Project Upload"
| |
| },
| |
| {
| |
| "Likes": 0,
| |
| "comment": [],
| |
| "desc": "This is my first hello world code",
| |
| "owner": "aregee",
| |
| "screenshot": "/media/projects/Screenshot_from_2013-02-03_173238.png",
| |
| "shared_date": "2013-07-04T19:18:23.307241",
| |
| "src": "/media/proejcts/hello.c",
| |
| "title": "First Project Upload"
| |
| },
| |
| {
| |
| "Likes": 0,
| |
| "comment": [],
| |
| "desc": "Wired Hack ",
| |
| "owner": "testuser",
| |
| "screenshot": "/media/projects/background.png",
| |
| "shared_date": "2013-07-04T19:37:54.184572",
| |
| "src": "/media/proejcts/startconky.sh",
| |
| "title": "Someting Wong"
| |
| }
| |
| ]
| |
| }
| |
|
| |
| In the above results I have excluded Project ids from the json Response, but similarly each individual project could be accessed and updated by making GET or Post or Put request to http://127.0.0.1:8000/api/v1/projects/<pk>?format=json
| |
|
| |
| * Accessing particular project http://127.0.0.1:8000/api/v1/projects/2/?format=json
| |
|
| |
| {
| |
| "Likes": 1,
| |
| "comment": [],
| |
| "desc": "Wired Hack ",
| |
| "owner": "aregee",
| |
| "screenshot": "/media/projects/background.png",
| |
| "shared_date": "2013-06-26T05:59:48.445868",
| |
| "src": "/media/proejcts/startconky.sh",
| |
| "title": "Someting Wong"
| |
| }
| |
|
| |
|
| ==Forking== | | ==Forking== |