<commit_before>class Podio::CalendarEvent < ActivePodio::Base
  property :type, :string
  property :id, :integer
  property :group, :string
  property :title, :string
  property :description, :string
  property :location, :string
  property :status, :string
  property :start, :datetime, :convert_timezone => false
  property :start_date, :date
  property :start_time, :string
  property :end, :datetime, :convert_timezone => false
  property :end_date, :date
  property :end_time, :string
  property :link, :string

  class << self

    def find_all(options = {})
      list Podio.connection.get { |req|
        req.url('/calendar/', options)
      }.body
    end

    def find_all_for_space(space_id, options={})
      list Podio.connection.get { |req|
        req.url("/calendar/space/#{space_id}/", options)
      }.body
    end

    def find_summary
      response = Podio.connection.get("/calendar/summary").body
      response['today']['events'] = list(response['today']['events'])
      response['upcoming']['events'] = list(response['upcoming']['events'])
      response
    end

    def find_summary_for_space(space_id)
      response = Podio.connection.get("/calendar/space/#{space_id}/summary").body
      response['today']['events'] = list(response['today']['events'])
      response['upcoming']['events'] = list(response['upcoming']['events'])<commit_msg>Add method for app calendar<commit_after>class Podio::CalendarEvent < ActivePodio::Base
  property :type, :string
  property :id, :integer
  property :group, :string
  property :title, :string
  property :description, :string
  property :location, :string
  property :status, :string
  property :start, :datetime, :convert_timezone => false
  property :start_date, :date
  property :start_time, :string
  property :end, :datetime, :convert_timezone => false
  property :end_date, :date
  property :end_time, :string
  property :link, :string

  class << self

    def find_all(options = {})
      list Podio.connection.get { |req|
        req.url('/calendar/', options)
      }.body
    end

    def find_all_for_space(space_id, options={})
      list Podio.connection.get { |req|
        req.url("/calendar/space/#{space_id}/", options)
      }.body
    end

    def find_all_for_app(app_id, options={})
      list Podio.connection.get { |req|
        req.url("/calendar/app/#{app_id}/", options)
      }.body
    end

    def find_summary
      response = Podio.connection.get("/calendar/summary").body
      response['today']['events'] = list(response['today']['events'])
      response['upcoming']['events'] = list(response['upcoming']['events'])
      response
    end

    def find_summary_for_space(space_id)
      response = Podio.connection.get("/calendar/space/#{space_id}/summary").body
      response['today']['events'] = list(response['today']['events'])
      response['upcoming']['events'] = list(response['upcoming']['events'])
{'fraction_non_alphanumeric': 0.15247252747252749, 'fraction_numerical': 0.0, 'mean_word_length': 3.879396984924623, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7229404', 'n_tokens_mistral': 877, 'n_tokens_neox': 854, 'n_words': 189}