@@ -6,78 +6,78 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ActivityParameters extends Common |
| 8 | 8 | { |
| 9 | - public $route_id; |
|
| 10 | - public $device_id; |
|
| 11 | - public $member_id; |
|
| 12 | - public $team; |
|
| 13 | - public $limit; |
|
| 14 | - public $offset; |
|
| 15 | - public $start; |
|
| 16 | - public $end; |
|
| 17 | - public $activity_type; |
|
| 18 | - public $activity_message; |
|
| 9 | + public $route_id; |
|
| 10 | + public $device_id; |
|
| 11 | + public $member_id; |
|
| 12 | + public $team; |
|
| 13 | + public $limit; |
|
| 14 | + public $offset; |
|
| 15 | + public $start; |
|
| 16 | + public $end; |
|
| 17 | + public $activity_type; |
|
| 18 | + public $activity_message; |
|
| 19 | 19 | |
| 20 | - public $activity_id; |
|
| 21 | - public $activity_timestamp; |
|
| 22 | - public $route_destination_id; |
|
| 23 | - public $note_id; |
|
| 24 | - public $member; |
|
| 25 | - public $note_type; |
|
| 26 | - public $note_contents; |
|
| 27 | - public $route_name; |
|
| 28 | - public $note_file; |
|
| 29 | - public $destination_name; |
|
| 30 | - public $destination_alias; |
|
| 20 | + public $activity_id; |
|
| 21 | + public $activity_timestamp; |
|
| 22 | + public $route_destination_id; |
|
| 23 | + public $note_id; |
|
| 24 | + public $member; |
|
| 25 | + public $note_type; |
|
| 26 | + public $note_contents; |
|
| 27 | + public $route_name; |
|
| 28 | + public $note_file; |
|
| 29 | + public $destination_name; |
|
| 30 | + public $destination_alias; |
|
| 31 | 31 | |
| 32 | - public static function fromArray(array $params) |
|
| 33 | - { |
|
| 34 | - $activityparameters = new ActivityParameters(); |
|
| 32 | + public static function fromArray(array $params) |
|
| 33 | + { |
|
| 34 | + $activityparameters = new ActivityParameters(); |
|
| 35 | 35 | |
| 36 | - foreach ($params as $key => $value) { |
|
| 37 | - if (property_exists($activityparameters, $key)) { |
|
| 38 | - $activityparameters->{$key} = $value; |
|
| 39 | - } |
|
| 40 | - } |
|
| 36 | + foreach ($params as $key => $value) { |
|
| 37 | + if (property_exists($activityparameters, $key)) { |
|
| 38 | + $activityparameters->{$key} = $value; |
|
| 39 | + } |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - return $activityparameters; |
|
| 43 | - } |
|
| 42 | + return $activityparameters; |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - public static function getActivities($params) |
|
| 46 | - { |
|
| 47 | - $allQueryFields = array('route_id', 'team', 'limit', 'offset', 'start'); |
|
| 45 | + public static function getActivities($params) |
|
| 46 | + { |
|
| 47 | + $allQueryFields = array('route_id', 'team', 'limit', 'offset', 'start'); |
|
| 48 | 48 | |
| 49 | - $activity = Route4Me::makeRequst(array( |
|
| 50 | - 'url' => Endpoint::GET_ACTIVITIES, |
|
| 51 | - 'method' => 'GET', |
|
| 52 | - 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
| 53 | - )); |
|
| 49 | + $activity = Route4Me::makeRequst(array( |
|
| 50 | + 'url' => Endpoint::GET_ACTIVITIES, |
|
| 51 | + 'method' => 'GET', |
|
| 52 | + 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
| 53 | + )); |
|
| 54 | 54 | |
| 55 | - return $activity; |
|
| 56 | - } |
|
| 55 | + return $activity; |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - public static function searcActivities($params) |
|
| 59 | - { |
|
| 60 | - $allQueryFields = array('route_id', 'limit', 'offset', 'activity_type'); |
|
| 58 | + public static function searcActivities($params) |
|
| 59 | + { |
|
| 60 | + $allQueryFields = array('route_id', 'limit', 'offset', 'activity_type'); |
|
| 61 | 61 | |
| 62 | - $activity = Route4Me::makeRequst(array( |
|
| 63 | - 'url' => Endpoint::GET_ACTIVITIES, |
|
| 64 | - 'method' => 'GET', |
|
| 65 | - 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
| 66 | - )); |
|
| 62 | + $activity = Route4Me::makeRequst(array( |
|
| 63 | + 'url' => Endpoint::GET_ACTIVITIES, |
|
| 64 | + 'method' => 'GET', |
|
| 65 | + 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
| 66 | + )); |
|
| 67 | 67 | |
| 68 | - return $activity; |
|
| 69 | - } |
|
| 68 | + return $activity; |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | - public static function sendUserMessage($params) |
|
| 72 | - { |
|
| 73 | - $allBodyFields = array('activity_type', 'activity_message', 'route_id'); |
|
| 71 | + public static function sendUserMessage($params) |
|
| 72 | + { |
|
| 73 | + $allBodyFields = array('activity_type', 'activity_message', 'route_id'); |
|
| 74 | 74 | |
| 75 | - $result = Route4Me::makeRequst(array( |
|
| 76 | - 'url' => Endpoint::ACTIVITY_FEED, |
|
| 77 | - 'method' => 'POST', |
|
| 78 | - 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
|
| 79 | - )); |
|
| 75 | + $result = Route4Me::makeRequst(array( |
|
| 76 | + 'url' => Endpoint::ACTIVITY_FEED, |
|
| 77 | + 'method' => 'POST', |
|
| 78 | + 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
|
| 79 | + )); |
|
| 80 | 80 | |
| 81 | - return $result; |
|
| 82 | - } |
|
| 81 | + return $result; |
|
| 82 | + } |
|
| 83 | 83 | } |