Skip to content

Instantly share code, notes, and snippets.

@sukhbir-singh
Created March 15, 2018 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sukhbir-singh/bf4c42454c842a081892c69456de16bc to your computer and use it in GitHub Desktop.
Save sukhbir-singh/bf4c42454c842a081892c69456de16bc to your computer and use it in GitHub Desktop.
Gsoc Proposal PublicLabs
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