-
Notifications
You must be signed in to change notification settings - Fork 57
Feature/469 add biconnector v3 #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Algonexys
wants to merge
20
commits into
bitrix24:v3-dev
Choose a base branch
from
Algonexys:feature/469-add-biconnector-v3
base: v3-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
af6a265
This is the first implementation for biconnector.connector methods
Algonexys 0f38abe
Fix list method parameters and uses lowercase id
Algonexys a03f5b5
Fix the fields for the add connector method
Algonexys d5ff82d
Fix adding connector
Algonexys 6eb3143
Done biconnector.connector
Algonexys 87a8298
Change author email
Algonexys 51fb4bb
This is the first implementation for biconnector.source methods
Algonexys 64cbcc1
Add the page parameter to the list method, and minor fix
Algonexys 0f48813
Change parameters of connector and source tests
Algonexys bebede0
Fix biconnector.source.update test. Done biconnector.source
Algonexys 3d867ad
Add Dataset service for biconnector.dataset.* support (#469)
Algonexys 9f8c651
Remove biconnector task plan
Algonexys ceaa9cc
Fix list method parameters and use lowercase id for biconnector.datas…
Algonexys 61f7dcc
Add the values to the fields of the source and dataset methods
Algonexys c80b2a0
Change the values to the fields of the dataset methods
Algonexys 19d0d85
Skip biconnector tests that require additional external services
Algonexys ae0c8e7
Merge branch 'v3-dev' into feature/469-add-biconnector-v3
Algonexys 699428c
Minor fix
Algonexys b5f9815
Merge branch 'v3-dev' into feature/469-add-biconnector-v3
Algonexys 8f0a4f9
Move AbstractItem to AbstractAnnotatedItem
Algonexys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * This file is part of the bitrix24-php-sdk package. | ||
| * | ||
| * © Dmitriy Ignatenko <algonexys@gmail.com> | ||
| * | ||
| * For the full copyright and license information, please view the MIT-LICENSE.txt | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Bitrix24\SDK\Services\Biconnector; | ||
|
|
||
| use Bitrix24\SDK\Attributes\ApiServiceBuilderMetadata; | ||
| use Bitrix24\SDK\Core\Credentials\Scope; | ||
| use Bitrix24\SDK\Services\AbstractServiceBuilder; | ||
| use Bitrix24\SDK\Services\Biconnector\Connector\Batch as ConnectorBatch; | ||
| use Bitrix24\SDK\Services\Biconnector\Connector\Service\Batch; | ||
| use Bitrix24\SDK\Services\Biconnector\Connector\Service\Connector; | ||
| use Bitrix24\SDK\Services\Biconnector\Dataset\Batch as DatasetBatch; | ||
| use Bitrix24\SDK\Services\Biconnector\Dataset\Service\Batch as DatasetServiceBatch; | ||
| use Bitrix24\SDK\Services\Biconnector\Dataset\Service\Dataset; | ||
| use Bitrix24\SDK\Services\Biconnector\Source\Batch as SourceBatch; | ||
| use Bitrix24\SDK\Services\Biconnector\Source\Service\Batch as SourceServiceBatch; | ||
| use Bitrix24\SDK\Services\Biconnector\Source\Service\Source; | ||
|
|
||
| #[ApiServiceBuilderMetadata(new Scope(['biconnector']))] | ||
| class BiconnectorServiceBuilder extends AbstractServiceBuilder | ||
| { | ||
| /** | ||
| * Get the Connector service | ||
| * | ||
| * Uses a specialized ConnectorBatch to handle biconnector.connector.* REST API differences: | ||
| * - list uses 'page' parameter (page number) instead of standard 'start' (offset) | ||
| * - delete uses lowercase 'id' instead of 'ID' | ||
| */ | ||
| public function connector(): Connector | ||
| { | ||
| if (!isset($this->serviceCache[__METHOD__])) { | ||
| // Use specialized Batch for Connector to ensure correct REST parameter mapping | ||
| $connectorBatch = new ConnectorBatch( | ||
| $this->core, | ||
| $this->log | ||
| ); | ||
| $this->serviceCache[__METHOD__] = new Connector( | ||
| new Batch($connectorBatch, $this->log), | ||
| $this->core, | ||
| $this->log | ||
| ); | ||
| } | ||
|
|
||
| return $this->serviceCache[__METHOD__]; | ||
| } | ||
|
|
||
| /** | ||
| * Get the Dataset service | ||
| * | ||
| * Uses a specialized DatasetBatch to handle biconnector.dataset.* REST API differences: | ||
| * - list uses 'page' parameter (page number) instead of standard 'start' (offset) | ||
| * - delete uses lowercase 'id' instead of 'ID' | ||
| */ | ||
| public function dataset(): Dataset | ||
| { | ||
| if (!isset($this->serviceCache[__METHOD__])) { | ||
| $datasetBatch = new DatasetBatch( | ||
| $this->core, | ||
| $this->log | ||
| ); | ||
| $this->serviceCache[__METHOD__] = new Dataset( | ||
| new DatasetServiceBatch($datasetBatch, $this->log), | ||
| $this->core, | ||
| $this->log | ||
| ); | ||
| } | ||
|
|
||
| return $this->serviceCache[__METHOD__]; | ||
| } | ||
|
|
||
| /** | ||
| * Get the Source service | ||
| * | ||
| * Uses a specialized SourceBatch to handle biconnector.source.* REST API differences: | ||
| * - delete uses lowercase 'id' instead of 'ID' | ||
| */ | ||
| public function source(): Source | ||
| { | ||
| if (!isset($this->serviceCache[__METHOD__])) { | ||
| $sourceBatch = new SourceBatch( | ||
| $this->core, | ||
| $this->log | ||
| ); | ||
| $this->serviceCache[__METHOD__] = new Source( | ||
| new SourceServiceBatch($sourceBatch, $this->log), | ||
| $this->core, | ||
| $this->log | ||
| ); | ||
| } | ||
|
|
||
| return $this->serviceCache[__METHOD__]; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to. 3.3.0 release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done