Skip to content

Commit

Permalink
Add getSwik() example in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
JuniorFt committed Feb 9, 2017
1 parent 8018134 commit dce290d
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if ($result['status'] == 'ok') {
// Create a swik object
$swik = new Swik();

// Set the Id you used to create it
// Set the Swik Id (yours or the one from Swikly)
$swik->setSwikId("YOUR_ID");

// Deleting the swik
Expand Down Expand Up @@ -128,3 +128,27 @@ if ($result['status'] == 'ok') {
echo "Error = " . $result['message'];
}
```

### Get Swik

```PHP
<?php

// Create a swik object
$swik = new Swik();

// Set the Swik Id (yours or the one from Swikly)
$swik->setSwikId("YOUR_ID");

// Get the list of your swiks
$result = $swkAPI->getSwik($swik);

// Print result of the operation
if ($result['status'] == 'ok') {
echo "Swik detail = ";
print_r($result['swik']);
} else {
echo "Failed getting the swik list";
echo "Error = " . $result['message'];
}
```

0 comments on commit dce290d

Please sign in to comment.