1.4.5 • Published 3 years ago
@snapp-store/miare-sdk v1.4.5
miare-sdk
Miare SDK is a Typescript library for dealing with mia.re 3rd party api 🛵.
Installation
Use the package manager npm to install miare-sdk.
npm install @snapp-store/miare-sdk
Usage
Pass your API key and environment between "staging" or "production" to Miare class and create an instance of it.
import Miare from '@snapp-store/miare-sdk';
const miare = new Miare('<YOUR_MIARE_API_KEY>', 'staging');
const someFancyFunction = async () => {
// some loginc here
const canceledTrips = await miare.getTrips({ state: 'canceled_by_client' });
return canceledTrips;
};
Available Methods
- createTrip(createTripParameters)
- addCourseToTrip(tripid, newCourse)
- removeCourseFromTrip(courseId)
- cancelTripById(tripId)
- getTripById(tripId)
- getTrips(getTripsParameters)
- getEstimatePrice(source, destination)
- getAreas()
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.