An awesome project that users can post/get/delete/update text sources such as stories, speeches etc.
ADDITIONALLY, it can generate a sentence based on Markov chain for any of these text sources.
(thus making it a tweet generator considering each generated sentence as a tweet.)
baseURL: https://text-source-api.herokuapp.com
Predicts and generates a tweet that Donald Trump could tweet using Markov Chain based on corpus of all his past speeches (168k+ words). Website: www.donald-trump-tweet-generator.herokuapp.com/ (New sentence each refresh) Markov Chain Algorithm: https://github.com/ruhsane/Tweet-Generator-OOP
post('https://text-source-api.herokuapp.com/sign-up', {
username,
password
})
Successful Response:
{
"token": "thisxxxis.axxxjson.webxxxtoken"
}
post('https://text-source-api.herokuapp.com/login', {
username: String
password: String
})
Successful Response:
{
"token": "thisxxxis.axxxjson.webxxxtoken"
}
get('https://text-source-api.herokuapp.com/text_sources', {
})
Successful Response:
{
[
{
"_id": "id",
"title": "title",
"Created_date": "2019-03-05T05:07:09.420Z",
"content": "blah blah"
},
{
...
}
]
}
post('https://text-source-api.herokuapp.com/text_sources/new', {
title: String,
content: txt file
})
Successful Response:
{
"_id": "id",
"title": "title",
"Created_date": "2019-03-09T11:17:38.067Z",
"content": "blah blah",
"__v": 0
}
get('https://text-source-api.herokuapp.com/text_sources/:sourceId', {
})
Successful Response:
{
"_id": "id",
"title": "title",
"Created_date": "2019-03-05T05:07:09.420Z",
"content": "blah blah"
}
put('https://text-source-api.herokuapp.com/text_sources/:sourceId', {
title: String,
content: String
})
Successful Response:
{
"_id": "5c83a1f87afd960024cb0c13",
"title": "new title",
"Created_date": "2019-03-09T11:22:32.851Z",
"content": "new content",
"__v": 0
}
delete('https://text-source-api.herokuapp.com/text_sources/:sourceId', {
})
Successful Response:
{
message: "Text source successfully deleted"
}
Markov Chain algorithm implementation: https://github.com/ruhsane/Tweet-Generator-OOP
get('https://text-source-api.herokuapp.com/text_sources/:sourceId/get_markov', {
})
Successful Response:
"generated text by markov chain"