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

mycicero.js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mycicero.js

npm package to get Italian Transport Solutions and other data powered by MyCicero.

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

MyCicero.js

MyCicero.js is an npm package that you can use to get Italian Transport Solutions, their pricing, and other data powered by the MyCicero Service and its private API.

Installation

Open your terminal and run the following npm command to install the package in your project.

npm install mycicero.js

Usage

After installing the package, you can begin using its features in your project. Below you can find some examples.

const { MyCicero } = require('mycicero.js');
const myCicero = new MyCicero();

// Returns object with an array of solutions. 
// The array can be empty if no solutions with the specified parameters were found.
await myCicero.getSolutions({
    locations: {
        departure: {
            lat: 41.90249000000006,
            lon: 12.496060000000057,
        },
        arrival: {
            lat: 42.44785999527568,
            lon: 14.208839989364549,
        }
    },
    dates: {
        departure: new Date(),
        // Optional: specify an arrival date.
        arrival: new Date(/* Timestamp specified by you. */),
    },
    // Optional: specify number of passengers. Defaults to one adult. 
    passengers: {
        adults: 2,
        children: 1
    }
    // Optional: specify a particular mean of transport. 
    // Defaults to 'bus', and the only accepted values are 'bus', 'train', and 'underground'.
    meanOfTransport: 'train'
});

await myCicero.getNearestStops({
    location: {
        lat: 42.4477,
        lon: 14.2080,
    },
    // Optional: specify a radius - in meters - where to look for stops.
    radius: 500
});

Contributing

Wish to contribute? You're welcome to join, even if you don't know how to code.

Contributing to open source consists in helping, no matter what we can do. For example, even if you don't know how to code, you may be able to write documentation, create graphical assets, and more. For more information, read here.

Project Structure

  • src: Contains the source code;
  • tests: Contains test useful for testing the source code of the project.

Community Standards

Please remember to follow our Code of Conduct when interacting with the community. Happy coding, and thank you for your contribution!

Disclaimer

MyCicero is a trademark of MyCicero srl, and this project is user-made and not associated with the company in any way.

Keywords

FAQs

Package last updated on 08 Oct 2024

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