私はICSファイルを解析する方法を知っています:
# Open a file or pass a string to the parser cal_file = File.open("single_event.ics") # Parser returns an array of calendars because a single file # can have multiple calendars. cals = Icalendar.parse(cal_file)
しかし、http URLからICSを解析する必要があります(例: http://test.com/events.ics)。
これどうやってするの?
それはあなたが探しているものですか?
require 'net/http' cal_file=(Net::HTTP.get 'test.com', '/single_event.ics') cals = Icalendar.parse(cal_file)