Sha256: 761cf67d853b25001e3d4814b034839390fef364046cf3baf45bc5c96d4547a7

Contents?: true

Size: 705 Bytes

Versions: 13

Compression:

Stored size: 705 Bytes

Contents

module Fog
  module Google
    class Pubsub
      class Real
        # Delete a topic on the remote service.
        #
        # @param topic_name [#to_s] name of topic to delete
        # @see https://cloud.google.com/pubsub/reference/rest/v1/projects.topics/delete
        def delete_topic(topic_name)
          api_method = @pubsub.projects.topics.delete
          parameters = {
            "topic" => topic_name.to_s
          }

          request(api_method, parameters)
        end
      end

      class Mock
        def delete_topic(topic_name)
          data[:topics].delete(topic_name)

          status = 200
          build_excon_response(nil, status)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.5.5 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.5.4 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.5.3 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.5.2 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.5.1 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.5.0 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.4.2 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.4.1 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.4.0 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.3.2 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.3.1 lib/fog/google/requests/pubsub/delete_topic.rb
fog-google-0.3.0 lib/fog/google/requests/pubsub/delete_topic.rb