Documentation
¶
Overview ¶
* MIT License * * Copyright (c) 2021 Guillaume Truchot * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE.
Index ¶
- Constants
- type AvailabilitiesResponse
- type BookingAgenda
- type BookingProfile
- type BookingResponse
- type BookingResponseData
- type BookingVisitMotive
- type Client
- func (c *Client) ConfirmAppointment(appointmentId string, startDatetime string, masterPatient MasterPatient, ...) (*ConfirmAppointmentResponse, error)
- func (c *Client) CreateAppointment(startDatetime string, secondSlotDatetime string, visitMotiveIds []int, ...) (*CreateAppointmentResponse, error)
- func (c *Client) GetAvailabilities(startDate time.Time, firstSlotDatetime *time.Time, visitMotiveIds []int, ...) (*AvailabilitiesResponse, error)
- func (c *Client) GetBooking(placeName string, csrfToken string) (*BookingResponse, error)
- func (c *Client) GetMasterPatients(csrfToken string) (*MasterPatientsResponse, error)
- func (c *Client) Login(username string, password string) (*LoginResponse, error)
- type ConfirmAppointmentResponse
- type CreateAppointmentResponse
- type LoginResponse
- type MasterPatient
- type MasterPatientsResponse
Constants ¶
const RootUrl = "https://doctolib.fr"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailabilitiesResponse ¶
type BookingAgenda ¶
type BookingProfile ¶
type BookingProfile struct {
Id int `json:"id"`
}
type BookingResponse ¶
type BookingResponse struct { Data BookingResponseData `json:"data"` CsrfToken string }
type BookingResponseData ¶
type BookingResponseData struct { Profile BookingProfile `json:"profile"` VisitMotives []BookingVisitMotive `json:"visit_motives"` Agendas []BookingAgenda `json:"agendas"` }
type BookingVisitMotive ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ConfirmAppointment ¶
func (c *Client) ConfirmAppointment(appointmentId string, startDatetime string, masterPatient MasterPatient, csrfToken string) (*ConfirmAppointmentResponse, error)
func (*Client) CreateAppointment ¶
func (*Client) GetAvailabilities ¶
func (*Client) GetBooking ¶
func (c *Client) GetBooking(placeName string, csrfToken string) (*BookingResponse, error)
func (*Client) GetMasterPatients ¶
func (c *Client) GetMasterPatients(csrfToken string) (*MasterPatientsResponse, error)
type ConfirmAppointmentResponse ¶
type ConfirmAppointmentResponse struct {
CsrfToken string
}
type LoginResponse ¶
type MasterPatient ¶
type MasterPatient struct { Id int `json:"id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Kind string `json:"kind"` Gender bool `json:"gender"` Birthdate string `json:"birthdate"` IsComplete bool `json:"is_complete"` HasOwnEmail bool `json:"has_own_email"` HasOwnPhoneNumber bool `json:"has_own_phone_number"` Email string `json:"email"` PhoneNumber string `json:"phone_number"` MismatchInsurance bool `json:"mismatchInsurance"` Consented bool `json:"consented"` }
type MasterPatientsResponse ¶
type MasterPatientsResponse struct { MasterPatients []MasterPatient CsrfToken string }