<commit_before>module ThreeSeventyApi
  module Api
    # Content Api end point implementation goes here.
    # @see https://api.3seventy.com/docs/v2.0/Default/endpoints#!/content
    module Content

      # Add content.
      # 
      # @param account_id [Integer] Id of the account.
      # @param payload [Hash] Body of the content.
      # @option payload [String] Name Content name.
      # @option payload [String] Description Content description.
      # @option payload [Array<Object>] Templates (null) Template array.
      #
      # @return [Object] Newly created content object.
      def add_content(account_id, payload)
        end_point = "/account/#{account_id}/content"
        post(end_point, payload)
      end

      # Retrieve the content.
      # 
      # @param account_id [Integer] Id of the account.
      # @param content_id [Integer] Id of the content.
      # 
      # @return [Object] Content object.
       def get_content(account_id, content_id)
        end_point = "/account/#{account_id}/content/#{content_id}"
        get(end_point)
      end

      # Edit content.
      # 
      # @param account_id [Integer] Id of the account.
      # @param content_id [Integer] Id of the content.
      # @param payload [Hash] Body of the content.
      # @option payload [String] Name Content name.
      # @option payload [String] Description Content description.
      # @option payload [Array<Object>] Templates (null) Template array.
      #
      # @return [Object] Modified content object.
      def edit_content(account_id, content_id, payload)
        end_point = "/account/#{account_id}/content/#{content_id}"
        put(end_point, payload)
      end

      # Delete content.
      # 
      # @param account_id [Integer] Id of the account.
      # @param content_id [Integer] Id of the content.
      #
      # @return none.
      def delete_content(account_id, content_id)
        end_point = "/account/#{account_id}/content/#{content_id}"
        delete(end_point)
      end

      # Get all the contents assosiated with an account.
      # 
      # @param account_id [Integer] Id of the account.
      # 
      # @return [Array<Object>] List all the content. 
      def all_contents(account_id)
        end_point = "/account/#{account_id}/content"
        get(end_point)
      end
    end
  end
end<commit_msg>Content api end points implemented.<commit_after>module ThreeSeventyApi
  module Api
    # Content Api end point implementation goes here.
    # @see https://api.3seventy.com/docs/v2.0/Default/endpoints#!/content
    module Content
      # Add content.
      # 
      # @param payload [Hash] Body of the content.
      # @option payload [String] Name Content name.
      # @option payload [String] Description Content description.
      # @option payload [Array<Object>] Templates (null) Template array.
      #
      # @return [Object] Newly created content object.
      def add_content(payload)
        post(_url("content"), payload)
      end

      # Retrieve the content.
      # 
      # @param content_id [Integer] Id of the content.
      # 
      # @return [Object] Content object.
       def get_content(content_id)
        get(_url("content", content_id))
      end

      # Edit content.
      # 
      # @param content_id [Integer] Id of the content.
      # @param payload [Hash] Body of the content.
      # @option payload [String] Name Content name.
      # @option payload [String] Description Content description.
      # @option payload [Array<Object>] Templates (null) Template array.
      #
      # @return [Object] Modified content object.
      def edit_content(content_id, payload)
        put(_url("content", content_id), payload)
      end

      # Delete content.
      # 
      # @param content_id [Integer] Id of the content.
      #
      # @return none.
      def delete_content(content_id)
        delete(_url("content", content_id))
      end

      # Get all the contents assosiated with an account.
      # 
      # @param account_id [Integer] Id of the account.
      # 
      # @return [Array<Object>] List all the content. 
      def all_contents
        get(_url("content"))
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09909264565425024, 'fraction_numerical': 0.0014326647564469914, 'mean_word_length': 2.348521183053557, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '7132949', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1182, 'n_words': 370}