cronofy / cronofy-ruby Goto Github PK
View Code? Open in Web Editor NEWCronofy Ruby Gem
Home Page: https://docs.cronofy.com/developers
License: MIT License
Cronofy Ruby Gem
Home Page: https://docs.cronofy.com/developers
License: MIT License
According to the Cronofy changelog, we should be able to specify query slots in the availability hash when calling real_time_scheduling
on the Cronofy client. I took a look through the code and I see no reference to query_slots
.
When will query slots be supported by this gem?
[deleted]
Currently, the revoke_authorization
method uses the token
automatically:
cronofy-ruby/lib/cronofy/client.rb
Lines 736 to 738 in fc9cd41
But the API docs say that you can use the sub
to revoke an authorization. The Ruby gem should support that.
I'm getting this error
cronofy-0.14.0/lib/cronofy/errors.rb:93:in `raise_error': 422 Unprocessable Entity (Cronofy::InvalidRequestError)
from /Users/emile/.rvm/gems/ruby-2.3.0@viewpoint/gems/cronofy-0.14.0/lib/cronofy/errors.rb:86:in `raise_if_error'
from /Users/emile/.rvm/gems/ruby-2.3.0@viewpoint/gems/cronofy-0.14.0/lib/cronofy/client.rb:762:in `http_get'
from /Users/emile/.rvm/gems/ruby-2.3.0@viewpoint/gems/cronofy-0.14.0/lib/cronofy/client.rb:756:in `get_page'
from /Users/emile/.rvm/gems/ruby-2.3.0@viewpoint/gems/cronofy-0.14.0/lib/cronofy/client.rb:730:in `initialize'
from /Users/emile/.rvm/gems/ruby-2.3.0@viewpoint/gems/cronofy-0.14.0/lib/cronofy/client.rb:196:in `new'
from /Users/emile/.rvm/gems/ruby-2.3.0@viewpoint/gems/cronofy-0.14.0/lib/cronofy/client.rb:196:in `read_events'
from ./us.rb:11:in `<main>'
when I run this script
require 'cronofy'
cronofy = Cronofy::Client.new(access_token: TOKEN)
cronofy.read_events(from: (Date.today - 365)).each{|event|
puts event
}
This gem depends on oauth2 version "~> 1.0", but version 1.4.x has reached EOL.
Installation produces the following warning:
Post-install message from oauth2:
You have installed oauth2 version 1.4.10, which is EOL.
No further support is anticipated for the 1.4.x series.
OAuth2 version 2 is released.
There are BREAKING changes, but most will not encounter them, and upgrading should be easy!
Please see:
• https://github.com/oauth-xx/oauth2#what-is-new-for-v20
• https://github.com/oauth-xx/oauth2/blob/master/CHANGELOG.md
Please upgrade, report issues, and support the project! Thanks, |7eter l-|. l3oling
Cronofy allows developers to specify which data center they wish to use when instantiating the client
In this section of the README.md, it's not quite explicit how you specify this.
Lines 35 to 40 in 0e19e38
With a bit of digging I found the key data_centre
with UK spelling which is slightly different from the general spelling used in the docs
Would it be possible to update the docs to make it more explicit about specifying the data center like the example below?
cronofy = Cronofy::Client.new(
client_id: 'CLIENT_ID',
client_secret: 'CLIENT_SECRET',
access_token: 'ACCESS_TOKEN',
refresh_token: 'REFRESH_TOKEN',
data_centre: 'DATA_CENTER_REGION' # will use US by default
)
Cheers!
Hi, Everyone.
I am going to use Push Notification after booking an appointment by calling Cronofy API.
I can get the hook after notification channel. But I can't get the any hooks after booking an appointment.
How should I do?
Hello!
I am really enjoying working with the Cronofy service. I was wondering if there are plans to add more documentation (maybe in the README) for other usage cases like Smart Invites?
Thank you,
Edwin M. Mak
I see there's a client_spec.rb
that includes some fake data: https://github.com/cronofy/cronofy-ruby/blob/5410bef43afa2c48f5e27f3eb0f3960a30e766b1/spec/lib/cronofy/client_spec.rb
Does anyone have a good system for mocking the data returned from various Cronofy::Client
methods? Or would anyone be interested in providing it in the gem itself? I'd prefer to avoid VCR/WebMock stubbed requests if possible (I'd like to stub the methods themselves, e.g. list_calendars
), but I acknowledge that may not be feasible here.
Thanks!
Our logs are absolutely overwhelmed with the following log message:
W, [2017-10-13T11:29:09.816974 #6930] WARN -- : You are setting a key that conflicts with a built-in method Cronofy::PagedEventsResult#update defined at /home/deploy/Acadia/shared/bundle/ruby/2.3.0/gems/hashie-3.5.6/lib/hashie/mash.rb:209. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
Like 3 million times in 24 hours.
It makes the logs nearly useless and fills up the server disk space until the server crashes.
While this is due to a silly decision by Hashie, changes are needed in Cronofy to suppress it.
Cronofy needs to subclass Hashie::Mash
and disable_warnings
- hashie/hashie#394
event.inspect
TypeError Exception: no implicit conversion of Time into String
Hi there!
The API documentation says that the upsert_event
endpoint returns the join URL for the related conferencing service for the calendar. But this client returns nil
instead of the received response.
Would it be possible to change that? If not, which would be the right way to retrieve that data?
Thanks! ❤️
When I try to authenticate via Google after updating the cronofy gem, I receive an "invalid client" error from omniauth.
I think the omniauth-cronofy gem is the culprit per cronofy/omniauth-cronofy#13.
When trying to run the availability query on a client without having an access_token
set, I am getting the following error:
cronofy-0.37.3/lib/cronofy/client.rb:1789:in `access_token!': No credentials supplied (Cronofy::CredentialsMissingError)
I believe this is due to the fact of that endpoint calling .post on line 1802 which want to use the access_token to make the request. The api docs for availability require the API_KEY
or client_secret
rather than a user's access_token
When I change line 847 from
response = post("/v1/availability", options)
to
response = wrapped_request { api_key!.post("/v1/availability", json_request_args(options)) }
I get the expected response.
I am happy to make the necessary updates to add this to the repo unless I am doing something incorrect in my setup.
client = Cronofy::Client.new(access_token: access_token, refresh_token: refresh_token)
[3] pry(main)> client.refresh_access_token
Cronofy::BadRequestError: 400 Bad Request
from /usr/local/bundle/gems/cronofy-0.8.3/lib/cronofy/errors.rb:85:in `raise_error'
[4] pry(main)>
https://www.cronofy.com/developers/api/#read-events
is there a helper for reading events? if so, I can add it to Readme.md. if not, i'll add it to the gem itself
Hashie 4.x is available but the gem currently uses Hashie 3.x, could we upgrade it? It's causing conflicts in our Gemfile :(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.