===Welcome Profile Info===
This feature present user with set of steps(questions) user needs to answer after registration. User is not able to continue using website until all steps are completed. Steps are: first name, question, description, headline, photo. First name is responsible for setting user's first_name, description - user's description, headline user's title(headline), question contains set of profile info questions(ones that are used in profile edit, just grouped differently).
To figure out whether user is free to use website(or has uncompleted steps), we use status flag, that can be //default//, //complete//, //incomplete//. Default is default flag, marks user registered before feature implemented, or website doesn't support feature, complete - user completed all steps, incomplete - user needs to complete all steps before using website. We set user to status //incomplete// after registration, and to status //complete// after completion, user with status //incomplete// can't continue to use website..
====API commands====
We have API commands to get/update steps data, and get/update status flag. Description follows.
=====welcome_profile_info.get-data=====
**parameters**
- None. Requires logged in user.
**example**
https://front-m1.dvipdev.com/api.json?cmd=welcome_profile_info.get-data
**result**
```lang=json
{
"meta": {
"status": "OK"
},
"result": {
"data": {[
"firstname": {
"answered"name": "third dude"firstname",
} "action": "",
"headline": { "action_param": "",
"answered"photo": "third dude"",
} "required": "1",
"description": { "title": "Welcome to Free Online Dating",
"description": "It looks like you're new here! I'm here to help make your experience the best it can be and help you find the perfect match for you.",
"answered": "third dudnote": "To get started,\r\nplease tell me your First name?",
"button_yes": "Continue",
"button_no": "",
"question_id": "1",
"question_name": "To get started, please tell me your First name?",
"question_type": "char",
"value_min": "1",
"value_max": "20",
"multiselect": "0",
"answers": {},
"answered": "\u0110or\u0111e"
},
"question": {
"q_0": {"name": "question",
"group_id"action": "0"",
"action_param": "",
"photo": "",
"required": "1",
"title": "Nice to meet you \u0110or\u0111e...",
"description": "Let's get started helping you find your perfect match",
"note": "",
"button_yes": "Continue",
"button_no": "",
"question_id": 0,
"question_name": "What are you looking for?",
"answers": {
"1": "Hang out",
"2": "Talk \/ email",
"3": "Long term relationship",
"4": "Dating",
"5": "Friends",
"6": "Intimate encounter",
"7": "Activity partner",
"8": "Other relationship"
},
"answered": [
"6""question_type": "select",
"8""value_min": "0",
]"value_max": "0",
"multiselect": "1",
"type"answered": "select",1,8"
"value_min": "0"},
"value_max": "0"{
}"name": "question",
"q_34": {"action": "",
"ques"action_idparam": "34"",
"group_id"photo": "5"",
"type"required": "select"1",
"title": "",
"description": "",
"note": "",
"button_yes": "Continue",
"button_no": "",
"question_id": "34",
"value_min": "0",
"value_max": "0",
"multiselect": "0",
"question_name": "Do you smoke?",
"answers": {
"345": "Don't smoke",
"346": "Quitting smoking",
"347": "Smoke socially",
"348": "Smoke regularly (5-10 a day)",
"349": "Smoke heavily (10+ a day)"
},
"answered": ["question_type": "select",
"answered": "345"9"
},
]{
}"name": "question",
"q_24": {"action": "",
"ques"action_idparam": "24"",
"group_id"photo": "4"",
"type"required": "check"1",
"title": "",
"description": "",
"note": "",
"button_yes": "Continue",
"button_no": "",
"question_id": "24",
"value_min": "0",
"value_max": "0",
"multiselect": "1",
"question_name": "What do you watch on TV?",
"answers": {
"235": "News",
"236": "Cartoons",
"237": "Documentaries",
"238": "Dramas",
"239": "Situation comedies",
"240": "Instructional",
"241": "Movies",
"242": "I don't like TV",
"243": "I wish I had a TV",
"244": "Sports",
"245": "Reality shows",
"246": "Soaps",
"247": "Re-runs"
},
"answered": ["question_type": "check",
"240","answered": "236"
"241"},
"247"{
]"name": "question",
}"action": "",
"q_29": {"action_param": "",
"question_id"photo": "29"",
"group_i"required": "4"1",
"typ"title": "char"",
"description": "",
"note": "",
"button_yes": "Continue",
"button_no": "",
"question_id": "29",
"value_min": "0",
"value_max": "80",
"multiselect": "0",
"question_name": "My favorite artists are:",
"answered": ["question_type": "char",
"some great artist""answers": {},
"answered": "some artists"
},
]{
}"name": "headline",
"action": "",
"action_param": "",
"photo": "",
"required": "1",
"title": "Your profile headline",
"description": "A sentence that would attract people to you",
"note": "Try something that sums up what you want, who you are or just something witty to encourage people to check you out. You're almost done!",
"button_yes": "Continue",
"button_no": "",
"question_id": "2",
"question_name": "",
"question_type": "char",
"value_min": "1",
"value_max": "60",
"multiselect": "0",
"answers": {},
"answered": "Bullshit is everywhere"
},
{
"name": "description",
"action": "",
"action_param": "",
"photo": "",
"required": "1",
"title": "A Little More About You ...",
"description": "Include something interesting about yourself",
"note": "Include something about what you're looking for in other members.",
"button_yes": "Continue",
"button_no": "",
"question_id": "3",
"question_name": "",
"question_type": "char",
"value_min": "1",
"value_max": "200",
"multiselect": "0",
"answers": {},
"answered": "My mama always said life was like a box of chocolates"
},
{
"name": "photo",
"action": "upload_photo",
"action_param": "",
"photo": "https:\/\/dev-global-us.dvipcdn.com\/ifc\/popups\/upload-photos-icon.png",
"required": "0",
"title": "Add a Photo to Your Profile",
"description": "Profiles with Photos are 10X more likely to meet someone!",
"note": "Make sure you choose a photo with only you in it, and one that showcases your best qualities",
"button_yes": "Upload a Photo",
"button_no": "I'll Upload a photo later",
"question_id": 0,
"question_name": "",
"question_type": "",
"value_min": 0,
"value_max": 0,
"multiselect": 0,
"answers": {},
"answered": ""
},
{
"name": "end",
"action": "upgrade",
"action_param": "m1_14_197_premium",
"photo": "https:\/\/dev-global-us.dvipcdn.com\/ifc\/popups\/cloud_folder.png",
"required": "0",
"title": "Congratulations, you're one step closer to meeting someone!",
"description": "Become a premium member to unlock unlimited messages, access to all members photos, and much more..",
"note": "",
"button_yes": "30% Discount for New Members",
"button_no": "",
"question_id": 0,
"question_name": "",
"question_type": "",
"value_min": 0,
"value_max": 0,
"multiselect": 0,
"answers": {},
"answered": ""
}
}]
}
}
```
**result description**
- firstname: handles first name step - name: string - step's name, used for API update-data
- action: string - defines action to be taken on mobile app
- action_param: string - defines additional param for action that should be taken
- answered:- photo: string - defines image to be user's current first named in step, can be url, special string, etc.
- description: handles description step - title: string - translated text, step's title
- answered: user's current
- headline: handles headline step- description: string - translated text, step's description
- answered: user's current headline- note: string - translated text, step's note
- question: handles question steps - button_yes: string - translated text, this step is set of a few stepstext on next/continue button
- answered: users current first name- button_no: string - translated text, text on skip button
- question_id: int - question ident,'s ID - used for API update-data. needed for updateNote that 0 is a valid value here.
- group_id:- question belongs to this profile info group(not really needed here_name: string - translated text, but useful for quick checks(defines db table name))question's content
- - question_type: string - type of question. Can be select, check, char, text, float, int. We do not use exact representation, but in general select is select box, check is set of checkboxes/radio buttons(depending on multiselect), char and text are text boxes(char limited length), float/int are numeric with different step, etc. For this feature we represent(driven by design) select/check as a custom select(bubbles), char/text are text areas, float/int numeric.
- value_min: int - important for float/int/char, min value or min number of chars
- value_max: int - important for float/int/char, max value or max number of chars
- multiselect: int - important for select/check, can user pick more answers or just one
- question_name: text to be display- answers: array - array of predefined as questionnswers, translatedwhere applicable
- answered: array ofstring - current answerser(s) to question(comma separated values if select/check)
NOTE: I wasn't sure if we want texts and other data for firstname, description, headline, since these are fixed, and don't need to have same wording as website has. Will add if needed. - required: int - if question needs to be answered or if it can be skipped
-----
=====welcome_profile_info.update-data=====
**parameters**
- what: which step we're updating. Can be [firstname, description, headline, question]"name" field in API get-data
- value: new value for given property
- id: only valid when what=question,id of a question we're updating. "question_id of question we're updating" field in API get-data
**example**
https://front-m1.dvipdev.com/api.json?cmd=welcome_profile_info.update-data&what=firstname&value=this_is_my_first_name&id=1
https://front-m1.dvipdev.com/api.json?cmd=welcome_profile_info.update-data&what=description&value=this_is_my_description&id=3
https://front-m1.dvipdev.com/api.json?cmd=welcome_profile_info.update-data&what=headline&value=this_is_my_headline&id=2
https://front-m1.dvipdev.com/api.json?cmd=welcome_profile_info.update-data&what=question&id=24&value=235,236,237
https://front-m1.dvipdev.com/api.json?cmd=welcome_profile_info.update-data&what=question&id=29&value=some_great_artist
**result**
```lang=json
{
"meta": {
"status": "OK"
},
"result": {
"success": true
}
}
```
**result description**
- success: whether we have successfully updated property
-----
=====welcome_profile_info.get-status=====
**parameters**
- None, Requires logged in user.
**example**
https://front-m1.dvipdev.com/api.json?cmd=welcome_profile_info.get-status
**result**
```lang=json
{
"meta": {
"status": "OK"
},
"result": {
"status": 1
}
}
```
**result description**
- status: current status flag. Can be one of the [0 - default, 1 - complete, 2 - incomplete]
-----
=====welcome_profile_info.update-status=====
**parameters**
- value: new value for status flag.Can be one of the [0 - default, 1 - complete, 2 - incomplete]
**example**
https://front-m1.dvipdev.com/api.json?cmd=welcome_profile_info.update-status&value=2
**result**
```lang=json
{
"meta": {
"status": "OK"
},
"result": {
"success": true
}
}
```
**result description**
- success: was status update successful?