定制 kevbaldwyn/newrelic-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kevbaldwyn/newrelic-api

Composer 安装命令:

composer require kevbaldwyn/newrelic-api

包简介

A simple php wrapper for new relics api

README 文档

README

Simple php wrapper for the New Relic api, based on https://gist.github.com/HarryR/3177007

##Installation With Composer

"require": {
    ...
    "kevbaldwyn/newrelic-api": "dev-master"
    ...
}

Composer Update:

$ composer update kevbaldwyn/newrelic-api

##Usage Instantiate the ApiClient with your credentials:

use KevBaldwyn\NewRelicApi\ApiClient;

$api = new ApiClient('api-key', 'account-id');

Create a request object and call it:

// in this case send a deployment
$req = $api->sendDeployment('app-id', 'User Name', 'Description', 'Change log', 'version');
$api->call($req);

The call method returns an instance of GuzzleHttp\Message\Response so that can be interrogated to get the response data ie:

$res = $api->call($req);

// check response code
if($res->getStatusCode() == 200) {
    $xml = $res->xml();
}

##Available wrapper methods

  • getApplications()
  • getSummary()
  • listMetrics()
  • getData()
  • sendDeployment()

Other calls can be made by manually building a request using buildRequest and then calling it ie:

$req = $api->buildRequest($endpoint, $method, $data);
$api->call($req);

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固