
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
romcal-api
Advanced tools
REST API for liturgical calendars in Catholic Roman rite (Western Church). Powered by romcal.
REST API for liturgical calendars in Catholic Roman rite (Western Church).
Powered by romcal. This API is read-only, you can only get data from romcal.
Actually only Express is supported. More frameworks might be supported in the future.
$ npm install romcal-api
$ npm install express
// index.js
const express = require('express');
const romcalMiddleware = require('romcal-api').middleware;
const app = express();
const PORT = process.env.PORT || 3000;
app.use(romcalMiddleware);
app.listen(PORT, () => {
console.log(`romcal API running on port ${PORT}`);
});
$ node index.js
Actually only AWS Lambda is supported. More providers might be added in the future.
To get started, you'll need the Serverless Framework installed. You'll also need your environment configured with AWS credentials.
First, create a new working directory for your romcal API project:
# Create a new Serverless service/project
$ serverless
# Change into the newly created directory
$ cd my-romcal-api
Then, install romcal-api:
$ npm install romcal-api
With our libraries installed, let's add our application code in the handler.js
:
// handler.js
const romcalAPI = require('romcal-api');
module.exports.romcalAPI = romcalAPI.handler;
To get this application deployed, let's define the provider settings and the romcal functions in the serverless.yml
:
provider:
name: aws
runtime: nodejs12.x
functions:
app:
handler: handler.romcalAPI
events:
- http: ANY /
- http: 'ANY {proxy+}'
# Optional: Each function instance below will have the same code, but they'll be segmented for metrics purposes.
getCalendar:
handler: handler.romcalAPI
events:
- http: 'GET /calendar/{proxy+}'
getLiturgicalCalendar:
handler: handler.romcalAPI
events:
- http: 'GET /liturgical-calendar/{proxy+}'
getCalendars:
handler: handler.romcalAPI
events:
- http: 'GET /calendars'
getLocales:
handler: handler.romcalAPI
events:
- http: 'GET /locales'
Finally, let's deploy your romcal-api function:
$ sls deploy
After a minute, your application is live! The console will show your endpoints in the Service Information section. You can navigate to that route in your browser.
To get help, you will find a lot more information and support about serverless, over internet and particularly on the serverless.com website.
romcal-api is in the early stages of development, and not ready for production. The API and returned objects could also change a bit in future versions.
To-do list:
You can use tools like Postman to play with the API.
Theses APIs Output an array
of celebrations ordered by date.
/api/v1/calendar/{name}/{locale}
Get calendar data based on the current year, from 1 January to 31 December.
/api/v1/calendar/{name}/{locale}/{year}/{month}/{day}
Get calendar data for a specified period, or a specific date:YYYY
, orYYYY/MM
, orYYYY/MM/DD
, between 1 January and 31 December.
/api/v1/liturgical-calendar/{name}/{locale}/{year}
Get calendar data for a specifiedyear
(inYYYY
format), between the first day of Advent and the last day of Ordinary Time.
For example,2020
will return the liturgical calendar between the 29th of November 2020 (1st Sunday of Advent) and the 27th of November 2021 (Saturday of the 34th week of Ordinary Time).
Other parameters:
{name}
: the name of the calendar, generally represented by the country name. If the name is not recognized romcal-api will throw an error. For example: france
.{locale}
: the local used to retrieve data. For example: fr
.Additionally you can specify theses optional query strings:
?weekday=[int]
: Filter the results on a specific weekday. 0
is Sunday, 6
is Saturday. For example ?weekday=0
.?title=[string]
: Filter the results on a specific celebration title. The title needs to be in kebab-case. For example ?title=patron-of-europe
.?group=[string]
: Calendar dates can be grouped by various criteria upon invocation like so: days
, months
, days-by-month
, weeks-by-month
, cycles
, types
, liturgical-seasons
, liturgical-colors
, psalter-weeks
.
When using this parameter, it output first an object
where keys represent the grouped data.It is possible to query for dates against multiple criteria. For example ?weekday=0&group=liturgical-seasons
/api/v1/calendars
Output an array of calendar names.
/api/v1/locales
Output an array of (actually mocked) locales names.
(and more to come)
MIT
FAQs
REST API to get the liturgical calendar in the Catholic Roman rite.
The npm package romcal-api receives a total of 7 weekly downloads. As such, romcal-api popularity was classified as not popular.
We found that romcal-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.