nodes: 0, module; 1, function_definition; 2, function_name:get_bucket; 3, parameters; 4, block; 5, identifier:self; 6, identifier:bucket; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, expression_statement; 11, expression_statement; 12, if_statement; 13, if_statement; 14, if_statement; 15, if_statement; 16, expression_statement; 17, expression_statement; 18, expression_statement; 19, return_statement; 20, identifier:marker; 21, None; 22, identifier:max_keys; 23, None; 24, identifier:prefix; 25, None; 26, comment:"""
          Get a list of all the objects in a bucket.
  
          @param bucket: The name of the bucket from which to retrieve objects.
          @type bucket: L{unicode}
  
          @param marker: If given, indicate a position in the overall
              results where the results of this call should begin.  The
              first result is the first object that sorts greater than
              this marker.
          @type marker: L{bytes} or L{NoneType}
  
          @param max_keys: If given, the maximum number of objects to
              return.
          @type max_keys: L{int} or L{NoneType}
  
          @param prefix: If given, indicate that only objects with keys
              beginning with this value should be returned.
          @type prefix: L{bytes} or L{NoneType}
  
          @return: A L{Deferred} that fires with a L{BucketListing}
              describing the result.
  
          @see: U{http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html}
          """; 27, assignment; 28, comparison_operator:marker is not None; 29, block; 30, comparison_operator:max_keys is not None; 31, block; 32, comparison_operator:prefix is not None; 33, block; 34, identifier:args; 35, block; 36, else_clause; 37, assignment; 38, assignment; 39, call; 40, identifier:d; 41, identifier:args; 42, list; 43, identifier:marker; 44, None; 45, expression_statement; 46, identifier:max_keys; 47, None; 48, expression_statement; 49, identifier:prefix; 50, None; 51, expression_statement; 52, expression_statement; 53, block; 54, identifier:details; 55, call; 56, identifier:d; 57, call; 58, attribute; 59, argument_list; 60, call; 61, call; 62, call; 63, assignment; 64, expression_statement; 65, attribute; 66, argument_list; 67, attribute; 68, argument_list; 69, identifier:d; 70, identifier:addCallback; 71, attribute; 72, attribute; 73, argument_list; 74, attribute; 75, argument_list; 76, attribute; 77, argument_list; 78, identifier:object_name; 79, binary_operator:"?" + urlencode(args); 80, assignment; 81, identifier:self; 82, identifier:_details; 83, keyword_argument; 84, keyword_argument; 85, identifier:self; 86, identifier:_submit; 87, call; 88, identifier:self; 89, identifier:_parse_get_bucket; 90, identifier:args; 91, identifier:append; 92, tuple; 93, identifier:args; 94, identifier:append; 95, tuple; 96, identifier:args; 97, identifier:append; 98, tuple; 99, string:"?"; 100, call; 101, identifier:object_name; 102, None; 103, identifier:method; 104, string:b"GET"; 105, identifier:url_context; 106, call; 107, attribute; 108, argument_list; 109, string:"marker"; 110, identifier:marker; 111, string:"max-keys"; 112, binary_operator:"%d" % (max_keys,); 113, string:"prefix"; 114, identifier:prefix; 115, identifier:urlencode; 116, argument_list; 117, attribute; 118, argument_list; 119, identifier:self; 120, identifier:_query_factory; 121, identifier:details; 122, string:"%d"; 123, tuple; 124, identifier:args; 125, identifier:self; 126, identifier:_url_context; 127, keyword_argument; 128, keyword_argument; 129, identifier:max_keys; 130, identifier:bucket; 131, identifier:bucket; 132, identifier:object_name; 133, identifier:object_name
code: def get_bucket(self, bucket, marker=None, max_keys=None, prefix=None):
          """
          Get a list of all the objects in a bucket.
  
          @param bucket: The name of the bucket from which to retrieve objects.
          @type bucket: L{unicode}
  
          @param marker: If given, indicate a position in the overall
              results where the results of this call should begin.  The
              first result is the first object that sorts greater than
              this marker.
          @type marker: L{bytes} or L{NoneType}
  
          @param max_keys: If given, the maximum number of objects to
              return.
          @type max_keys: L{int} or L{NoneType}
  
          @param prefix: If given, indicate that only objects with keys
              beginning with this value should be returned.
          @type prefix: L{bytes} or L{NoneType}
  
          @return: A L{Deferred} that fires with a L{BucketListing}
              describing the result.
  
          @see: U{http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html}
          """
          args = []
          if marker is not None:
              args.append(("marker", marker))
          if max_keys is not None:
              args.append(("max-keys", "%d" % (max_keys,)))
          if prefix is not None:
              args.append(("prefix", prefix))
          if args:
              object_name = "?" + urlencode(args)
          else:
              object_name = None
          details = self._details(
              method=b"GET",
              url_context=self._url_context(bucket=bucket, object_name=object_name),
          )
          d = self._submit(self._query_factory(details))
          d.addCallback(self._parse_get_bucket)
          return d