Changes

Jump to navigation Jump to search
Line 328: Line 328:  
|}
 
|}
   −
==== UI/UX ====
+
==== Likes ====
The User interface and user experience of the site is an essential feature , we have to get this part right as this whole project's target audience is Kids so the UI should be simple yet should be attractive to kids and the user experience should be done in a way such that if kids use the site ,they are comfortable with all the functionality being offered by the site and engage on the site.
+
 
Here are some of my Design Approach  :
  −
<gallery>
  −
File:Moksha_1.png|Landing Page
  −
File:Moksha_2.png|User Profiles
  −
File:Moksha_3.png|Responsive Design
  −
</gallery>
   
   
 
   
I am planning to stage the site on PaaS platform maybe like OpenShift , however there have been certains glitches with my Openshift account but I will try to work it out or consider some other feasible alternative.
+
{| class="wikitable"
I am doing this because with this approach I would be able to get user feedback from community members side by side with my development efforts and hence I can iterate and improve with their feedbacks.
+
|-
 +
! Resource  !! Description
 +
|-
 +
| POST /api/v1/liking/ || Making http post request to this Resource along with the json data with user field containing resource_uri of the currently logged in user and liking_content_type  field contains the URI of requested Project creates a liking Relation between the user and project.
 +
|-
 +
| Example || curl --dump-header - -H "Content-Type:application/json" -X POST --data '{"user":"/api/v1/profile/2/" ,"liked_content_type":"/api/v1/projects/2/" }' http://127.0.0.1:8000/api/v1/liking/?username=vrinda\&api_key=b7c19215d088591e2dee07c2fb4df677ab1c9fbe
 +
|-
 +
| GET /api/v1/liking/ ||  Returns the list of all the liking relationship with their resource id and other liking resource.
 +
|-
 +
| GET /api/v1/liking/<id> ||  {
 +
            "Liked": "undefined",
 +
            "id": 2,
 +
            "liked_content_type": {
 +
                "Likes": 1,
 +
                "comment": [
 +
                    {
 +
                        "entry": "undefined",
 +
                        "resource_uri": "/api/v1/comment/1/",
 +
                        "text": ":P",
 +
                        "user": "vrinda"
 +
                    }
 +
                ],
 +
                "desc": "undefined",
 +
                "history": "project undefined  created by aregee forked by vrinda ",
 +
                "id": 4,
 +
                "resource_uri": "/api/v1/projects/4/",
 +
                "screenshot": "/media/projects/wb3_1.png",
 +
                "shared_date": "2013-09-20T19:09:43.084615",
 +
                "src": "/media/projects/feed__1.py",
 +
                "title": "undefined",
 +
                "user": "vrinda"
 +
            },
 +
            "resource_uri": "/api/v1/liking/2/",
 +
            "shared_date": "2013-09-20T19:09:59.892135",
 +
            "user": "vrinda"
 +
        }
 +
|-
 +
| DELETE /api/v1/liking/<id>/ || Destroys the requested liked relation.
 +
|-
 +
|}
 +
 
 +
 
 +
 
 +
==== Comment Resource ====
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Description  !! Resource
 +
|-
 +
| POST /api/v1/comment/  || This resource creates a new comment resource with the JSON data supplied  to it.Returns 201 response for successfully added comment.
 +
|-
 +
| Example || curl --dump-header - -H "Content-Type:application/json" -X POST --data '{"user":"/api/v1/profile/1/","entry":"/api/v1/projects/2/" , "text":"Comment posted with REST" }' http://127.0.0.1:8000/api/v1/comment/?username=soeone\&api_key=som23h32gh2g3h3g2h3gh2213ftf32f
 +
|-
 +
| GET /api/v1/comment/ || List all the comments along with their related Project Resource.
 +
|-
 +
| GET /api/v1/comment/<id>/ || Filters the Comment resource by their respective ids.
 +
|-
 +
| PATCH /api/v1/comment/<id>/ || Updates the text field in the comment.
 +
|-
 +
| Example || curl --dump-header - -H "Content-Type:application/json" -X PATCH --data '{"text":"Comment POSTed with updated with PATCH" }' http://127.0.0.1:8000/api/v1/comment/1/?username=aregee\&api_key=ytg67asdf76asdf76fdsa767asdf67sadtg
 +
|-
 +
| DELETE /api/v1/comment/<id>/ || Making a delete request to the comment id , deletes the comment from the related resource or Project.
 +
|}
 +
 
 +
 
      Line 355: Line 413:       −
* Top Level View : http://127.0.0.1:8000/api/v1/profile/list/  
+
* Top Level View :curl --dump-header - -H "Content-Type: application/json" -X GET http://moksaya-rahulgaur.rhcloud.com/api/v1/profile/?username=spock\&api_key=d2fe32b15b0b395a5d0e0ea4b7eb1e5d6ea15de7
 +
HTTP/1.1 200 OK
 +
Date: Sat, 21 Sep 2013 01:32:01 GMT
 +
Server: Apache/2.2.15 (Red Hat)
 +
Vary: Accept,Accept-Language,Cookie,Accept-Encoding
 +
X-Frame-Options: SAMEORIGIN
 +
Content-Language: en-us
 +
Cache-Control: no-cache
 +
Content-Type: application/json
 +
Transfer-Encoding: chunked
   −
  {
+
{
 
     "meta": {
 
     "meta": {
         "limit": 20,  
+
         "limit": 20,
         "next": null,  
+
         "next": "/api/v1/profile/?username=spock&api_key=d2fe32b15b0b395a5d0e0ea4b7eb1e5d6ea15de7&limit=20&offset=20",
         "offset": 0,  
+
         "offset": 0,
         "previous": null,  
+
         "previous": null,
         "total_count": 3
+
         "total_count": 26
     },  
+
     },
 
     "objects": [
 
     "objects": [
 
         {
 
         {
             "about_me": "DjangoNaut",  
+
             "about_me": "admin",
             "birth_date": "1991-06-20",  
+
             "followers": [
             "friends": [
+
                "aregee"
                 "testuser",  
+
            ],
                 "SomeDude"
+
            "following": [],
             ],  
+
            "id": 1,
             "gender": 1,  
+
            "language": "en",
             "language": "en",  
+
            "location": "",
             "location": "India",  
+
            "mugshot": null,
             "mugshot": "/media/mugshots/d749832b7a.jpg",  
+
            "privacy": "registered",
             "privacy": "registered",  
+
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/1/",
 +
            "user": "admin"
 +
        },
 +
        {
 +
            "about_me": "Now I can update About_ME",
 +
            "followers": [
 +
                "vrinda",
 +
                "kirk",
 +
                "ned",
 +
                "titiksha",
 +
                "robStark",
 +
                "jarvis",
 +
                "satyamyadav",
 +
                "user101",
 +
                "atif",
 +
                "nikking1793",
 +
                "tch",
 +
                "amigo",
 +
                "aregee__"
 +
            ],
 +
             "following": [
 +
                 "vrinda",
 +
                 "ned",
 +
                "kirk",
 +
                "tch",
 +
                "admin",
 +
                "titiksha",
 +
                "jarvis",
 +
                "monikagupta",
 +
                "satyamyadav",
 +
                "surajgillespie",
 +
                "nikking1793",
 +
                "amigo",
 +
                "raju"
 +
             ],
 +
             "id": 2,
 +
             "language": "en",
 +
             "location": "",
 +
             "mugshot": null,
 +
             "privacy": "registered",
 
             "projects": [
 
             "projects": [
 
                 {
 
                 {
                     "Likes": 3,  
+
                     "Likes": 1,
                     "comment": [
+
                     "comment": [],
                        {
+
                    "desc": "undefined",
                            "entry": "Another story i am covering and i want to test the constrains this time",  
+
                    "history": "",
                            "resource_uri": "",  
+
                     "id": 1,
                            "text": "MAhn this is some awesome shit "
+
                     "resource_uri": "/api/v1/projects/1/",
                        },
+
                     "screenshot": "/media/projects/wb3.png",
                        {
+
                     "shared_date": "2013-09-20T19:07:29.101309",
                            "entry": "Another story i am covering and i want to test the constrains this time",
+
                     "src": "/media/projects/feed_.py",
                            "resource_uri": "",
+
                     "title": "undefined",
                            "text": "cool Man comments are returned in APIs"
+
                    "user": "aregee"
                        }
+
                 },
                    ],  
  −
                     "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,  
+
                     "Likes": 0,
                     "comment": [],  
+
                     "comment": [],
                     "desc": "Wired Hack ",  
+
                     "desc": "undefined",
                     "owner": "aregee",  
+
                     "history": "",
                     "screenshot": "/media/projects/background.png",  
+
                    "id": 2,
                     "shared_date": "2013-06-26T05:59:48.445868",  
+
                    "resource_uri": "/api/v1/projects/2/",
                     "src": "/media/proejcts/startconky.sh",  
+
                     "screenshot": "/media/projects/lin.jpg",
                     "title": "Someting Wong"
+
                     "shared_date": "2013-09-20T19:07:57.861892",
                 },  
+
                     "src": "/media/projects/file_rem.py",
 +
                     "title": "undefined",
 +
                    "user": "aregee"
 +
                 },
 
                 {
 
                 {
                     "Likes": 0,  
+
                     "Likes": 0,
                     "comment": [],  
+
                     "comment": [],
                     "desc": "This is my first hello world code",  
+
                     "desc": "undefined",
                     "owner": "aregee",  
+
                     "history": "",
                     "screenshot": "/media/projects/Screenshot_from_2013-02-03_173238.png",  
+
                    "id": 3,
                     "shared_date": "2013-07-04T19:18:23.307241",  
+
                    "resource_uri": "/api/v1/projects/3/",
                     "src": "/media/proejcts/hello.c",  
+
                     "screenshot": "/media/projects/beautiful_strings.png",
                     "title": "First Project Upload"
+
                     "shared_date": "2013-09-20T19:08:30.575741",
 +
                     "src": "/media/projects/file_rem_1.py",
 +
                     "title": "undefined",
 +
                    "user": "aregee"
 
                 }
 
                 }
             ],  
+
             ],
             "user": "aregee",  
+
             "resource_uri": "/api/v1/profile/2/",
             "website": "http://rahulgaur.info/"
+
             "user": "aregee"
         },  
+
         },
 
         {
 
         {
             "about_me": "Profile BIO",  
+
             "about_me": "Oh not it won't happen :0",
             "birth_date": "2013-06-26",  
+
             "followers": [
             "friends": [
+
                "aregee"
                 "aregee",  
+
            ],
                 "SomeDude"
+
             "following": [
             ],  
+
                 "aregee",
             "gender": 2,  
+
                 "kirk",
             "language": "en",  
+
                "jarvis"
             "location": "Delhi",  
+
             ],
             "mugshot": null,  
+
             "id": 3,
             "privacy": "registered",  
+
             "language": "en",
 +
             "location": "",
 +
             "mugshot": null,
 +
             "privacy": "registered",
 
             "projects": [
 
             "projects": [
 
                 {
 
                 {
                     "Likes": 3,  
+
                     "Likes": 1,
                     "comment": [],  
+
                     "comment": [
                     "desc": "This is my first hello world code",  
+
                        {
                     "owner": "testuser",  
+
                            "entry": "undefined",
                     "screenshot": "/media/projects/Screenshot_from_2013-02-03_173238.png",  
+
                            "resource_uri": "/api/v1/comment/1/",
                     "shared_date": "2013-06-27T15:31:22.560494",  
+
                            "text": ":P",
                     "src": "/media/proejcts/hello.c",  
+
                            "user": "vrinda"
                     "title": "First Project Upload"
+
                        }
                 },  
+
                    ],
 +
                     "desc": "undefined",
 +
                     "history": "project undefined  created by aregee forked by vrinda ",
 +
                    "id": 4,
 +
                    "resource_uri": "/api/v1/projects/4/",
 +
                     "screenshot": "/media/projects/wb3_1.png",
 +
                     "shared_date": "2013-09-20T19:09:43.084615",
 +
                     "src": "/media/projects/feed__1.py",
 +
                     "title": "undefined",
 +
                    "user": "vrinda"
 +
                 },
 
                 {
 
                 {
                     "Likes": 0,  
+
                     "Likes": 0,
                     "comment": [],  
+
                     "comment": [],
                     "desc": "Wired Hack ",  
+
                     "desc": "undefined",
                     "owner": "testuser",  
+
                     "history": "project undefined  created by aregee forked by vrinda ",
                     "screenshot": "/media/projects/background.png",  
+
                    "id": 5,
                     "shared_date": "2013-07-04T19:37:54.184572",  
+
                    "resource_uri": "/api/v1/projects/5/",
                     "src": "/media/proejcts/startconky.sh",  
+
                     "screenshot": "/media/projects/lin_1.jpg",
                     "title": "Someting Wong"
+
                     "shared_date": "2013-09-20T19:22:22.520212",
 +
                     "src": "/media/projects/file_rem_2.py",
 +
                     "title": "undefined",
 +
                    "user": "vrinda"
 
                 }
 
                 }
             ],  
+
             ],
             "user": "testuser",  
+
            "resource_uri": "/api/v1/profile/3/",
             "website": "http://Something.com/"
+
            "user": "vrinda"
         },  
+
        },
 +
        {
 +
            "about_me": "I am SPOCK",
 +
            "followers": [],
 +
            "following": [],
 +
            "id": 4,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/4/",
 +
             "user": "spock"
 +
        },
 +
        {
 +
            "about_me": "Howdy partner, this is kirk's Moksaya Profile",
 +
            "followers": [
 +
                "aregee",
 +
                "vrinda"
 +
            ],
 +
            "following": [
 +
                "aregee"
 +
            ],
 +
            "id": 5,
 +
            "language": "en",
 +
            "location": "",
 +
             "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/5/",
 +
            "user": "kirk"
 +
         },
 
         {
 
         {
             "about_me": "Hello I am a dummy User here and I am doing something very amazing",  
+
             "about_me": "Howdy partner, this is ned's Moksaya Profile",
             "birth_date": "2013-07-02",  
+
            "followers": [
             "friends": [
+
                "aregee"
                 "aregee",  
+
            ],
                 "testuser"
+
            "following": [
             ],  
+
                "aregee"
             "gender": 1,  
+
            ],
             "language": "en",  
+
            "id": 6,
             "location": "India",  
+
            "language": "en",
             "mugshot": "/media/mugshots/0ebb9512eb.jpg",  
+
            "location": "",
             "privacy": "registered",  
+
            "mugshot": null,
             "projects": [],  
+
            "privacy": "registered",
             "user": "SomeDude",  
+
            "projects": [],
             "website": "http://somedude.com/"
+
            "resource_uri": "/api/v1/profile/6/",
         }
+
            "user": "ned"
    ]
+
        },
  }
+
        {
 
+
            "about_me": "sdasd",
* Individual User Profiles could be further requested as http://127.0.0.1:8000/api/v1/profile/list/2/?format=json
+
            "followers": [
  {
+
                "aregee"
    "about_me": "Profile BIO",  
+
            ],
    "birth_date": "2013-06-26",  
+
            "following": [
    "friends": [
+
                "aregee"
         "aregee",  
+
            ],
        "SomeDude"
+
            "id": 7,
    ],  
+
            "language": "en",
    "gender": 2,  
+
            "location": "",
    "language": "en",  
+
            "mugshot": null,
    "location": "Delhi",  
+
            "privacy": "registered",
    "mugshot": null,  
+
            "projects": [],
    "privacy": "registered",  
+
            "resource_uri": "/api/v1/profile/7/",
    "projects": [
+
            "user": "tch"
 +
        },
 +
        {
 +
            "about_me": "I am Titiksha",
 +
             "followers": [
 +
                "aregee"
 +
            ],
 +
             "following": [
 +
                 "aregee"
 +
            ],
 +
            "id": 8,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/8/",
 +
            "user": "titiksha"
 +
        },
 +
        {
 +
            "about_me": "This is Rob Stark , King in the North ;)",
 +
            "followers": [],
 +
            "following": [
 +
                 "aregee"
 +
             ],
 +
             "id": 9,
 +
             "language": "en",
 +
             "location": "",
 +
             "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/9/",
 +
            "user": "robStark"
 +
        },
 +
        {
 +
            "about_me": "Howdy partner, this is mronetwo's Moksaya Profile",
 +
            "followers": [],
 +
            "following": [],
 +
            "id": 10,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
             "privacy": "registered",
 +
             "projects": [],
 +
            "resource_uri": "/api/v1/profile/10/",
 +
             "user": "mronetwo"
 +
        },
 +
        {
 +
             "about_me": "Howdy partner, this is monikagupta's Moksaya Profile",
 +
            "followers": [
 +
                "aregee"
 +
            ],
 +
            "following": [],
 +
            "id": 11,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/11/",
 +
            "user": "monikagupta"
 +
         },
 +
        {
 +
            "about_me": "Howdy partner, this is jarvis's Moksaya Profile",
 +
            "followers": [
 +
                "aregee",
 +
                "vrinda"
 +
            ],
 +
            "following": [
 +
                "aregee"
 +
            ],
 +
            "id": 12,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/12/",
 +
            "user": "jarvis"
 +
        },
 +
        {
 +
            "about_me": "Howdy partner, this is satyamyadav's Moksaya Profile",
 +
            "followers": [
 +
                "aregee"
 +
            ],
 +
            "following": [
 +
                "aregee"
 +
            ],
 +
            "id": 13,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/13/",
 +
            "user": "satyamyadav"
 +
        },
 +
        {
 +
            "about_me": "Hello , I am user1010 and I code :)",
 +
            "followers": [],
 +
            "following": [
 +
                "aregee"
 +
            ],
 +
            "id": 14,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/14/",
 +
            "user": "user101"
 +
        },
 +
        {
 +
            "about_me": "Howdy atif , this is your  Moksaya Profile",
 +
            "followers": [],
 +
            "following": [
 +
                "aregee"
 +
            ],
 +
            "id": 15,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/15/",
 +
            "user": "atif"
 +
        },
 +
        {
 +
            "about_me": "Howdy surajgillespie , this is your  Moksaya Profile",
 +
            "followers": [
 +
                "aregee"
 +
            ],
 +
            "following": [],
 +
            "id": 16,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/16/",
 +
            "user": "surajgillespie"
 +
        },
 +
        {
 +
            "about_me": "Howdy partner, this is moksaya_user's Moksaya Profile",
 +
            "followers": [],
 +
            "following": [],
 +
            "id": 17,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/17/",
 +
            "user": "moksaya_user"
 +
         },
 +
        {
 +
            "about_me": "Howdy nikking1793 , this is your  Moksaya Profile",
 +
            "followers": [
 +
                "aregee",
 +
                "user102"
 +
            ],
 +
            "following": [
 +
                "aregee"
 +
            ],
 +
            "id": 18,
 +
            "language": "en",
 +
            "location": "",
 +
            "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
            "resource_uri": "/api/v1/profile/18/",
 +
            "user": "nikking1793"
 +
        },
 
         {
 
         {
             "Likes": 3,  
+
             "about_me": "Howdy Ayushletsrock , this is your  Moksaya Profile",
             "comment": [],  
+
             "followers": [
             "desc": "This is my first hello world code",  
+
                "user102"
             "owner": "testuser",  
+
            ],
             "screenshot": "/media/projects/Screenshot_from_2013-02-03_173238.png",  
+
             "following": [],
             "shared_date": "2013-06-27T15:31:22.560494",  
+
            "id": 20,
             "src": "/media/proejcts/hello.c",  
+
             "language": "en",
             "title": "First Project Upload"
+
             "location": "",
         },  
+
             "mugshot": null,
 +
            "privacy": "registered",
 +
            "projects": [],
 +
             "resource_uri": "/api/v1/profile/20/",
 +
             "user": "Ayushletsrock"
 +
         },
 
         {
 
         {
             "Likes": 0,  
+
             "about_me": "Howdy gonzalo , this is your  Moksaya Profile",
             "comment": [],  
+
             "followers": [],
             "desc": "Wired Hack ",  
+
             "following": [],
             "owner": "testuser",  
+
            "id": 21,
             "screenshot": "/media/projects/background.png",  
+
             "language": "en",
             "shared_date": "2013-07-04T19:37:54.184572",  
+
             "location": "",
             "src": "/media/proejcts/startconky.sh",  
+
             "mugshot": null,
             "title": "Someting Wong"
+
            "privacy": "registered",
 +
            "projects": [],
 +
             "resource_uri": "/api/v1/profile/21/",
 +
             "user": "gonzalo"
 
         }
 
         }
     ],
+
     ]
    "user": "testuser",
+
}
    "website": "http://Something.com/"
  −
  }
      
* Related Resource Projects here can be accessed by http://127.0.0.1:8000/api/v1/projects/?format=json  
 
* Related Resource Projects here can be accessed by http://127.0.0.1:8000/api/v1/projects/?format=json  
25

edits

Navigation menu