Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alanpilloud committed Apr 9, 2019
1 parent c0732a2 commit 87549c0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* SDK
* [Démarrage](/sdk/demarrage.md)
* [Recherche](/sdk/recherche.md)
* [Object Collection](/sdk/objectCollection.md)
* [Détail d'objet](/sdk/objet.md)

* API
Expand Down
11 changes: 2 additions & 9 deletions docs/sdk/demarrage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,8 @@ Ajoutez ce package à votre fichier composer.json
"repositories": [
...
{
"type": "package",
"package": {
"name": "publimmopro/phpsdk",
"version": "0.1.0",
"dist": {
"type": "zip",
"url": "https://github.com/alanpilloud/publimmopro-sdk-php/archive/master.zip"
}
}
"type": "vcs",
"url": "[email protected]:alanpilloud/publimmopro-sdk-php.git"
}
...
],
Expand Down
3 changes: 3 additions & 0 deletions docs/sdk/objectCollection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Object Collection

`PublimmoPro\ObjectCollection` est une classe représentant une liste d'objets obtenue lors d'une recherche.
4 changes: 3 additions & 1 deletion docs/sdk/recherche.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Recherche

```php
use \PublimmoPro\Client;

$Client = new Client('2121313', 'unecle');

$Client->setType(Client::PARKING)
->setDisponiblite(AVAILABILITY_IS_AVAILABLE)
->setDisponiblite(Client::AVAILABILITY_IS_AVAILABLE)
->query();
```

Expand Down
3 changes: 2 additions & 1 deletion src/PublimmoPro/ObjectCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public function get()
*
* @return mixed false or ObjectCollection
*/
public function filter(string $filter_type, $objects_to_filter){
public function filter(string $filter_type, $objects_to_filter)
{
if (empty($objects_to_filter)){
return false;
}
Expand Down
17 changes: 17 additions & 0 deletions tests/ObjectCollection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
use PHPUnit\Framework\TestCase;
use \PublimmoPro\ObjectCollection;

final class ObjectCollectionTest extends TestCase
{
private $queryResults;

public function setUp(): void
{
$this->queryResults = file_get_contents('resultdata.json');
}

public function testConstantsAreCorrectlySet(): void
{
}
}

0 comments on commit 87549c0

Please sign in to comment.