![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Cronofy - the scheduling platform for business
Add this line to your application's Gemfile:
gem 'cronofy'
And then at your command prompt run:
bundle install
In order to use the Cronofy API you will need to create a developer account.
From there you can create an OAuth application
to obtain an OAuth client_id
and client_secret
to be able to use the full API.
To make calls to the Cronofy API you must create a Cronofy::Client
. This takes
five keyword arguments, all of which are optional:
cronofy = Cronofy::Client.new(
client_id: 'CLIENT_ID',
client_secret: 'CLIENT_SECRET',
access_token: 'ACCESS_TOKEN',
refresh_token: 'REFRESH_TOKEN',
data_center: :de
)
When using a personal access token
you only need to provide the access_token
argument.
When working against your own OAuth application you will need to provide the
client_id
and client_secret
when going through the authorization process
for a user, and when refreshing an access token.
If client_id
and client_secret
are not specified explicitly the values from
the environment variables CRONOFY_CLIENT_ID
and CRONOFY_CLIENT_SECRET
will
be used if present.
data_center
is the two-letter designation for the data center you want to operate against - for example :de
for Germany, or :au
for Australia. When omitted, this defaults to the US data center.
Generate a link for a user to grant access to their calendars:
authorization_url = cronofy.user_auth_link('http://yoursite.dev/oauth2/callback')
The callback URL is a page on your website that will handle the OAuth 2.0
callback and receive a code
parameter. You can then use that code to retrieve
an OAuth token granting access to the user's Cronofy account:
response = cronofy.get_token_from_code(code, 'http://yoursite.dev/oauth2/callback')
You should save the response's access_token
and refresh_token
for later use.
Note that the exact same callback URL must be passed to both methods for access to be granted.
If you use the omniauth gem, you can use our omniauth-cronofy strategy gem to perform this process.
Get a list of all the user's calendars:
calendars = cronofy.list_calendars
Get a list of events from the user's calendars:
events = cronofy.read_events
Note that the gem handles iterating through the pages on your behalf.
To create/update an event in the user's calendar:
event_data = {
event_id: 'uniq-id',
summary: 'Event summary',
description: 'Event description',
start: Time.now + 60 * 60 * 24,
end: Time.now + 60 * 60 * 25,
location: {
description: "Meeting room"
}
}
cronofy.upsert_event(calendar_id, event_data)
To delete an event from user's calendar:
cronofy.delete_event(calendar_id, 'uniq-id')
We add features to this SDK as they are requested, to focus on developing the Cronofy API.
If you're comfortable contributing support for an endpoint or attribute, then we love to receive pull requests! Please create a PR mentioning the feature/API endpoint you’ve added and we’ll review it as soon as we can.
If you would like to request a feature is added by our team then please let us know by getting in touch via support@cronofy.com.
FAQs
Unknown package
We found that cronofy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.