File: README.md

Recommend this page to a friend!
  Classes of Italo Lelis de Vietro  >  PHP Wunderlist API  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Auxiliary data
Class: PHP Wunderlist API
Manage user lists using the Wunderlist API
Author: By
Last change: Updated quickstart docs
Added many new features
Date: 5 years ago
Size: 3,431 bytes
 

Contents

Class file image Download

Wunderlist PHP SDK

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Downloads

SensioLabsInsight

Unofficial Wunderlist SDK for PHP. This library works perfectly with Wunderlist v3.

Install

composer require italolelis/wunderlist

Usage

Basic example

The SDK is pretty simple to use, here is an example of how we can access all lists:

<?php

use Wunderlist\Entity\WList;
use Wunderlist\ClientBuilder;

// Instanciate wunderlist API manager
$builder = new ClientBuilder();
$wunderlist = $builder->build('yourClientId', 'yourClientSecret', 'http://domain.com/oauth/callback');

//Here we get all lists for the authenticated user
$lists = $wunderlist->getService(WList::class)->all();

//For each list on the lists
$lists->map(function($list) {
    echo $list->getTitle();
});
    

What about all taks for a list?

<?php

use Wunderlist\Entity\Task;
use Wunderlist\Entity\WList;

//Here we get all lists for the authenticated user
$lists = $wunderlist->getService(WList::class)->all();

//For each list on the lists
$lists->map(function($list) {
    $tasks = wunderlist->getService(Task::class)->forList($list);
    $tasks->map(function($task){
        echo $task->getTitle();
    });
});

Ok, now lets create a task for a list

<?php

use Wunderlist\Entity\WList;
use Wunderlist\Entity\Task;

//Here we get all lists for the authenticated user
$lists = $wunderlist->getService(WList::class)->all();

//We get the first list
$list = $lists->first();

$task = new Task();
$task->setListID($list->getId())
    ->setTitle('Test Hello');

$wunderlist->save($task);

This is just some simple things you can do with the SDK. Whant more? please just read our documentation

Integrations

- Silex service provider - Silex Wunderlist Skeleton - Symfony WunderlistBundle

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

Documentation

More information can be found in the online documentation at http://wunderlist.readthedocs.org/.


For more information send a message to info at phpclasses dot org.