#oauth #api-client #jwt #bindings #p7m #scheduling #http-request

p7m-appointment

Rust bindings for the appointment API of P7M

2 unstable releases

0.12.1 Jul 7, 2024
0.11.0 Jul 31, 2022

#333 in Web programming

33 downloads per month

Apache-2.0

160KB
2K SLoC

Rust API client for p7m-appointment

API for appointment scheduling related data

This is the API of the service at P7M that manages the scheduling and management of appointments. It is used by the booking widget (see the WidgetApi tag) with functions that are public and don't require the user to be authenticated.

For endpoints in other tags the caller has to be authenticated with the system and provide a JWT token in the Authorization header of the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0.

When you are trying this API using the Swagger interface, you need to click the Authorize button and then again the Authorize button in the pop-up that gets opened.

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 0.12.1
  • Package version: 0.12.1
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named p7m-appointment and add the following to Cargo.toml under [dependencies]:

p7m-appointment = { path = "./p7m-appointment" }

Documentation for API Endpoints

All URIs are relative to https://book.p7m.de/v1

Class Method HTTP request Description
AvailabilityApi delete_availability_by_id DELETE /availabilities/{id} Delete an availability
AvailabilityApi get_availabilities GET /availabilities Get the list of availabilities
AvailabilityApi get_availability_by_id GET /availabilities/{id} Request a single availability
AvailabilityApi post_availabilities POST /availabilities Create a new availability period
AvailabilityApi put_availability_by_id PUT /availabilities/{id} Update a single availability
BookingTenantApi delete_booking_tenant_by_id DELETE /booking/tenant/{id} Delete a booking tenant by ID
BookingTenantApi get_booking_tenant_by_id GET /booking/tenant/{id} Get a (booking) tenant as specified by its ID
BookingTenantApi get_booking_tenants GET /booking/tenant Get list of booking tenants
BookingTenantApi post_booking_tenant POST /booking/tenant Create a new booking tenant
BookingTenantApi put_booking_tenant_by_id PUT /booking/tenant/{id} Update an existing booking tenant
HolidayApi get_holidays GET /holidays Get the list of public holidays known by the system
ReservationApi delete_reservation_by_id DELETE /reservations/{id} Delete the reservation with the given ID
ReservationApi get_reservations GET /reservations Get all reservations
ReservationApi get_reservations_by_id GET /reservations/{id} Get a single reservation identified by its ID
ReservationApi post_reservations POST /reservations Create a new reservation
ReservationApi put_reservation_by_id PUT /reservations/{id} Update an existing reservation
ReservationApi put_reservation_tags_by_id PUT /reservations/{id}/tags Update (only) the tags of a given reservation
ServiceApi delete_service_by_id DELETE /services/{id} Delete a service by its ID
ServiceApi get_service_by_id GET /services/{id} Get a service by its ID
ServiceApi get_services GET /services Get list of all services
ServiceApi post_service POST /services Create a new service
ServiceApi put_service_by_id PUT /services/{id} Updates a single service
TagApi delete_tag_by_id DELETE /tags/{id} Delete a tag by ID
TagApi get_tag_by_id GET /tags/{id} Get a single tag by its ID
TagApi get_tags GET /tags Get all tags
TagApi post_tag POST /tags Create a new tag
TagApi put_tag_by_id PUT /tags/{id} Updates an existing tag
WidgetApiApi get_booking_config GET /booking/config/{id} Get the basic configuration information for the widget of the specified tenant
WidgetApiApi get_booking_schedule GET /booking/schedule/{tid}/{sid}/{wid}/{date} Get the available times at which a service can be booked.
WidgetApiApi post_booking_reserve POST /booking/reserve Reserve a time slot for a user
WidgetApiApi post_booking_reserve_confirmation POST /booking/reserve/{rid}/confirmation Confirm a reservation with the PIN sent to the user
WidgetApiApi put_booking_reserve_by_id PUT /booking/reserve/{rid} Resend the code for an existing reservation
WorkerApi delete_worker_by_id DELETE /workers/{id} Deletes a worker by its ID
WorkerApi get_worker_by_id GET /workers/{id} Get a single worker by its ID
WorkerApi get_workers GET /workers Get the list of all workers
WorkerApi post_worker POST /workers Create a new worker
WorkerApi put_worker_by_id PUT /workers/{id} Update an existing worker

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

tech@p7m.de

Dependencies

~4–15MB
~220K SLoC