news-turkey

0.0.72 • Public • Published

Modül İndirme:

  npm install news-turkey

Örnek Kullanım:

const news = require('news-turkey')
const date = () => new Date()

console.log(date(), 'System opened!')

setTimeout(async () => {
    // "count"    : Kaç tane haberin gösterileceğini belirleyebilirsiniz.
    // "category" : Haber kategorisini belirleyebilirsiniz.
    // "tag"      : Haber etiketleri arasında belirttiğiniz tag olan haberleri alınmasını sağlayabilirsiniz.
    const information = await news({ count: 3 });
    console.log(information);
}, 2000);

// Farklı bir kullanım şekli:
// news({ count: 3 }).then(information => {
//     console.log(information)
// })

Örnek Çıktı:

[
    {
        "category": "...",
        "title": "...",
        "description": [
            { "text": "..." },
            { "image": "https://trthaber.com//dosyalar/images/...jpg" },
            { "text": "..." },
        ],
        "image": "https://trthaberstatic.cdn.wp.trt.com.tr/...jpg",
        "link": "https://trthaber.com/haber/gundem/...html",
        "source": "...",
        "date": "01.01.2001 21:21",
        "updateDate": "01.01.2001 21:22",
        "newTags": [
            { "link": "https://www.trthaber.com/etiket/.../", "title": "..." },
            {...}
        ]
    }
    {...},
    {...}
]

ISC License

Geri Bildirim

E-posta: me@cihatksm.com adresinden bana ulaşın.

Bilgi

Bu modülde trthaber.com web sitesindeki haberler yer almaktadır.
Herhangi bir sorun teşkil ediyorsa, problem oluşturuyorsa ya da oluşturduysa önce tarafıma bilgi verilmesi rica olunur.

Package Sidebar

Install

npm i news-turkey

Weekly Downloads

2

Version

0.0.72

License

MIT

Unpacked Size

8.28 kB

Total Files

6

Last publish

Collaborators

  • cihatksm