<commit_before>module Pushbullet
  module API
    module Pushes
      # title - The note's title.
      # body - The note's message.
      def push_note(device_iden, title, body)
        push :note, device_iden, title: title, body: body
      end

      # title - The link's title.
      # url - The url to open.
      # body - An optional message.
      def push_link(device_iden, title, url, body)
        push :link, device_iden, title: title, url: url, body: body
      end

      # name - The place's name.
      # address - The place's address or a map search query.
      def push_address(device_iden, name, address)
        push :address, device_iden, name: name, address: address
      end

      # title - The list's title.
      # items - The list items.
      # [{text: 'lorem', checked: false}, {text: 'ipsum', checked: true}]
      def push_list(device_iden, title, items)
        push :list, device_iden, title: title, items: items
      end

      # file_name - The name of the file.
      # file_type - The file's MIME type.
      # file_url  - The url where the file can be downloaded.
      # body      - An optional message.
      def push_file(device_iden, file_name, file_path, body)
        upload_file(file_name, file_path) do |data|
          payload = {
            file_name: data['file_name'],
            file_type: data['file_type'],
            file_url:  data['file_url'],
            body:      body
          }

          push :file, device_iden, payload
        end
      end

      # push_iden - The iden of the push to delete.
      def delete_push(push_iden)
        delete "/v2/pushes/#{push_iden}"<commit_msg>Implement delete push<commit_after>module Pushbullet
  module API
    module Pushes
      # title - The note's title.
      # body - The note's message.
      def push_note(device_iden, title, body)
        push :note, device_iden, title: title, body: body
      end

      # title - The link's title.
      # url - The url to open.
      # body - An optional message.
      def push_link(device_iden, title, url, body)
        push :link, device_iden, title: title, url: url, body: body
      end

      # name - The place's name.
      # address - The place's address or a map search query.
      def push_address(device_iden, name, address)
        push :address, device_iden, name: name, address: address
      end

      # title - The list's title.
      # items - The list items.
      # [{text: 'lorem', checked: false}, {text: 'ipsum', checked: true}]
      def push_list(device_iden, title, items)
        push :list, device_iden, title: title, items: items
      end

      # file_name - The name of the file.
      # file_type - The file's MIME type.
      # file_url  - The url where the file can be downloaded.
      # body      - An optional message.
      def push_file(device_iden, file_name, file_path, body)
        upload_file(file_name, file_path) do |data|
          payload = {
            file_name: data['file_name'],
            file_type: data['file_type'],
            file_url:  data['file_url'],
            body:      body
          }

          push :file, device_iden, payload
        end
      end

      # modified_after - Request pushes modified after this timestamp.
      # cursor - Request another page of pushes (if necessary).
      def pushes(modified_after = nil, cursor = nil)
        params = {modified_after: modified_after, cursor: cursor}

        params = params.values.all?(&:nil?) ? {} : params

        get 'v2/pushes', params
      end

      # push_iden - The iden of the push to delete.
      def delete_push(push_iden)
        delete "/v2/pushes/#{push_iden}"
{'fraction_non_alphanumeric': 0.0960960960960961, 'fraction_numerical': 0.000819000819000819, 'mean_word_length': 2.0789915966386556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2985382', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1069, 'n_words': 367}