chiiida / ic-surveys-ios Goto Github PK
View Code? Open in Web Editor NEWAn iOS Internal Certification build with Swift
License: MIT License
An iOS Internal Certification build with Swift
License: MIT License
BaseAPI
don't have user session
to manage the user credential yetKeychain
and User Session
Keychain
to access and store local storage instead of UserDefaults
AuthToken
(consider rename and/or refactor model)BaseAPI
BaseAPI
and UserSession
need unit testsBaseAPI
UserSession
SplashModule
SplashRouter
SplashPresenter
SplashInteractor
SplashViewController
survey id
/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"
}
]
}
]
}
/api/v1/surveys/{{surveyId}}
/api/v1/surveys
Survey service
id
in Session object should be string based on API response, which make request failure
id
in Session object should be update to string type
struct Session: Codable {
enum CodingKeys: String, CodingKey {
case id, type
case userCredential = "attributes"
}
let id: String?
let type: String?
let userCredential: UserCredential?
}
Failed to login
/api/v1/oauth/token
with the body:{
"grant_type": "password",
"email": "{{email}}",
"password": "{{password}}",
"client_id": "{{client_id}}",
"client_secret": "{{client_secret}}"
}
refresh_token
when it expired.IQKeyboardManager
library is addedAuthenticationService
needs unit testsAuthenticationService
/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}}"
}
On success:
On failure:
APIError
modelLoginModule
LoginRouter
LoginPresenter
LoginInteractor
LoginViewController
Allow user to see Home screen after login
The list of questions must be implemented based on the API response with paginations:
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.