long2506 / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

Calendar API - Acl update not working #242

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a acl as scope type - default, role - reader (will make the calendar 
public)
2. Now the function returns a Google_AclRule object pass the same object to 
update function of AclServiceResource with appropriate calendar id and rule id 
(default).
3. Even the update from api explorer throws a error

What is the expected output? What do you see instead?
The function should return the Google_AclRule object as success.  The function 
throws exception "Google_IOException: HTTP Error: (0) <url> malformed in 
Google_CurlIO->makeRequest() (line 128 of 
..../google-api-php-client/src/io/Google_CurlIO.php

What version of the product are you using? On what operating system?
I am updating a acl of calendar.  My operating system is ubuntu 12.04.

Original issue reported on code.google.com by dalvisad...@gmail.com on 7 Jan 2013 at 4:49

GoogleCodeExporter commented 9 years ago
Hi, can you include a code sample that demonstrates the problem? You might find 
you get a faster reponse from stackoverflow or 
https://groups.google.com/forum/embed/?place=forum/google-calendar-api as well!

Original comment by ianbar...@google.com on 22 Mar 2013 at 4:37

GoogleCodeExporter commented 9 years ago
<?php
  $acl = array(
    'scopeType' => "default",
    'role' => "reader",
  );
  $scope = new Google_AclRuleScope();
  $scope->setType($acl['scopeType']);
  $rule = new Google_AclRule();
  $rule->setScope($scope);
  $rule->setRole($acl['role']);

  $gcs = new Google_CalendarService($google_client);  //Google client object is the already authenticated object.
  $createdrule = $gcs->acl->insert('CALENDAR_ID', $rule);

  $updatedrule = $gcs->acl->update('CALENDAR_ID', 'reader', $createdrule);
?>

I also tried to update the acl using google api explorer but throws error.
I am giving a example code and not the exact code as I implemented this in 
drupal cms and am using its database to store the access token and other 
details.

Original comment by dalvisad...@gmail.com on 22 Mar 2013 at 5:53

GoogleCodeExporter commented 9 years ago
This issue tracker is now closing. Development on the Google PHP client library 
moved to GitHub with the release of the 1.0.0-alpha, and now the 1.0 branch has 
reached beta status there will be no further releases of the 0.6 branch of the 
library. 

Please take a look at the latest version on 
https://github.com/google/google-api-php-client

For information on migrating, please take a look at this guide: 
https://developers.google.com/api-client-library/php/guide/migration

For general library support please ask a question on StackOverflow: 
http://stackoverflow.com/questions/tagged/google-api-php-client

If you are looking for support with a specific API, please contact the team 
working with that API via StackOverflow or their preferred support mechanism. 

If your issue still exists with the new version of the library, please raise a 
bug in the GitHub issue tracker with a minimal code sample. 

Thanks!

Original comment by ianbar...@google.com on 22 Jan 2014 at 4:53