* Copyright 2015 Chris Schalenborgh <*****@*****.**> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\Brands; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-NL')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); //$brands = new Brands('N12'); $brands = new Brands(); $formattedResponse = $zalandoPHP->runOperation($brands); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
* Copyright 2015 Chris Schalenborgh <*****@*****.**> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\Facets; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-NL')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); //$facets = new Facets('category=fitness-kinderen'); $facets = new Facets('brandFamily=C70'); $formattedResponse = $zalandoPHP->runOperation($facets); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
/* * Copyright 2015 Chris Schalenborgh <*****@*****.**> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\ArticlesReviewsSummaries; $conf = new GenericConfiguration(); try { $conf->setLocale('de-DE')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); $reviews = new ArticlesReviewsSummaries('L8381D00F-G11'); $formattedResponse = $zalandoPHP->runOperation($reviews); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
* You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\Articles; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-BE')->setClientName('zalando-php-wrapper')->setResponseType('array')->setTimeout(12)->setConnectionTimeout(45); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); $articles = new Articles(); //$articles->setColor('red,green'); //$articles->setBrand('BE1,ME1'); //$articles->setPage(3); //$articles->setPageSize(5); $articles->setCategory('baby-accessoires,baby-accessoires-promo,babys-schoenen,babys-schoenen-promo,babyslaapzak,babyslaapzak-promo,babyslofjes,babyslofjes-promo,kinderkleding-baby-ondergoed-rompers,kinderkleding-baby-ondergoed-rompers-promo,luxe-baby-accessoires'); $formattedResponse = $zalandoPHP->runOperation($articles); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
/* * Copyright 2015 Chris Schalenborgh <*****@*****.**> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\Domains; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-NL')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); $domains = new Domains(); $formattedResponse = $zalandoPHP->runOperation($domains); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
* you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\Categories; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-NL')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); $categories = new Categories('fitness-kinderen'); $categories->setTargetGroup('all'); //$categories->setName('heel'); $categories->setOutlet(false); //$categories->setType('default'); $formattedResponse = $zalandoPHP->runOperation($categories); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
* * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\ArticlesUnits; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-NL')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); $units = new ArticlesUnits('IC143F01H-M11'); $formattedResponse = $zalandoPHP->runOperation($units); echo '<pre>'; print_r($formattedResponse); echo '</pre>'; echo '<hr />'; $units = new ArticlesUnits('IC143F01H-M11', 'IC143F01H-M110176000'); $formattedResponse = $zalandoPHP->runOperation($units); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
/* * Copyright 2015 Chris Schalenborgh <*****@*****.**> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\ArticlesMedia; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-NL')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); $media = new ArticlesMedia('IC143F01H-M11'); $formattedResponse = $zalandoPHP->runOperation($media); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
/** * @expectedException Exception */ public function testZalandoPHPWithoutConfig() { $operation = new Articles(); $zalando = new ZalandoPHP(); $zalando->runOperation($operation); }
* Copyright 2015 Chris Schalenborgh <*****@*****.**> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\Filters; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-NL')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); $filters = new Filters('ageGroup'); //$filters = new Filters(); $formattedResponse = $zalandoPHP->runOperation($filters); echo '<pre>'; print_r($formattedResponse); echo '</pre>';
* Copyright 2015 Chris Schalenborgh <*****@*****.**> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'bootstrap.php'; use ZalandoPHP\ZalandoPHP; use ZalandoPHP\Configuration\GenericConfiguration; use ZalandoPHP\Operations\Recommendations; $conf = new GenericConfiguration(); try { $conf->setLocale('nl-NL')->setClientName('zalando-php-wrapper')->setResponseType('array'); } catch (\Exception $e) { echo $e->getMessage(); } $zalandoPHP = new ZalandoPHP($conf); $articleIds = 'JA222O0KY-C12,D1843F008-M11'; $recommendations = new Recommendations($articleIds); $formattedResponse = $zalandoPHP->runOperation($recommendations); echo '<pre>'; print_r($formattedResponse); echo '</pre>';