Overview

Namespaces

  • DocPlanner
    • SDK
      • Base
        • ServiceDescription
      • Core
      • Model
        • Doctor
        • Geo
        • User
        • Visit
  • PHP

Classes

  • Doctor
  • Geo
  • User
  • Visit
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Author: Ɓukasz Barulski
  4:  * Date: 23.04.13 17:44
  5:  */
  6: namespace DocPlanner\SDK\Core;
  7: 
  8: use DocPlanner\SDK\Base\CoreBase;
  9: use DocPlanner\SDK\Base\Result;
 10: 
 11: /**
 12:  * Class User
 13:  * @package DocPlanner\SDK\Core
 14:  */
 15: class User extends CoreBase
 16: {
 17:     /**
 18:      * @param string $email
 19:      * @param string $pass
 20:      *
 21:      * @return \DocPlanner\SDK\Model\User\Register|array
 22:      */
 23:     public function register($email, $pass)
 24:     {
 25:         $this->parameter->add(['email' => $email, 'pass' => $pass]);
 26:         $result = $this->baseSDK->execute('user.register', $this->parameter);
 27:         $this->baseSDK->setToken($result['access_token']['access_token'], $result['access_token']['access_token_secret']);
 28:         return $result;
 29:     }
 30: 
 31:     /**
 32:      * @param null|string $email
 33:      * @param null|string $pass
 34:      * @param null|string $fb_access
 35:      *
 36:      * @return \DocPlanner\SDK\Model\User\RequestAccess|array
 37:      */
 38:     public function requestAccess($email = null, $pass = null, $fb_access = null)
 39:     {
 40:         $this->parameter->add(['email' => $email, 'pass' => $pass, 'fb_access' => $fb_access]);
 41:         $result = $this->baseSDK->execute('user.requestAccess', $this->parameter);
 42:         $this->baseSDK->setToken($result['access_token']['access_token'], $result['access_token']['access_token_secret']);
 43:         return $result;
 44:     }
 45: 
 46:     /**
 47:      * @param null|float $lat
 48:      * @param null|float $lon
 49:      * @param null|int   $page
 50:      *
 51:      * @return \DocPlanner\SDK\Model\User\Favorites|array
 52:      */
 53:     public function favorites($lat = null, $lon = null, $page = null)
 54:     {
 55:         $this->parameter->add(['lat' => $lat, 'lon' => $lon, 'page' => $page]);
 56:         $result = $this->baseSDK->execute('user.favorites', $this->parameter);
 57:         return $result;
 58:     }
 59: 
 60:     /**
 61:      * @param string $name
 62:      * @param string $surname
 63:      * @param string $phone
 64:      *
 65:      * @return \DocPlanner\SDK\Model\User\ValidatePhone|array
 66:      */
 67:     public function validatePhone($name, $surname, $phone)
 68:     {
 69:         $this->parameter->add(['name' => $name, 'surname' => $surname, 'phone' => $phone]);
 70:         $result = $this->baseSDK->execute('user.validatePhone', $this->parameter);
 71:         return $result;
 72:     }
 73: 
 74:     /**
 75:      * @param string $name
 76:      * @param string $surname
 77:      * @param string $email
 78:      * @param string $phone
 79:      *
 80:      * @return \DocPlanner\SDK\Model\User\CreateWithPhone|array
 81:      */
 82:     public function createWithPhone($name, $surname, $email, $phone)
 83:     {
 84:         $this->parameter->add(['name' => $name, 'surname' => $surname, 'email' => $email, 'phone' => $phone]);
 85:         $result = $this->baseSDK->execute('user.createWithPhone', $this->parameter);
 86:         return $result;
 87:     }
 88: 
 89:     /**
 90:      * @param string $process_id
 91:      * @param string $password
 92:      *
 93:      * @return \DocPlanner\SDK\Model\User\ConfirmPhone|array
 94:      */
 95:     public function confirmPhone($process_id, $password)
 96:     {
 97:         $this->parameter->add(['process_id' => $process_id, 'password' => $password]);
 98:         $result = $this->baseSDK->execute('user.confirmPhone', $this->parameter);
 99:         $this->baseSDK->setToken($result['access_token']['access_token'], $result['access_token']['access_token_secret']);
100:         return $result;
101:     }
102: 
103:     /**
104:      * @param int $doctor_id
105:      *
106:      * @return \DocPlanner\SDK\Model\User\RemoveOpinion|array
107:      */
108:     public function removeOpinion($doctor_id)
109:     {
110:         $this->parameter->add(['doctor_id' => $doctor_id]);
111:         $result = $this->baseSDK->execute('user.removeOpinion', $this->parameter);
112:         return $result;
113:     }
114: 
115:     /**
116:      * @return \DocPlanner\SDK\Model\User\RelatedDoctors|array
117:      */
118:     public function relatedDoctors()
119:     {
120:         $result = $this->baseSDK->execute('user.relatedDoctors');
121:         return $result;
122:     }
123: 
124:     /**
125:      * @return Result|\DocPlanner\SDK\Model\User\GetSignature[]|array
126:      */
127:     public function getSignature()
128:     {
129:         $result = $this->baseSDK->execute('user.getSignature');
130:         return $result;
131:     }
132: 
133:     /**
134:      * @param string $signature
135:      *
136:      * @return \DocPlanner\SDK\Model\User\AddSignature|array
137:      */
138:     public function addSignature($signature)
139:     {
140:         $this->parameter->add(['signature' => $signature]);
141:         $result = $this->baseSDK->execute('user.addSignature', $this->parameter);
142:         return $result;
143:     }
144: 
145: 
146: }
Docplanner API documentation generated by ApiGen 2.8.0