承接 opensoft/tfs-rest-api 相关项目开发

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

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

opensoft/tfs-rest-api

Composer 安装命令:

composer require opensoft/tfs-rest-api

包简介

An api wrapper for the TFS/VisualStudio REST API

README 文档

README

A simple object oriented wrapper for the Visual Studio Online / Team Foundation Server REST API in PHP 5.5

Uses Guzzle 6 for REST requests.

Installation

Installable through composer via:

$ composer require opensoft/tfs-rest-api

Basic Usage

<?php

use Opensoft\Tfs\Rest\Client;

require_once __DIR__ . '/vendor/autoload.php';

$client = new Client(
    // your tfs/vso
    'https://opensoft.visualstudio.com',
    // your collection
    'AcmeApp',
    // (optional) raw options to pass to guzzle (ntlm example here)
    [                                      
        'curl' => [
            CURLOPT_HTTPAUTH => CURLAUTH_NTLM, 
            CURLOPT_USERPWD => 'username:password'
        ]
    ]
);

// retrieve a work item by its ID
$response = $client->workItemTracking()->getWorkItem(12345);

// get the result as an array
print_r($response->asArray());

// follow hypermedia links
$response = $response->follow('workItemHistory');

print_r($response->asArray());

Caution: There are many more APIs exposed by TFS/VSO than are implemented here. We've implemented only what we've needed internally for now, and will implement more as the need arises. Feel free to submit pull requests implementing more APIs and we'll be happy to merge them.

License

Licensed under the MIT License - see the LICENSE file for details

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-04