1.0.8 • Published 9 years ago
hurriyet-js v1.0.8
hurriyet-js
Initializing the API
Install the package;
npm install --save hurriyet-jsInitialize hurriyet-js
var hurriyet = require("hurrriyet-js") var api = hurriyet("API-KEY-HERE");For Articles
api.articles(function(res){ console.log(res); });For Single Article
api.article('40322757',function(res){ console.log(res); });For Columns
api.columns(function(res){ console.log(res); });For Single Column
api.column('40321556',function(res){ console.log(res); });For Search
api.search('hackathon',function(res){ console.log(res); });
Articles Defaults Fields
1. Id
2. ContentType
3. CreatedDate
4. Title
5. Description
6. Text
7. Editor
8. Files
9. Path
10. RelatedNews
11. Tags
12. Url
13. WritersColumns Defaults Fields
1. Id
2. ContentType
3. Fullname
4. Title
5. Description
6. Text
7. Files
8. Path
9. UrlSearch Defaults Fields
1. Id
2. ContentType
3. ModifiedDate
4. Title
5. Description
6. Text
7. Files
8. Path
9. RelatedNews
10. Tags
11. Url
12. WritersNOTE : Some text value have html tags. If you dont want html tags then use StripedText field from return values.
NOTE : If you want select different field,skip or top parameters, send options parameters to single methods:
api.article('40322757',{skip:20,top:40,columns['Id','Title']},function(res){
console.log(res);
});For Api Key and Api Documents : https://developers.hurriyet.com.tr/
Developed by aguleroglu