Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
cts-tram-api
Advanced tools
Readme
API from "Compagnie des transports strasbourgeois". For more informations go to CTS Portail Open Data and API service
npm install --save cts-tram-api
or
<script src="https://cdn.jsdelivr.net/gh/w-jerome/cts-tram-api/dist/cts-tram-api.min.js"></script>
import CTSTramAPI from 'cts-tram-api';
const cts_tram_api = new CTSTramAPI('my_api_key');
// ES6
cts_tram_api.estimatedTimetable()
.then(estimated_timetables => {
console.log(estimated_timetables);
})
.catch(error => {
console.error(error);
});
// ES5
cts_tram_api.estimatedTimetable(function(estimated_timetables, error) {
if (error) {
console.error(error);
return false;
}
console.log(estimated_timetables);
});
Configuration properties:
Property | Type | Require | Description |
---|---|---|---|
vehicle_mode | string | false | vehicle_mode |
line_ref | string | false | line_ref |
direction_ref | string | false | direction_ref |
Example:
// ES6
cts_tram_api.estimatedTimetable(vehicle_mode, line_ref, direction_ref)
// ES5
cts_tram_api.estimatedTimetable(function() {}, vehicle_mode, line_ref, direction_ref)
// ES6
cts_tram_api.stopMonitoring('233A')
.then(stop_monitoring => {
console.log(stop_monitoring);
})
.catch(error => {
console.error(error);
});
// ES5
cts_tram_api.stopMonitoring(function(stop_monitoring, error) {
if (error) {
console.error(error);
return false;
}
console.log(stop_monitoring);
}, '233A');
Configuration properties:
Property | Type | Require | Description |
---|---|---|---|
monitoring_ref | string | true | monitoring_ref |
vehicule_mode | string | false | vehicule_mode |
preview_interval | string | false | preview_interval |
start_time | string | false | start_time |
line_ref | string | false | line_ref |
direction_ref | number | false | direction_ref |
maximum_stop_visits | number | false | maximum_stop_visits |
minimum_stop_visits_per_line | number | false | minimum_stop_visits_per_line |
Example:
// ES6
cts_tram_api.stopMonitoring(monitoring_ref, vehicule_mode, preview_interval, start_time, line_ref, direction_ref, maximum_stop_visits, minimum_stop_visits_per_line)
// ES5
cts_tram_api.stopMonitoring(function() {}, monitoring_ref, vehicule_mode, preview_interval, start_time, line_ref, direction_ref, maximum_stop_visits, minimum_stop_visits_per_line)
// ES6
cts_tram_api.stopPointsDiscovery()
.then(stop_points => {
console.log(stop_points);
})
.catch(error => {
console.error(error);
});
// ES5
cts_tram_api.stopPointsDiscovery(function(stop_points, error) {
if (error) {
console.error(error);
return false;
}
console.log(stop_points);
});
Configuration properties:
Property | Type | Require | Description |
---|---|---|---|
latitude | number | false | latitude |
longitude | number | false | longitude |
distance | number | false | distance |
Example:
// ES6
cts_tram_api.stopPointsDiscovery(latitude, longitude, distance)
// ES5
cts_tram_api.stopPointsDiscovery(function() {}, latitude, longitude, distance)
// ES6
cts_tram_api.linesDiscovery()
.then(lines => {
console.log(lines);
})
.catch(error => {
console.error(error);
});
// ES5
cts_tram_api.linesDiscovery(function(lines, error) {
if (error) {
console.error(error);
return false;
}
console.log(lines);
});
CTS Tram API | REST API |
---|---|
v1 | v1 |
MIT, see LICENSE for details.
FAQs
API from 'Compagnie des transports strasbourgeois' (CTS)
The npm package cts-tram-api receives a total of 1 weekly downloads. As such, cts-tram-api popularity was classified as not popular.
We found that cts-tram-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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.