Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

cestlagreve-strikes

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cestlagreve-strikes

Calendar scraper for [cestlagreve.fr](https://www.cestlagreve.fr/), a french website providing all strike dates in France.

latest
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

cestlagreve-strikes

Calendar scraper for cestlagreve.fr, a french website providing all strike dates in France.

Getting started

Prerequisites

  • NodeJS
  • NPM
  • Yarn

Install

From npm

yarn add cestlagreve-strikes

or

npm i cestlagreve-strikes --save

Use

const cestlagreve = require('cestlagreve-strikes');

Get parameters

cestlagreve.getParams().then(console.log)

Returns this.

Get strikes

cestlagreve.getStrikes({
    month,
    year,
    regionId,
    departmentId,
    departmentCode,
    sectorId
}).then(console.log)

Params :

  • month : (integer, optional) MM format
    Defaults to current month
  • year : (integer, optional) YYYY format
    Defaults to current year
  • regionId : (integer, optional) As returned by getParams()
  • departmentId : (integer, optional) As returned by getParams()
  • departmentCode : (string, optional) French department code
  • sectorId : (string, optional) As returned by getParams()

Note : defining more than one of the last 3 parameters would be pointless.

Returns an array (days of month) of arrays (strikes of day) with the following properties :

  • name : (string) Event name in french
  • link : (string, optional) URL to related blog article in french

Get iCal

cestlagreve.getIcal(options).then(console.log)

Params : same as getStrikes()

Note : This function will fetch all available future events (including next months).

Returns this

Changelog

  • 1.0.0 (2020-03-03) • Initial release
  • 1.0.1 (2020-03-04) • Add filter by sector ID
  • 1.0.2 (2020-03-04)
    • Fix current month beginning with last days of previous month
    • Add iCal generator
  • 1.0.3 (2020-03-04) • Fix iCal date & description tags
  • 1.0.4 (2022-09-29) • Handle missing event link

FAQs

Package last updated on 29 Sep 2022

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