- š Hi, Iām @nkhanh44
- š Iām interested in developing things
- š± Iām currently working as an iOS engineer
nkhanh44 / ic-survey-ios Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Make a request with post method to API endpoint /api/v1/responses with body:
{
"survey_id": "survey_id",
"questions": [
{
"id": "question_id",
"answers": [
{
"id": "answer_id"
}
]
},
{
"id": "question_id",
"answers": [
{
"id": "answer_id",
"answer": "My answer"
}
]
}
]
}
Users must be authenticated before taking or viewing any surveys.
The mobile apps should allow users to authenticate with their email and password.
Display the Nimble logo
Display the blurred background
Display the Email text input
Email
Display the Password text input
Password
Display the Login button
DO NOT display the Forgot Password button yet. We will work on this on another separate epic.
Upon tapping the Survey Disclosure button in Home, navigate the user to Survey Details with the selected survey.
Pass and use the selected survey data fetched in Home.
Use the survey title as the Title label
Use the survey description as the Description label
Use the survey cover image url as the background image
All unit test passed
display_type
as dropdown
,text
to show as the picker wheel item's titledisplay_type
as smiley
,display_type
as heart
,display_type
as star
,display_type
as nps
,display_type
as choice AND pick as one,display_type
as intro
,display_type
as outro
,display_type
as textarea
,display_type
as textfield
,Cancel
, do nothing.When a user tries to sign in with an invalid input of email or password, the mobile app should locally validate the input first before calling a login request to reduce the number of unnecessary requests made to the API.
We should also inform the user what fails the validation so that he/she can edit the input properly.
Upon password input is typed, validate the password input.
The password must be at least 8 letters.
Password must contain at least 8 characters
Call GET /api/v1/surveys endpoint with the following query parameters:
page[number]: 1
page[size]: 10
POST /api/v1/oauth/revoke
to sign out with the following body:{
"token": "{{user_access_token}}",
"client_id": "{{client_id}}",
"client_secret": "{{client_secret}}"
}
GET /api/v1/surveys/{{survey-id}}
endpoint to retrieve the survey detailsUsers must be authenticated before taking or viewing any surveys. Our surveys have the access restriction. some surveys are targeted to a specific group of users only for a more accurate survey result.
The mobile apps should allow users to authenticate with their email and password.
Call POST /api/v1/oauth/token endpoint with the following body:
{
"grant_type": "password",
"email": {{email}},
"password": {{password}},
"client_id": {{client_id}},
"client_secret": {{client_secret}}
}
Check out Authentication on Github Wiki for client_id and client_secret.
Postman - Nimble Survey API
When a user tries to sign in with an invalid input of email or password, the mobile app should locally validate the input first before calling a login request to reduce the number of unnecessary requests made to the API.
We should also inform the user what fails the validation so that he/she can edit the input properly.
Upon Login input is typed, validate the Login input.
If the validation fails, display a small text (red color) below the Login input with this following message
Whoops, it seems the email is incorrect. Please check and try again.
The OS built-in capability of email validation is preferred.
From Bliss's comment, when opening the app with refresh token, it freezed at SplashView because of the revoked refresh token.
If refresh token is revoked, navigate to the login screen.
When a user starts taking a survey, he/she will go through a set of questions of the selected survey. The mobile app should show how many questions there are for the survey so that the user can expect how long it is going to take and he/she can always stop at any point by dismissing the screen.
{{current-question-number}}/{{number-of-questions}}
Use a refresh token to call API endpoint /api/v1/oauth/token to retrieve a new access token with the body:
{
"grant_type": "refresh_token",
"refresh_token": {{refresh_token}},
"client_id": "{{client_id}}",
"client_secret": "{{client_secret}}"
}
After successful request, update an access and a refresh token in local storage.
Note - Although pagination is supported by the API, we will only show a limited number of surveys (10) for the scope of this epic.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.