Skip to content
This repository has been archived by the owner on Jan 9, 2022. It is now read-only.

koshilife/youcanbookme-api-ruby-client

Repository files navigation

YouCanBook.me API Client

Test codecov Gem Version license

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}
  • 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}
  • 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
  • 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}
  • 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}
  • 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
  • Query
    • POST /v1/{accountId}/queries
  • 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}
  • 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}

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.

About

A Ruby client library for accessing YouCanBook.me APIs

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks