Giter VIP home page Giter VIP logo

caldavclient's People

Contributors

gregjoy1 avatar infostreams avatar scrutinizer-auto-fixer avatar smarcet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caldavclient's Issues

Update sabre to latest?

Hi there,

You're package has sabre/uri at 1.2 and sabre/xml at 1.5.
Is there a reason why? For both there is a way newer 2.x release.

As my project uses sabre/dav at ^4.0.3 which requires sabre/xml at ^2.1 and
sabre/vobject at ^4.3.0 which requires sabre/xml at ^2.1 im not able to use this awesome package.

Documentation?

Hi any documentation on how to connect to a remote CalDAV server?
any code sample?

Not able to get calendar home

Hi there

I am currently trying to get events from iCloud to my application. Since some month I am having issues getting the calendars from iCloud (maybe they changed something on their side). So I wanted to try out this lib. However, it seems to be failing on the same code:

        self::$client = new CalDavClient(
            'https://p56-caldav.icloud.com/',
            '[email protected]',
            'yxxx-xxxx-xxxx-xxxx'
        );

        // this is true
        $valid = self::$client->isValidServer();

        // get principal returns a valid url
        $res = self::$client->getUserPrincipal();
        $principal_url = $res->getPrincipalUrl();
       
       // here it fails: 
       $calendar_home = self::$client->getCalendarHome($principal_url);

A NotFoundResourceException is thrown. Are you guys able to get your calendar home? Any idea why it does not work for me? (tried a dozen of iCloud accounts now).

Getting events results in "500 Internal Server Error"

Thank you very much for your support on my last issue. I am now trying to receive events from a calendar, but it always results in an error. Here is my code:

$res = self::$client->getUserPrincipal();
$principal_url = $res->getPrincipalUrl();
$calendar_home = self::$client->getCalendarHome($principal_url);
$calendar_home_url = $calendar_home->getCalendarHomeSetUrl();

$start = new \DateTime('-1 week');
$end = new \DateTime('+ 1 week');

$filter = new CalendarQueryFilter(true, false, $start, $end);

// this produces this url: https://p56-caldav.icloud.com/2xxxxx427/calendars/F398F1E6-xxxx-4BEF-A15D-BBF5B5BB8537
$events = self::$client->getEventsByQuery($calendar_home_url . self::$calendar_id, $filter);

Error:

GuzzleHttp/Exception/ServerException
Server error: `REPORT https://p56-caldav.icloud.com/2xxxxx427/calendars/F398F1E6-xxxx-4BEF-A15D-BBF5B5BB8537` resulted in a `500 Internal Server Error` response

Am I doing something wrong here? The client is correctly initialized and valid.

Thank you very much for your support, I will give something back to you once this works.

iCloud not supported anymore?

Hi @smarcet

We are experiencing some issues since some days with iCloud. Whenever we try to authenticate a user with the following code, an exception is thrown. It was working before and we didn't change anything. Maybe Apple did?

public static function auth($username, $password, $user_id, $calendar_id) {
        self::$client = null;
        self::$nearestServer = null;

        self::$client = new CalDavClient(
            'https://p01-caldav.icloud.com:443',
            $username,
            $password
        );

        self::$calendarId = $calendar_id;
        self::$calendarHome = self::getCalendarHome();

        return self::$client->isValidServer();
    }

Throws this error:
CalDAVClient\Facade\Exceptions\UserUnAuthorizedException: in /Applications/MAMP/htdocs/calenso/vendor/smarcet/caldavclient/src/Facade/CalDavClient.php on line 182

Do you have any idea why this could happen? We are using the app-specific-passwords that can be generated by Apple.

Thanks for your feedback.

Cheers
Patrick

Status of maintainance

Hello @smarcet

thanks for this nice package.
As others have noted (e.g. #21 and #22) to be really useful it need some updates here and there.
If you have no time to work on it, would you be willing to review a clean PR that updates such dependencies?

Thanks.

UserUnAuthorizedException for getUserPrincipal() after update from version 1.1.2 to 1.1.6

Hey there

We updated the lib from 1.1.2 to 1.1.6, now our function for getting UserPrincipal and PrincipalUrl fails. The UserUnAuthorizedException gets thrown in CalDavClient.php ond the function getUserPrincipal().

Can someone tell us what changed in this request for getting getUserPrincipal and getPrincipalUrl

    public static function getCalendarHome() {
        $res = self::$client->getUserPrincipal();
        $principal_url = $res->getPrincipalUrl();
        $calendar_home = self::$client->getCalendarHome($principal_url);
        self::$nearestServer = $calendar_home->getRealCalDAVHost();
        return $calendar_home->getCalendarHomeSetUrl();
    }

Error-Message in stack: Error: Call to undefined method CalDAVClient\Facade\Responses\UserPrincipalResponse::getPrincipalUrl()

Thanks in advance
Marvin

refactoring of unit test

unit tests need a refactoring, bc they can run individually code its making assumption that run from start to end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.