pierresaid / soen487-resoluteleopards Goto Github PK
View Code? Open in Web Editor NEWMicro-services Application in VueJs and Flask
Micro-services Application in VueJs and Flask
route : /post/<post_id>
The route should return an error if the caller is not the author of the post
The api should return only images
/posts?page=1&posts_per_page=10&userid=42
This route should return posts_per_page
number of posts with an offset of page * posts_per_page
params | description |
---|---|
page | the pagination number |
posts_per_page | number of posts per pages |
userid | id of the user to use for user_vote in response |
[
{
"id": "1",
"title": "Wich one is nicer ?",
"url_one": "https://cat.png",
"url_two": "https://dog.png",
"author_id" : 1,
"author_name" : "Clem",
"votes_one": 42,
"votes_two": 445,
"user_vote": -1 || 0 || 1
}
]
field | description |
---|---|
votes_one | number of votes for the first picture (url_one) |
votes_two | number of votes for the second picture (url_two) |
user_vote | the vote of the user referenced in user_id in route parameters -1 if no vote 0 if first 1 if second |
[POST] /vote
Create or Modify the vote for a post
[
{
"post_id": "1",
"value": -1 || 0 || 1,
}
]
[
{
"Authorization": "the_access_token"
}
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.