Skip to content

feat(php): Model cleaning #137

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

Merged
merged 7 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clients/algoliasearch-client-php/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

docs/**
test/**
lib/Model/**
lib/Model/

.travis.yml
phpunit.xml.dist
Expand Down
51 changes: 15 additions & 36 deletions clients/algoliasearch-client-php/lib/Api/AbtestingApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,11 @@ public function getClientConfig()
}

/**
* Operation addABTests
*
* Creates a new A/B test with provided configuration.
*
* @param \Algolia\AlgoliaSearch\Model\ABTesting\AddABTestsRequest $addABTestsRequest addABTestsRequest (required)
*
* @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @param array $addABTestsRequest addABTestsRequest (required)
*
* @return \Algolia\AlgoliaSearch\Model\ABTesting\ABTestResponse|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase
* @return array<string, mixed>
*/
public function addABTests($addABTestsRequest)
{
Expand All @@ -117,17 +112,13 @@ public function addABTests($addABTestsRequest)

return $this->sendRequest('POST', $resourcePath, $queryParams, $httpBody);
}

/**
* Operation deleteABTest
*
* Deletes the A/B Test.
*
* @param int $id The A/B test ID. (required)
* @param int $id The A/B test ID. (required)
*
* @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response
* @throws \InvalidArgumentException
*
* @return \Algolia\AlgoliaSearch\Model\ABTesting\ABTestResponse|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase
* @return array<string, mixed>
*/
public function deleteABTest($id)
{
Expand All @@ -152,17 +143,13 @@ public function deleteABTest($id)

return $this->sendRequest('DELETE', $resourcePath, $queryParams, $httpBody);
}

/**
* Operation getABTest
*
* Returns metadata and metrics for A/B test id.
*
* @param int $id The A/B test ID. (required)
* @param int $id The A/B test ID. (required)
*
* @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response
* @throws \InvalidArgumentException
*
* @return \Algolia\AlgoliaSearch\Model\ABTesting\ABTest|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase
* @return array<string, mixed>
*/
public function getABTest($id)
{
Expand All @@ -187,18 +174,14 @@ public function getABTest($id)

return $this->sendRequest('GET', $resourcePath, $queryParams, $httpBody);
}

/**
* Operation listABTests
*
* Fetch all existing A/B tests for App that are available for the current API Key.
*
* @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0)
* @param int $limit Number of records to return. Limit is the size of the page. (optional, default to 10)
*
* @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0)
* @param int $limit Number of records to return. Limit is the size of the page. (optional, default to 10)
*
* @return \Algolia\AlgoliaSearch\Model\ABTesting\ListABTestsResponse|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase
* @return array<string, mixed>
*/
public function listABTests($offset = 0, $limit = 10)
{
Expand Down Expand Up @@ -228,17 +211,13 @@ public function listABTests($offset = 0, $limit = 10)

return $this->sendRequest('GET', $resourcePath, $queryParams, $httpBody);
}

/**
* Operation stopABTest
*
* Marks the A/B test as stopped.
*
* @param int $id The A/B test ID. (required)
*
* @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @param int $id The A/B test ID. (required)
*
* @return \Algolia\AlgoliaSearch\Model\ABTesting\ABTestResponse|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase|\Algolia\AlgoliaSearch\Model\ABTesting\ErrorBase
* @return array<string, mixed>
*/
public function stopABTest($id)
{
Expand Down
Loading