YouCanBook.me API Client
About
These client libraries are created for YouCanBook.me API.
Installation
Add this line to your application's Gemfile:
gem 'youcanbookme'
And then execute:
$ bundle
Or install it yourself as:
$ gem install youcanbookme
Supported statuses each YouCanBook.me API
- Account:
- POST
/v1/
- GET
/v1/{accountId}
- PATCH
/v1/{accountId}
- DELETE
/v1/{accountId}
- POST
- Appointment Types:
- POST
/v1/{accountId}/profiles/{profileId}/appointmenttypes/items
- PATCH
/v1/{accountId}/profiles/{profileId}/appointmenttypes/items/{appointmentTypeId}
- DELETE
/v1/{accountId}/profiles/{profileId}/appointmenttypes/items/{appointmentTypeId}
- POST
- Bookings:
- GET
/v1/{accountId}/bookings
- GET
/v1/{accountId}/profiles/{profileId}/bookings
- POST
/v1/{accountId}/profiles/{profileId}/bookings
- GET
/v1/{accountId}/profiles/{profileId}/bookings/{bookingId}
- PATCH
/v1/{accountId}/profiles/{profileId}/bookings/{bookingId}
- DELETE
/v1/{accountId}/profiles/{profileId}/bookings/{bookingId}
- GET
/v1/ics/{bookingSecret}/{bookingIdOrRef}.ics
- GET
- Calendars:
- GET
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars
- POST
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars
- GET
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars/{calendarId}
- PUT
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars/{calendarId}
- PATCH
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars/{calendarId}
- DELETE
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars/{calendarId}
- GET
- Events:
- POST
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars/{calendarId}/events
- GET
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars/{calendarId}/events/{eventId}
- PATCH
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars/{calendarId}/events/{eventId}
- DELETE
/v1/{accountId}/remoteaccounts/{remoteAccountId}/calendars/{calendarId}/events/{eventId}
- POST
- Profile
- GET
/v1/{accountId}/profiles
- POST
/v1/{accountId}/profiles
- GET
/v1/{accountId}/profiles/{profileId}
- PATCH
/v1/{accountId}/profiles/{profileId}
- DELETE
/v1/{accountId}/profiles/{profileId}
- GET
/v1/{accountId}/profiles/{profileId}/suggestedactions
- GET
/v1/subdomains/{subdomain}
- GET
/v1/suggestedsubdomains
- GET
- Query
- POST
/v1/{accountId}/queries
- POST
- Remote Account
- GET
/v1/{accountId}/remoteaccounts
- POST
/v1/{accountId}/remoteaccounts
- GET
/v1/{accountId}/remoteaccounts/{remoteAccountId}
- PATCH
/v1/{accountId}/remoteaccounts/{remoteAccountId}
- DELETE
/v1/{accountId}/remoteaccounts/{remoteAccountId}
- GET
- Team Members:
- POST
/v1/{accountId}/profiles/{profileId}/teammembers/items
- PATCH
/v1/{accountId}/profiles/{profileId}/teammembers/items/{teamMemberId}
- DELETE
/v1/{accountId}/profiles/{profileId}/teammembers/items/{teamMemberId}
- POST
Usage
The APIs client needs account email and password(or token). This client setup step is below.
# set token by YouCanBookMe.configure methods.
YouCanBookMe.configure do |config|
config.username = 'foobar@example.com'
config.password_or_token = '<PASSWORD_OR_TOKEN>'
end
client = YouCanBookMe::Client.new
# set token by YouCanBookMe::Client initializer.
username = 'foobar@example.com'
password_or_token = '<PASSWORD_OR_TOKEN>'
client = YouCanBookMe::Client.new username, password_or_token
This client basic usage is below.
TODO
Contributing
Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the youcanbookme Api Client project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.