承接 bartosz-maciaszek/php-rtm 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bartosz-maciaszek/php-rtm

Composer 安装命令:

composer require bartosz-maciaszek/php-rtm

包简介

Remember The Milk API client for PHP

README 文档

README

Build Status

Basic information

This library is created to simplify communication with Remember The Milk API. It provides simple, object-oriented interface for PHP programmers. For list of Remember The Milk API methods see here. Each group of methods has its own service class located in src/Rtm/Service/ directory.

Installation

The easiest way to start using php-rtm library is to add it as requirement to your composer.json file:

"bartosz-maciaszek/php-rtm": "dev-master"

And update your composer dependencies.

Alternatively, you can clone this repo manually:

git clone git://github.com/bartosz-maciaszek/php-rtm.git

Basic usage

To call any method from API you simply need to create Rtm class instance and service object and then push some basic information like your API key and secret. Additionally, you need to acquire Auth Token from Remember The Milk. To do that, user has to authorize your app. See sample-app/rtm.php file for details, it is explained step by step.

<?php

use Rtm\Rtm;

$rtm = new Rtm;
$rtm->setApiKey('Your API key');
$rtm->setSecret('Your secret');
$rtm->setAuthToken('Your Auth Token from RTM');

$taskService = $rtm->getService(Rtm::SERVICE_TASKS);
$taskList = $taskService->getList();

Response from API is wrapped in handy class Rtm\DataContainer which gives you ability to make method chains like $response->getUser()->getName() as it supports recurrency. To review its code and unit tests see src/Rtm/DataContainer.php and tests/RtmTest/DataContainerTest.php. You can easily convert this object into an array or json string by invoking toArray() or toJson() method, respectively.

Unit tests

All unit tests are located in tests/ directory. You can run them all by invoking command phpunit in main directory (where phpunit.xml is located) or individually, by invoking phpunit tests/path/to/test/class, eg. phpunit tests/RtmTest/RtmTest.php.

Sample application

Sample application that uses this library is available in sample-app/ directory.

统计信息

  • 总下载量: 556
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固