承接 nkmani/netstorage-cms-api 相关项目开发

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

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

nkmani/netstorage-cms-api

最新稳定版本:v0.0.2

Composer 安装命令:

composer require nkmani/netstorage-cms-api

包简介

A lightweight PHP client designed to interact with the Akamai NetStorage Usage and Configuration APIs.

README 文档

README

Latest Version on Packagist Total Downloads License

A lightweight PHP client for interacting with the Akamai NetStorage Usage API. This package simplifies the process of managing files on Akamai NetStorage by handling authentication signatures and providing a clean interface for common operations.

Features

  • Comprehensive File Operations: Support for dir, list, stat, du, download, and delete actions.
  • Automated Authentication: Handles the generation of complex X-Akamai-ACS-Auth-Data and X-Akamai-ACS-Auth-Sign headers.
  • Guzzle Integration: Built on top of Guzzle 7 for reliable HTTP networking.
  • PSR-4 Compliant: Easy to integrate into modern PHP projects.

Installation

You can install the package via Composer:

composer require nkmani/netstorage-cms-api

Requirements

  • PHP >= 8.2
  • Guzzle HTTP Client ^7.0

Configuration

The client requires several Akamai-specific credentials. You can manage these using environment variables:

  • KEY: Your NetStorage HTTP API key.
  • CP_CODE: Your Content Provider code.
  • DOMAIN_PREFIX: The prefix for your NetStorage domain.
  • UPLOAD_ACCOUNT_ID: Your Akamai upload account ID.

Usage

Basic Setup

use NetStorage\UsageAPI\Actions;

$config = [
    "key" => 'your-api-key',
    "cpCode" => 'your-cp-code',
    "domainPrefix" => 'your-domain-prefix',
    "uploadAccountId" => 'your-upload-account-id',
];

$client = new Actions($config);

Examples

List Directory Contents

$response = $client->list(["path" => "folder_name"]);
echo $response->getBody()->getContents();

Check File Information (Stat)

$response = $client->stat(["path" => "path/to/file.txt"]);
echo $response->getBody()->getContents();

Download a File

$response = $client->download(["path" => "path/to/file.txt"]);
echo $response->getBody()->getContents();

Get Disk Usage (DU)

$response = $client->du(["path" => "folder_name"]);
echo $response->getBody()->getContents();

Development

To run tests or contribute to the package:

  1. Clone the repository.
  2. Install development dependencies: composer install.
  3. Copy .env.example to .env and fill in your credentials.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固