<commit_before># @see https://developers.podio.com/doc/applications
class Podio::ApplicationField < ActivePodio::Base
  property :field_id, :integer
  property :type, :string
  property :external_id, :string
  property :config, :hash
  property :status, :string
  property :label, :string

  alias_method :id, :field_id
  delegate_to_hash :config, :description, :delta, :settings, :required?, :visible?
  delegate_to_hash :settings, :allowed_values, :referenceable_types, :allowed_currencies, :allowed_mimetypes, :options, :multiple

  class << self
    # @see https://developers.podio.com/doc/applications/get-app-field-22353
    def find(app_id, field_id)
      member Podio.connection.get("/app/#{app_id}/field/#{field_id}").body
    end

    # @see https://developers.podio.com/doc/applications/update-an-app-field-22356
    def update(app_id, field_id, attributes)
      Podio.connection.put("/app/#{app_id}/field/#{field_id}", attributes).status
    end

    # @see https://developers.podio.com/doc/applications/add-new-app-field-22354
    def create(app_id, attributes)
      Podio.connection.post("/app/#{app_id}/field/", attributes).status
    end

  end
end<commit_msg>return body instead of response<commit_after># @see https://developers.podio.com/doc/applications
class Podio::ApplicationField < ActivePodio::Base
  property :field_id, :integer
  property :type, :string
  property :external_id, :string
  property :config, :hash
  property :status, :string
  property :label, :string

  alias_method :id, :field_id
  delegate_to_hash :config, :description, :delta, :settings, :required?, :visible?
  delegate_to_hash :settings, :allowed_values, :referenceable_types, :allowed_currencies, :allowed_mimetypes, :options, :multiple

  class << self
    # @see https://developers.podio.com/doc/applications/get-app-field-22353
    def find(app_id, field_id)
      member Podio.connection.get("/app/#{app_id}/field/#{field_id}").body
    end

    # @see https://developers.podio.com/doc/applications/update-an-app-field-22356
    def update(app_id, field_id, attributes)
      Podio.connection.put("/app/#{app_id}/field/#{field_id}", attributes).body
    end

    # @see https://developers.podio.com/doc/applications/add-new-app-field-22354
    def create(app_id, attributes)
      Podio.connection.post("/app/#{app_id}/field/", attributes).body
    end

  end
end
{'fraction_non_alphanumeric': 0.14080944350758853, 'fraction_numerical': 0.012647554806070826, 'mean_word_length': 4.455172413793103, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '2540659', 'n_tokens_mistral': 807, 'n_tokens_neox': 778, 'n_words': 145}