This project was generated with Angular CLI version 1.5.3.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change
any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe| service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag
for a production build.
Note: For all server-to-client objects, make sure to pass the following with every response:
{
"success": true,
"response": {}
}
Add articles to database. Use authentication to only allow specific users to add articles.
Client to Server:
[
{
"image": "",
"link" : "",
"title" : "",
"description" : "",
"published_at" : "2017-11-23T15:32:21.000Z",
"author" : "",
"complexity": 10,
"quality": 10,
"topics": [
"topic_1",
"topic_2"
]
}
]
Server to Client:
{
"article_ids": [
""
]
}
Get list of articles based on complexity and preferred topics.
Client to Server:
{
"complexity": 10,
"topics": [
"topic_1",
"topic_2"
],
"offset": 20,
"limit": 20
}
Server to Client:
[
{
"article_id" : "",
"image": "",
"link" : "",
"title" : "",
"description" : "",
"published_at" : "2017-11-23T15:32:21.000Z",
"author" : ""
}
]
Get article based on article id.
Client to Server:
{
"article_id": ""
}
Server to Client:
{
"article_id" : "",
"updated_at" : "2017-11-23T22:00:06.287Z",
"created_at" : "2017-11-23T22:00:06.287Z",
"image": "",
"link" : "",
"title" : "",
"description" : "",
"published_at" : "2017-11-23T15:32:21.000Z",
"author" : ""
}
User login based on username and password.
Client to Server:
{
"username": "",
"password": ""
}
Server to Client:
Pass preferred user authentication information to be used throughout application.
and user settings:
{
"push_enabled": true,
"complexity": 10,
"topics": [
"topic_1",
"topic_2"
]
}
Create new user with default settings.
Client to Server:
{
"username": "",
"password": "",
"push_enabled": true,
"complexity": 10,
"topics": [
"topic_1",
"topic_2"
]
}
Server to Client:
{
"user_id": ""
}