Skip to content

Conversation

@jdpedrie
Copy link
Contributor

@jdpedrie jdpedrie commented Oct 5, 2017

Most of the remaining Requester Pays methods were implemented with a discovery document update. Additional documentation has been added where appropriate, and a unit test class has been added to demonstrate that the userProject query parameter is added where appropriate.

Closes #699, #696.

@jdpedrie jdpedrie added the api: storage Issues related to the Cloud Storage API. label Oct 5, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 5, 2017
public function createNotification($topic, array $options = [])
{
$res = $this->connection->insertNotification($options + [
$res = $this->connection->insertNotification($options + array_filter([

This comment was marked as spam.

$bucket
);
function (array $bucket) use ($requesterPays) {
return new Bucket($this->connection, $bucket['name'], $bucket, $requesterPays);

This comment was marked as spam.

$name,
$response
$response,
$requesterPays

This comment was marked as spam.

@jdpedrie
Copy link
Contributor Author

@dwsupplee updated.

@jdpedrie
Copy link
Contributor Author

Copy link
Contributor

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jdpedrie! PTAL.

{
$this->connection
->insertNotification([
'userProject' => null,

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

* be either 'full' or 'noAcl'.
* @type string $fields Selector which will cause the response to only
* return the specified fields.
* @type string $userProject The user project to be used for

This comment was marked as spam.

@jdpedrie
Copy link
Contributor Author

@frankyn should be good now!

Copy link
Contributor

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jdpedrie, apologies for the delay. I have added a few questions.

*
* @param string $name The name of the bucket to request.
* @param string|bool $requesterPays If true, the current Project ID
* @param string|bool $userProject If true, the current Project ID

This comment was marked as spam.

This comment was marked as spam.

{
$this->connection
->insertNotification([
'userProject' => null,

This comment was marked as spam.

// to short circuit all the response handling and get back to the assertion with the query string.
throw new \Exception($request->getUri()->getQuery());
}
} No newline at end of file

This comment was marked as spam.

@@ -0,0 +1,430 @@
<?php

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @jdpedrie!

@dwsupplee dwsupplee merged commit 47e5839 into googleapis:master Oct 16, 2017
@jdpedrie jdpedrie deleted the storage-requester-pays-additions branch November 16, 2017 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants