mamoot40 / poeditor-php-sdk
使用此简单API将您的软件连接到POEditor
dev-main
2023-02-27 21:12 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is not auto-updated.
Last update: 2024-09-25 03:10:26 UTC
README
使用此简单API将您的软件连接到POEditor
安装和用法
要求
PHP 7.4及更高版本。也应该适用于PHP 8.0。
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } }
然后运行composer install
手动安装
下载文件并包含autoload.php
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
入门
请按照安装过程进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new OpenAPI\Client\Api\ContributorsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); $api_token = 'api_token_example'; // string $id = 'id_example'; // string | The id of project $name = 'name_example'; // string | The name of contributor $email = 'email_example'; // string | The email of contributor $language = 'language_example'; // string | The language code (Required if adding a contributor) $admin = 56; // int | Set it to 1 for adding as administrator try { $result = $apiInstance->contributorsAddPost($api_token, $id, $name, $email, $language, $admin); print_r($result); } catch (Exception $e) { echo 'Exception when calling ContributorsApi->contributorsAddPost: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI相对于 https://api.poeditor.com/v2
模型
- ContributorsListResponse
- ContributorsListResponseAllOf
- ContributorsListResponseAllOfResult
- ContributorsListResponseAllOfResultContributors
- ContributorsListResponseAllOfResultPermissions
- ContributorsListResponseAllOfResultProject
- LanguagesListLong
- LanguagesListLongLanguagesInner
- LanguagesListLongResponse
- LanguagesListLongResponseAllOf
- LanguagesListShort
- LanguagesListShortLanguagesInner
- LanguagesListShortResponse
- LanguagesListShortResponseAllOf
- ProjectExportResponse
- ProjectExportResponseAllOf
- ProjectExportResponseAllOfResult
- ProjectList
- ProjectListProjectsInner
- ProjectListResponse
- ProjectListResponseAllOf
- ProjectLong
- ProjectLongProject
- ProjectSyncResponse
- ProjectSyncResponseAllOf
- ProjectUploadResponse
- ProjectUploadResponseAllOf
- ProjectViewResponse
- ProjectViewResponseAllOf
- Response
- ResponseResponse
- TermAddCommentResponse
- TermAddCommentResponseAllOf
- TermAddedResponse
- TermAddedResponseAllOf
- TermDeletedResponse
- TermDeletedResponseAllOf
- TermUpdatedResponse
- TermUpdatedResponseAllOf
- TermsFull
- TermsFullTerms
- TermsListFull
- TermsListFullResponse
- TermsListFullResponseAllOf
- TermsListFullTermsInner
- TermsListFullTermsInnerTranslation
- TermsLong
- TermsLongTerms
- TermsShortAdded
- TermsShortAddedTerms
- TermsShortComment
- TermsShortCommentTerms
- TermsShortDeleted
- TermsShortDeletedTerms
- TermsShortUpdated
- TermsShortUpdatedTerms
- TermsTranslationsResponse
- TranslationAddedResponse
- TranslationAddedResponseAllOf
- TranslationDeletedResponse
- TranslationDeletedResponseAllOf
- TranslationUpdatedResponse
- TranslationUpdatedResponseAllOf
- TranslationsLong
- TranslationsShort
- TranslationsShortAdded
- TranslationsShortDeleted
- TranslationsShortResponse
- TranslationsShortResponseAllOf
- TranslationsShortTranslations
- TranslationsShortUpdated
授权
所有端点都不需要授权。
测试
要运行测试,使用
composer install vendor/bin/phpunit
作者
关于此包
此PHP包是由OpenAPI Generator项目自动生成的
- API版本:
1.0.3
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen