Profile Management » History » Version 5
Eric Vieillevigne, 05/12/2015 06:16 PM
| 1 | 2 | Eric Vieillevigne | {{>toc}} |
|---|---|---|---|
| 2 | 1 | Eric Vieillevigne | |
| 3 | 3 | Eric Vieillevigne | h1. Profile Management - _*prf*_ method |
| 4 | 1 | Eric Vieillevigne | |
| 5 | The profile API enable to manage the existing profiles of the members. In all the other apis, members are labeled by accountid. Developper may use the profile api to retrieve |
||
| 6 | |||
| 7 | the information of each member and match the ids with a display information. |
||
| 8 | |||
| 9 | h2. Get Profile- _prfgetProfile_ |
||
| 10 | |||
| 11 | The method prfgetProfile enables a logged user to retrieve all the information of the profile for a certain accountid.. |
||
| 12 | |||
| 13 | The method returns the profile information. |
||
| 14 | |||
| 15 | 4 | Eric Vieillevigne | By sending an HTTP request http://APISERVER/api/prf/getProfile?oid=1705 |
| 16 | 1 | Eric Vieillevigne | |
| 17 | *Parameters*: |
||
| 18 | |||
| 19 | |*Name*|*Type*|*Description*| |
||
| 20 | |accountid|String|Account Information Id| |
||
| 21 | |||
| 22 | |||
| 23 | if accountid is null, the method returns the profile of the logged account. |
||
| 24 | |||
| 25 | *Response*: |
||
| 26 | <pre><code class="javascript"> |
||
| 27 | { |
||
| 28 | "cn":"prfgetProfile", |
||
| 29 | "feed":{ |
||
| 30 | "ln":"Simpson", // last name |
||
| 31 | 4 | Eric Vieillevigne | "pictureURI":"http:\/\/API server\/media\/48_20mwynve_47?", // avatar |
| 32 | 1 | Eric Vieillevigne | "profileId":"30", |
| 33 | "ownerId":"48", |
||
| 34 | "dname":"Bart", // nickname |
||
| 35 | "birthDate":"1986-12-01T23:00:00.000Z",/*Birthdate in UTC format*/ |
||
| 36 | "locale":"en", |
||
| 37 | "pictureURIs":[ |
||
| 38 | 4 | Eric Vieillevigne | "http:\/\/API server\/media\/48_20mwynve_47?" |
| 39 | 1 | Eric Vieillevigne | ], |
| 40 | "devices":"devices":[ |
||
| 41 | { |
||
| 42 | "deviceType":"MOBILE", |
||
| 43 | "value":"0687824772", |
||
| 44 | "deviceId":"20_215" |
||
| 45 | },{ |
||
| 46 | "deviceType":"EMAIL", |
||
| 47 | "value":"ericv@voxmobili.com", |
||
| 48 | "deviceId":"20_216" |
||
| 49 | } |
||
| 50 | ], |
||
| 51 | "fn":"Bart" // first name |
||
| 52 | } |
||
| 53 | } |
||
| 54 | </code></pre> |
||
| 55 | The Method response returns the IProfile Feed. |
||
| 56 | |||
| 57 | |||
| 58 | In case, the method encounter any error, the response is an exeception with specific parameters detailed below. |
||
| 59 | |||
| 60 | *Error*: |
||
| 61 | |||
| 62 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 63 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 64 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 65 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 66 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 67 | |||
| 68 | h2. Get Profile List- _prfgetProfiles_ |
||
| 69 | |||
| 70 | The method prfgetProfile enables a logged user to retrieve all the information of the lists of the profile of all family members. |
||
| 71 | |||
| 72 | The method returns the profile information. |
||
| 73 | |||
| 74 | 5 | Eric Vieillevigne | By sending an HTTP request http://servername/api/prf/getProfiles? |
| 75 | 1 | Eric Vieillevigne | |
| 76 | *Parameters*: |
||
| 77 | |||
| 78 | No parameters |
||
| 79 | |||
| 80 | |||
| 81 | *Response*: |
||
| 82 | <pre><code class="javascript"> |
||
| 83 | { |
||
| 84 | "cn":"prfgetProfiles", |
||
| 85 | "feed":{ |
||
| 86 | "1704":{ |
||
| 87 | "profileId":"944", |
||
| 88 | "ownerId":"1704", |
||
| 89 | "pictureURIs":[], |
||
| 90 | "devices":[ |
||
| 91 | { |
||
| 92 | "deviceType":"EMAIL", |
||
| 93 | "value":"grandpa@smartnsoft.com", |
||
| 94 | "deviceId":"1704_163" |
||
| 95 | } |
||
| 96 | ], |
||
| 97 | "fn":"Grandpa" |
||
| 98 | }, |
||
| 99 | "1705":{ |
||
| 100 | "profileId":"945", |
||
| 101 | "ownerId":"1705", |
||
| 102 | "dname":"", |
||
| 103 | "timeZone":"Asia\/Hong_Kong", |
||
| 104 | "birthDate":"2011-07-26T03:50:18.00Z", |
||
| 105 | "pictureURIs":[], |
||
| 106 | "devices":[ |
||
| 107 | { |
||
| 108 | "deviceType":"EMAIL", |
||
| 109 | "value":"yuanyuan.xu@mgsei.com", |
||
| 110 | "deviceId":"1705_164" |
||
| 111 | },{ |
||
| 112 | "deviceType":"MOBILE", |
||
| 113 | "value":"13678049601", |
||
| 114 | "deviceId":"1705_165" |
||
| 115 | } |
||
| 116 | ], |
||
| 117 | "fn":"2" |
||
| 118 | }, |
||
| 119 | "133":{ |
||
| 120 | "ln":"Simpson", |
||
| 121 | 4 | Eric Vieillevigne | "pictureURI":"http:\/\/API server\/media\/133_150?", |
| 122 | 1 | Eric Vieillevigne | "profileId":"73", |
| 123 | "ownerId":"133", |
||
| 124 | "dname":"Lizy", |
||
| 125 | "gender":"FEMININE", |
||
| 126 | "timeZone":"Asia\/Taipei", |
||
| 127 | "birthDate":"2011-07-15T02:50:00.00Z", |
||
| 128 | "pictureURIs":[ |
||
| 129 | 4 | Eric Vieillevigne | "http:\/\/API server\/media\/133_150?" |
| 130 | 1 | Eric Vieillevigne | ], |
| 131 | "devices":[ |
||
| 132 | { |
||
| 133 | "deviceType":"MOBILE", |
||
| 134 | "value":"15586347557", |
||
| 135 | "deviceId":"133_4" |
||
| 136 | } |
||
| 137 | ], |
||
| 138 | "fn":"Lisa" |
||
| 139 | }, |
||
| 140 | "1706":{ |
||
| 141 | "profileId":"946", |
||
| 142 | "ownerId":"1706", |
||
| 143 | "pictureURIs":[], |
||
| 144 | "devices":[ |
||
| 145 | { |
||
| 146 | "deviceType":"EMAIL", |
||
| 147 | "value":"roaming0816@gmail.com", |
||
| 148 | "deviceId":"1706_166" |
||
| 149 | } |
||
| 150 | ], |
||
| 151 | "fn":"2" |
||
| 152 | }, |
||
| 153 | "131":{ |
||
| 154 | "ln":"Simpson", |
||
| 155 | 4 | Eric Vieillevigne | "pictureURI":"http:\/\/API server\/media\/131_148?", |
| 156 | 1 | Eric Vieillevigne | "profileId":"71", |
| 157 | "ownerId":"131", |
||
| 158 | "dname":"Dad", |
||
| 159 | "gender":"MASCULINE", |
||
| 160 | "timeZone":"Asia\/Hong_Kong", |
||
| 161 | "birthDate":"1980-01-06T00:02:35.00Z", |
||
| 162 | "pictureURIs":[ |
||
| 163 | 4 | Eric Vieillevigne | "http:\/\/API server\/media\/131_148?" |
| 164 | 1 | Eric Vieillevigne | ], |
| 165 | "devices":[ |
||
| 166 | { |
||
| 167 | "deviceType":"MOBILE", |
||
| 168 | "value":"123456789", |
||
| 169 | "deviceId":"131_5" |
||
| 170 | },{ |
||
| 171 | "deviceType":"EMAIL", |
||
| 172 | "value":"dad@smartnsoft.com", |
||
| 173 | "deviceId":"131_161" |
||
| 174 | } |
||
| 175 | ], |
||
| 176 | "fn":"homer" |
||
| 177 | }, |
||
| 178 | "130":{ |
||
| 179 | "ln":"Simpson", |
||
| 180 | 4 | Eric Vieillevigne | "pictureURI":"http:\/\/API server\/media\/130_147?", |
| 181 | 1 | Eric Vieillevigne | "profileId":"70", |
| 182 | "ownerId":"130", |
||
| 183 | "dname":"Mom", |
||
| 184 | "gender":"FEMININE", |
||
| 185 | "timeZone":"Asia\/Taipei", |
||
| 186 | "birthDate":"1991-03-03T12:10:48.00Z", |
||
| 187 | "pictureURIs":[ |
||
| 188 | 4 | Eric Vieillevigne | "http:\/\/API server\/media\/130_147?" |
| 189 | 1 | Eric Vieillevigne | ], |
| 190 | "devices":[ |
||
| 191 | { |
||
| 192 | "deviceType":"MOBILE", |
||
| 193 | "value":"06655242", |
||
| 194 | "deviceId":"130_3" |
||
| 195 | },{ |
||
| 196 | "deviceType":"EMAIL", |
||
| 197 | "value":"mom@smartnsoft.com", |
||
| 198 | "deviceId":"130_162" |
||
| 199 | } |
||
| 200 | ], |
||
| 201 | "fn":"Marge" |
||
| 202 | } |
||
| 203 | } |
||
| 204 | } |
||
| 205 | |||
| 206 | </code></pre> |
||
| 207 | The Method response returns the profile MAP list account id, iprofile. |
||
| 208 | |||
| 209 | |||
| 210 | In case, the method encounter any error, the response is an exeception with specific parameters detailed below. |
||
| 211 | |||
| 212 | *Error*: |
||
| 213 | |||
| 214 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 215 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 216 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 217 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 218 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 219 | |||
| 220 | |||
| 221 | h2. Set Profile Picture- _prfsetPicture_ |
||
| 222 | |||
| 223 | The method prfsetPicture enables a logged user to set the profile picture of certain account id of the members of the family. |
||
| 224 | |||
| 225 | The method returns the update IProfile. |
||
| 226 | |||
| 227 | 5 | Eric Vieillevigne | By sending an HTTP request http://servername/api/prf/prfsetPicture |
| 228 | 1 | Eric Vieillevigne | |
| 229 | *Parameters*: |
||
| 230 | |||
| 231 | |*Name*|*Type*|*Description*| |
||
| 232 | |accountid|String|accountid Information| |
||
| 233 | |file|binary|binary file picture| |
||
| 234 | |||
| 235 | |||
| 236 | |||
| 237 | *Response*: |
||
| 238 | <pre><code class="javascript"> |
||
| 239 | { |
||
| 240 | "cn":"prfsetPicture", |
||
| 241 | "feed":{ |
||
| 242 | "ln":"Simpson", |
||
| 243 | 4 | Eric Vieillevigne | "pictureURI":"http:\/\/API server\/media\/130_2757?", |
| 244 | 1 | Eric Vieillevigne | "profileId":"70", |
| 245 | "ownerId":"130", |
||
| 246 | "dname":"Mom", |
||
| 247 | "gender":"FEMININE", |
||
| 248 | "timeZone":"Asia\/Taipei", |
||
| 249 | "birthDate":"1991-03-03T12:10:48.00Z", |
||
| 250 | "pictureURIs":[ |
||
| 251 | 4 | Eric Vieillevigne | "http:\/\/API server\/media\/130_2757?" |
| 252 | 1 | Eric Vieillevigne | ], |
| 253 | "devices":[ |
||
| 254 | { |
||
| 255 | "deviceType":"MOBILE", |
||
| 256 | "value":"06655242", |
||
| 257 | "deviceId":"130_3" |
||
| 258 | },{ |
||
| 259 | "deviceType":"EMAIL", |
||
| 260 | "value":"mom@smartnsoft.com", |
||
| 261 | "deviceId":"130_162" |
||
| 262 | } |
||
| 263 | ], |
||
| 264 | "fn":"Marge" |
||
| 265 | } |
||
| 266 | } |
||
| 267 | </code></pre> |
||
| 268 | |||
| 269 | The Method response returns updated iprofile. |
||
| 270 | |||
| 271 | |||
| 272 | In case, the method encounter any error, the response is an exeception with specific parameters detailed below. |
||
| 273 | |||
| 274 | *Error*: |
||
| 275 | |||
| 276 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 277 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 278 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 279 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 280 | |FizApiModelRightException|un|504|Right exception to use this method| |