Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ta-interaktiv/newsnet-api-flow-types

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ta-interaktiv/newsnet-api-flow-types

Flow type definitions for stuff the Newsnet API returns.

  • 0.6.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Newsnet API Flow Types

Flow typing for the stuff the Newsnet API produces.

npm version

API

Table of Contents

Author

Author object, being part of /api/articles/<legacy_id>

Type: {type: string, id: string, name: string, description: string?, url: string, picture: string?, twitter: string?, rss: string}

Properties

CommunityType

The available types of communities so far.

Type: ("dark" | "facebook" | "twitter" | "whatsapp" | "share" | "comment")

DateString

Date string, of the form "dd.MM.YYYY HH:mm:SS".

Type: string

Community

Community object, used for providing social media information.

Type: {type: CommunityType, count: number, article_id: string, refresh: DateString, cache: (string | boolean), share_type_id: string, url: string?, description: string?, name: string?, title: string?, description: string?, facebook_id: string?, via: string?, allow_comments_weekdays: boolean?, allow_comments_weekends: boolean?, comment_count_text: string?}

Properties

Communities

Community list, as provided by /api/articles/<legacy_id>/communities

Type: {communities: Array<Community>}

Properties

External_Services

External services combines several meta data about an article.

Provided by /api/articles/<legacy_id>/external_services

Type: {configs: any, paywall: Paywall, ads: any, statistics: Array<Statistic>, communities: Array<Community>}

Properties

Paywall

Basic Paywall object

Part of /api/articles/<legacy_id> and /api/articles/<legacy_id>/external_services

Type: {doc_type: string, main_channel: string, sub_channel: string, cms_id: number}

Properties

Statistic

Basic statistic object.

Part of /api/articles/<legacy_id> and /api/articles/<legacy_id>/external_services.

Type: {provider: ("wemf" | "webseismo" | "gtm"), type: string}

Properties

  • provider ("wemf" | "webseismo" | "gtm")
  • type string

Wemf

Additional properties for Statistic objects of type 'wemf'. Use with flow type intersections.

Type: {url: string, webapp_url: string, iphone_url: string, ipad_url: string, android_url: string, desktop_url: string}

Properties

Examples

let wemfInfo: Statistic & Wemf

Webseismo

Additional properties for Statistic object of type 'webseismo'. Use with flow type intersections.

Type: {url_desktop: string, url_webapp: string, url_smartphone: string, url_tablet: string, url: string}

Properties

Examples

let webseismoInfo: Statistic & Webseismo

Gtm

Additional properties for Statistic objects of type 'gtm'. Use with flow type intersections.

Type: {article_id: number, article_title: string, article_type: string, pagetype: string, premium: boolean, publish_date: number, category: string, subcategory: string}

Properties

Examples

let gtmInfo: Statistic & Gtm

Article

The article type, as provided by the Newsnet API.

Provided by /api/articles/<legacy_id>

Type: {article: ArticleContent}

Properties

ArticleContent

The contents of an article. The API wraps these contents below an article key.

Type: {id: string, legacy_id: number, title: string, title_short: string, picture_small_url: string, picture_medium_url: string, picture_big_url: string, lead: string, lead_short: string, lead_teaser: string, timestamp_updated_at: number, first_published_at: number, external_services: {statistics: Array<Statistic>, ads: any, paywall: Paywall}, authors: Array<Author>}

Properties

Site

General information about the site.

Provided by /api/sites/default

Type: {site: SiteContent}

Properties

SiteContent

Common information about the site.

Type: {id: string, name_short: string, name: string, title: string, language: string, feedback_url: string, facebook_id: string, facebook_url: string, twitter_via: string, gtm_id: string, paywall_status: number, statistics: Array<Statistic>, external_services: {statistics: Array<Statistic>}}

Properties

Contributing

Development

JavaScript Style Guide

Building & Releasing

Changes should go into the changelog. The format is based on Keep a Changelog and this project adheres to Semantic Versioning. Update the changelog using the last commit messages since the last version tag using

yarn run changelog

Update the Readme with the current API using

yarn run docs

Keywords

FAQs

Package last updated on 28 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc