2017-03-09 8 views
0

私は次のコードを使用して、それは働いていたが、突然それは動作していません。私は同じ認証を使用して自由に忙しくなり、すべてが正常に動作している別の方法があります。以下は私の方法とコンソールのログです。カレンダーV3壊れたと私は理由がわからない

def createEvent(title, event_description, mentor, mentee, start_time, end_time) 
    calendar_api = Google::Apis::CalendarV3::CalendarService.new 
    calendar_api.authorization = @auth 
    event = Google::Apis::CalendarV3::Event.new(
     summary: title, 
     description: event_description, 
     start: { 
     date_time: start_time.iso8601, 
     time_zone: 'Etc/UTC', 
     }, 
     end: { 
     date_time: end_time.iso8601, 
     time_zone: 'Etc/UTC', 
     }, 
     attendees: [ 
     {email: mentor}, 
     {email: mentee}, 
     ], 
     reminders: { 
     use_default: true, 
     }, 
    ) 
    calendar_api.insert_event('primary', event) 

    end 

示すように、私は取得していますコンソールにエラーがある

Sending HTTP post https://www.googleapis.com/calendar/v3/calendars/primary/events? 
400 
#<Hurley::Response POST https://www.googleapis.com/calendar/v3/calendars/primary/events == 400 (276 bytes) 300ms> 
Caught error invalid 
Error - #<Google::Apis::ClientError: invalid> 

答えて

0

としては、エラーがから来ていた場所を知るために、デバッグセッション中にブレークポイントを入れてみてください、hereを示唆しました。また、3.0にアップグレードするか、Representable.deprecations = falseを使用して廃止を無効にすると、警告が解決されます。また、次の参照を確認することもできます:https://github.com/google/google-api-ruby-client/issues/407https://github.com/trailblazer/representable/issues/195

+0

上記のような別のエラーメッセージを表示する以外に、まだ運がないのです。 – trowse

関連する問題