Sha256: 80493d93473d29bce860f00dd2890936f826decc4e76b652cf14342dfbf9ccec

Contents?: true

Size: 891 Bytes

Versions: 10

Compression:

Stored size: 891 Bytes

Contents

module Fog
  module Storage
    class GoogleJSON
      class Real
        # Retrieves a list of buckets for a given project.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash> - Hash of bucket items
        #     * 'kind'<~String> - The kind of item this is (storage#buckets)
        #     * 'items'<~Array> - The array of items.
        #
        # ==== See Also
        # https://cloud.google.com/storage/docs/json_api/v1/buckets/list
        # TODO: check if very large lists require working with nextPageToken
        def list_buckets
          api_method = @storage_json.buckets.list
          parameters = {
            "project" => @project
          }

          request(api_method, parameters)
        end
      end
      class Mock
        def list_buckets
          Fog::Mock.not_implemented
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.5.5 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.5.4 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.5.3 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.5.2 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.5.1 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.5.0 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.4.2 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.4.1 lib/fog/storage/google_json/requests/list_buckets.rb
fog-google-0.4.0 lib/fog/storage/google_json/requests/list_buckets.rb