-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from podio/master
updating to v4.3.0
- Loading branch information
Showing
6 changed files
with
103 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
This the official PHP Client for interacting with the Podio API. All parts of the Podio API are covered in this client. See [podio.github.io/podio-php](http://podio.github.io/podio-php) for documentation. | ||
|
||
[![Build Status](https://travis-ci.org/podio/podio-php.svg?branch=4.0.0)](https://travis-ci.org/podio/podio-php) | ||
|
||
|
||
[![Join the chat at https://gitter.im/podio/podio-php](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/podio/podio-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
This file contains 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 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 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,72 @@ | ||
<?php | ||
/** | ||
* @see https://developers.podio.com/doc/flows | ||
*/ | ||
class PodioFlow extends PodioObject { | ||
public function __construct($attributes = array()) { | ||
$this->property('flow_id', 'integer', array('id' => true)); | ||
$this->property('name', 'string'); | ||
$this->property('type', 'string'); | ||
$this->property('config', 'hash'); | ||
$this->property('effects', 'hash'); | ||
|
||
$this->init($attributes); | ||
} | ||
|
||
/** | ||
* @see https://developers.podio.com/doc/flows/get-flow-by-id-26312313 | ||
*/ | ||
public static function get($flow_id) { | ||
return Podio::get("/flow/{$flow_id}")->json_body(); | ||
} | ||
|
||
/** | ||
* @see https://developers.podio.com/doc/flows/add-new-flow-26309928 | ||
*/ | ||
public static function create($ref_type, $ref_id, $attributes = array()) { | ||
return Podio::post("/flow/{$ref_type}/{$ref_id}/", $attributes); | ||
} | ||
|
||
/** | ||
* @see https://developers.podio.com/doc/flows/update-flow-26310901 | ||
*/ | ||
public static function update($flow_id, $attributes = array()) { | ||
return Podio::put("/flow/{$flow_id}", $attributes); | ||
} | ||
|
||
/** | ||
* @see https://developers.podio.com/doc/flows/delete-flow-32929229 | ||
*/ | ||
public static function delete($flow_id) { | ||
return Podio::delete("/flow/{$flow_id}"); | ||
} | ||
|
||
/** | ||
* @see https://developers.podio.com/doc/flows/get-flows-26312304 | ||
*/ | ||
public static function get_flows($ref_type, $ref_id) { | ||
return Podio::get("/flow/{$ref_type}/{$ref_id}/")->json_body(); | ||
} | ||
|
||
/** | ||
* @see https://developers.podio.com/doc/flows/get-effect-attributes-239234961 | ||
*/ | ||
public static function get_effect_attributes($ref_type, $ref_id) { | ||
return Podio::post("/flow/{$ref_type}/{$ref_id}/effect/attributes")->json_body(); | ||
} | ||
|
||
/** | ||
* @see https://developers.podio.com/doc/flows/get-flow-context-26313659 | ||
*/ | ||
public static function get_flow_context($flow_id) { | ||
return Podio::get("/flow/{$flow_id}/context/")->json_body(); | ||
} | ||
|
||
/** | ||
* @see https://developers.podio.com/doc/flows/get-possible-attributes-33060379 | ||
*/ | ||
public static function get_possible_attributes($ref_type, $ref_id) { | ||
return Podio::post("/flow/{$ref_type}/{$ref_id}/attributes/")->json_body(); | ||
} | ||
|
||
} |