codegyan/client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

codegyan/client

最新稳定版本:v0.1.1

Composer 安装命令:

composer require codegyan/client

包简介

Codegyan SDK for interacting with the Codegyan API

README 文档

README

Codegyan PHP

GitHub Workflow Status (main) Total Downloads Latest Version PHP Version License

Codegyan PHP SDK for interacting with the Codegyan API. If you or your business relies on this package, it's important to support the developers who have contributed their time and effort to create and maintain this valuable tool:

Table of Contents

Get Started

Requires PHP 8.1+

First, install Codegyan via the Composer package manager:

composer require codegyan/client

Then, interact with Codegyan's API:

use Codegyan\Client;

// Your API key and client ID
$apiKey = '';
$clientId = '';

// Create a Client instance
$client = new Client($apiKey, $clientId);

$domain = "codegyan.in"; // Domain Here 

try {
    $result = $client->toolsApiClient->domainAvailability($domain);
    echo "$result\n";
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}

Usage

Before using the Pakage, you need to obtain an API key and client ID from Codegyan. Follow these steps to get your API credentials:

  1. Sign Up/Login: If you don't have an account, sign up for a Codegyan account. If you already have an account, log in to your dashboard.

  2. Get Credentials: Once logged in, navigate to the Developer Console or API settings in your account dashboard. Here, you will find your API key and client ID. Copy these credentials and use them when initializing the Pakage in your code.

Compiler Resource

The Compiler resource allows you to compile code snippets. Here's an example of how to use it:

use Codegyan\Client;

// Your API key and client ID
$apiKey = '';
$clientId = '';

// Create a Client instance
$client = new Client($apiKey, $clientId);

$lang = "python3";
$code = "print('Hello World')";

try {
    $result = $client->compilerApiClient->compile($lang, $code);
    echo "$result\n";
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}

Tools Resource

The Tools resource provides various utility functions. Here's an example of how to use it:

use Codegyan\Client;

// Your API key and client ID
$apiKey = '';
$clientId = '';

// Create a Client instance
$client = new Client($apiKey, $clientId);

$domain = "example.com";

try {
    $result = $client->toolsApiClient->domainAvailability($domain);
    echo "$result\n";
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}

Troubleshooting

If you encounter any issues or have any questions, please feel free to reach out to our support team at support@codegyan.com.

Testing

We highly recommend testing your integration with CodeGyan's PHP SDK to ensure its correctness and reliability. You can use PHPUnit or any other testing framework of your choice to write and execute tests for your application.

If you haven't already installed PHPUnit, you can do so by running:

composer require --dev phpunit/phpunit

Once PHPUnit is installed, you can run your tests using the following command:

vendor/bin/phpunit

This command will execute all tests located in the tests directory of your project.

Note : Make sure to write tests that cover various use cases and edge cases of your integration with the CodeGyan SDK to ensure robustness.

Services

For more information about CodeGyan's services, please visit our website.

Codegyan PHP SDK is an open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固