Created
March 15, 2018 21:44
-
-
Save sukhbir-singh/bf4c42454c842a081892c69456de16bc to your computer and use it in GitHub Desktop.
Gsoc Proposal PublicLabs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Route to get list of recent community activities | |
GET- /recent_activities | |
Sample success response: | |
{ | |
"success":true, | |
"trending_topics":["spectrometer", "event", "infragram"], | |
"activities": [ | |
{ | |
type: "comment", | |
author: "username" | |
}, | |
{ | |
type: "wiki", | |
author: "username" | |
} | |
] | |
} | |
2. Route to get list of user’s subscriptions | |
GET- /user/subscriptions | |
Sample success response: | |
{ | |
"success":true, | |
"tags": [ | |
{ | |
"name":"gsoc", | |
"other_people":11 | |
}, | |
{ | |
"name":"rgsoc", | |
"other_people":5 | |
}, | |
{ | |
"name":"publiclabs", | |
"other_people":3 | |
} | |
] | |
} | |
3. Route to update profile information | |
POST- /user/update_profile | |
Parameter required: email(string), password(string), bio(string), profile_pic_url(string) | |
Sample response for success: | |
{ | |
success: true | |
} | |
4. Route to follow/subscribe or unfollow/unsubscribe a tag | |
POST- /user/subscribe | |
Parameters required: access_token: "kj32j4bhbh2b3k2", tag: "question:pi-camera" | |
Sample response for success for subscription: | |
{ | |
"success": true, | |
"message": "subscribed successfully to tag 'question:pi-camera' " | |
} | |
Sample response for success for unsubscribe: | |
{ | |
"success": true, | |
"message": "unsubscribed successfully to tag 'question:pi-camera' " | |
} | |
5. Route to star/like a question | |
PUT- /user/question/:question_id/ | |
Required: access_token: "kj32j4bhbh2b3k2" | |
Sample response for like a question: | |
{ | |
"success": true, | |
"message": "question liked successfully" | |
} | |
Sample response for remove like from a question: | |
{ | |
"success": true, | |
"message": "question liked removed successfully" | |
} | |
6. Route to get list of recent questions | |
GET- /recent_questions | |
Sample response for success: | |
{ | |
"success": true, | |
"questions":[ | |
{ | |
"author":"stella", | |
"question_text":"Lego Spectrometer suitable for studying sunlight?", | |
"time":"2 months ago" | |
}, | |
{ | |
"author":"ibanina", | |
"question_text":"normal or noIR camera?", | |
"time":"28 days ago" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment