Giter Club home page Giter Club logo

calendart's Introduction

CalendArt

Interface to handle all your calendars through an unified API, whatever their source are (Google, Office 365, ... etc), as if it was an art. Hell yeah.

Only google calendar is currently supported !

Installation

You have multiple ways to install CalendArt. If you are unsure what to do, go with the archive release.

Archive Release

  1. Download the most recent release from the release page
  2. Unpack the archive
  3. Move the files somewhere in your project

Development version

  1. Install Git
  2. git clone git://github.com/Wisembly/CalendArt.git

Via Composer

  1. Install composer in your project: curl -s http://getcomposer.org/installer | php

  2. Create a composer.json file (or update it) in your project root:

      {
        "require": {
          "wisembly/calendArt": "~1.0"
        }
      }
  3. Install via composer : php composer.phar install

Basic Usage

As there is only Google's adapter, we're going to base these examples on this one. But it should be similar to the others one, as long as they respect the interface provided in this package.

<?php

use CalendArt\Adapter\Google\GoogleAdapter,
    CalendArt\Adapter\Google\Util\OAuth2Token;

$oauth = new OAuth2Token('your-oauth2-token', 'Bearer', 3600); // You can get a OAuth2 token on google's oauth playground
$adapter = new GoogleAdapter($oauth);

$primary = $adapter->getCalendarApi()->get('primary'); // there is always a "primary" calendar on Google
$event   = $adapter->getEventApi($primary)->getList();

var_dump($primary); // Should dump a Calendar instance, with its hydrated events

Running Tests

$ php composer.phar install --dev
$ bin/phpunit

calendart's People

Contributors

guillaumepotier avatar rgazelot avatar taluu avatar

Stargazers

 avatar

Watchers

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

Forkers

taluu scetticus

calendart's Issues

[Google] Use the original calendar for a given Event

When fetching the events, I didn't really realized the difference between creator and organizer, when it is just that the creator is the user who created the event, and the organizer seems to be the original calendar hosting this event.

So, I think I should always fetch the organizer to attach the event to the rightful calendar, if I know it.

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.