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