The Timekit Ruby Gem

Gem Version Build Status Dependency Status Code Climate Coverage Status Inline docs

A Ruby interface to the Timekit API.

Installation

gem install timekit

Configuration

Configure the Timekit client before using it

Timekit.configure({
  app       : 'your-app-name',
  email     : '[email protected]',
  api_token : 'your-api-token'
})

Documentation

[http://developers.timekit.io/docs]

Usage Examples

After configuring Timekit you can initialize a client, and then you can do the following.

Apps

Initialize your client

client = Timekit.app_client

List

client.list

Create

client.create('app-name')

Update

client.update('app-slug')

Delete

client.delete('app-slug')

Bookings

Initialize your client

client = Timekit.booking_client

List

client.list

Show

client.show('booking-id')

Create

client.create(
  'booking-graph-type', # 'confirm-decline'
  {
    start: 'start-date',
    end: 'end-date',
    what: 'booking-title',
    where: 'booking-address',
    calendar_id: 'replace-with-id',
    description: 'booking-description'
  },
  {
    name: 'booking-customer-name',
    email: 'booking-customer-email',
    phone: 'booking-customer-phone',
    voip: 'booking-customer-voip',
    timezone: 'booking-timezone'
  },
  'booking-action', # 'create'
}

Update

client.update('booking-id', 'confirm')

Calendars

Initialize your client

client = Timekit.calendar_client

List

client.list

Show

client.show('calendar-id')

Create

client.create(
  'calendar-name',
  'calendar-description',
  'calendar-backgroundcolor',
  'calendar-foregroundcolor'
}

Update Not yet implemented

Delete

client.delete('calendar-id')

Credentials

Initialize your client

client = Timekit.credential_client

List

client.list

Create

client.create(
  'credential-type',
  'credential-scope',
  'credential-description',
  'credential-referrer',
  'credential-expires',
)

Delete

client.delete('credential-id')

Events

Initialize your client

client = Timekit.event_client

List

client.list(
  'start-time',
  'end-time'
)

Show

client.show('event-id')

Create

client.create(
  'event-start',
  'event-end',
  'what',
  'where',
  'calendar_id',
  'participants',
  'invite',
  'description',
  'sync_provider',
  'my_rsvp',
  'all_day'
)

Update

client.update(
  'event-id',
  'event-start',
  'event-end',
  'what',
  'where',
  'participants',
  'all_day'
)

Delete

client.delete('event-id')

Findtime

Initialize your client

client = Timekit.findtime_client

User

Initialize your client

client = Timekit.user_client

Me

client.me

Timezone

client.timezone('user-email')

Update

client.update(
  'user-first_name',
  'user-last_name',
  'user-timezone',
  'user-password'
)

Reset Password

client.reset_password('user-email')

Widget

Initialize your client

client = Timekit.widget_client

List

client.list

Embed

client.embed('widget-id')

Hosted

client.hosted('widget-id')

Create

client.create(
  'widget-config',
  'widget-name',
  'widget-slug',
)

Update

client.update(
  'widget-id',
  'widget-config',
  'widget-name',
  'widget-slug',
)

Delete

client.delete('widget-id')

Supported Ruby Versions

This library aims to support and is tested against the following Ruby versions:

  • Ruby 2.1
  • Ruby 2.2
  • Ruby 2.3

If something doesn't work on one of these versions, it's a bug.

This library may inadvertently work (or seem to work) on other Ruby versions, however support will only be provided for the versions listed above.

If you would like this library to support another Ruby version or implementation, you may volunteer to be a maintainer. Being a maintainer entails making sure all tests run and pass on that implementation. When something breaks on your implementation, you will be responsible for providing patches in a timely fashion. If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.

Versioning

This library aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, that version should be immediately yanked and/or a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions. As a result of this policy, you can (and should) specify a dependency on this gem using the Pessimistic Version Constraint with two digits of precision. For example:

spec.add_dependency 'timekit', '~> 1.0'

Copyright (c) 20016-2016 Michael Gauthier See LICENSE for details.