[real time stock data to create a financial site/application]
[Evaluation of your app across the following attributes]
Required Must-have Stories
[X] Add hyperlink for news text, Fix Thumbnail UI, Keyboard Dismiss on login screen
@annaswaheed
@manuelcastroFau
[X] Add Logo Icon For Stock on Detail Stock View Page
@annaswaheed
@manuelcastroFau
[X] Add Logo for the APP, on the iPhone main screen you can see the app logo
@Velo23
@jlawso
[X] install almorafireimage for user profile picture
@manuelcastroFau
@annaswaheed
[X] Test the UI
@manuelcastroFau
@annaswaheed
[X] test the yahoo api library we created and make sure we can pass arguments and read returned data
@manuelcastroFau
@annaswaheed
[X] parse the data for news and populate the news page
@manuelcastroFau
@annaswaheed
[X] create the UI for the news tab
@manuelcastroFau
@annaswaheed
[X] add the navigation bar at the bottom of the screen
@annaswaheed
@manuelcastroFau
[X] parse the data from the API for detail view stock page
@annaswaheed
@manuelcastroFau
[X] make sure the profile page is working
@annaswaheed
@manuelcastroFau
[X] Make sure the user stays logins after restarting the application
@manuelcastroFau
[X] create the detail view of stock page UI
@manuelcastroFau
[X] User Can modify his account
@Velo23
[X] Make Today Trending Stock screen dynamic
@annaswaheed
@manuelcastroFau
[X] investigate how the visualization of price data as graph
@annaswaheed
[X] create a user profile in swift UI
@Velo23
[X] Implement log sessions and logout for user
@manuelcastroFau
[X] write the library for the Yahoo API to get the stock info
@annaswaheed
@manuelcastroFau
[X] Login Page UI
@manuelcastroFau
[X] User should be able to login
@manuelcastroFau
[X] create the List of stocks UI
@annaswaheed
@manuelcastroFau
[X] Connect the application to the back4apps
@manuelcastroFau
Optional Nice-to-have Stories
Stock Info
Tab Navigation (Tab to Screen)
Flow Navigation (Screen to Screen)
[Add picture of your hand sketched wireframes in this section]
Try Out Prototype (Test the Demo)
HD Video Demonstration Interactive Prototype
[This section will be completed in Unit 9]
[Add table of models]
We will use in back4app the following table to storage user profile and login values | Property | Type | Description |
---|---|---|---|
objectID | String | Unique ID of each Object | |
firstName | String | First Name of the user | |
LastName | String | Last Name of the user | |
Username | String | Username of each user | |
Password | String | password to validate the user | |
Number | user email address | ||
Phone | Number | user phone number | |
Photo | Binary Data | profile image of the user |
*List of network requests by screen
-(Read/GET) Get Stock info from our predefined list
Using Stock Info API
import Foundation
let headers = [ "content-type": "application/x-www-form-urlencoded", "X-RapidAPI-Key": "bd48fac225msh942df97a253a250p1c5cd8jsna7f3db3ff35f", "X-RapidAPI-Host": "yahoo-finance97.p.rapidapi.com" ]
let postData = NSMutableData(data: "symbol=AAPL".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "https://yahoo-finance97.p.rapidapi.com/stock-info")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse print(httpResponse)
} })
dataTask.resume()
-(POST/GET) Get and set User data from back4app
Using Price by Period API
swift
1. ```
import Foundation
let headers = [
"content-type": "application/x-www-form-urlencoded",
"X-RapidAPI-Key": "bd48fac225msh942df97a253a250p1c5cd8jsna7f3db3ff35f",
"X-RapidAPI-Host": "yahoo-finance97.p.rapidapi.com"
]
let postData = NSMutableData(data: "symbol=AAPL".data(using: String.Encoding.utf8)!)
postData.append("&period=7d".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "https://yahoo-finance97.p.rapidapi.com/price")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
swift
1. ```
import Foundation
let headers = [
"content-type": "application/x-www-form-urlencoded",
"X-RapidAPI-Key": "bd48fac225msh942df97a253a250p1c5cd8jsna7f3db3ff35f",
"X-RapidAPI-Host": "yahoo-finance97.p.rapidapi.com"
]
let postData = NSMutableData(data: "symbol=AAPL".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "https://yahoo-finance97.p.rapidapi.com/news")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
- [OPTIONAL: List endpoints if using existing API such as Yelp]
### Yahoo Finance API
- Base URL - [https://yahoo-finance97.p.rapidapi.com/](https://yahoo-finance97.p.rapidapi.com/ "https://yahoo-finance97.p.rapidapi.com/")
HTTP Verb | Endpoint | Description
----------|----------|------------
`GET` | /stock-info | get Stocks basic stats and information
`GET` | /price | Get Stock price by period of time
`GET` | /news | Show recent news of the stock from a specific stocks
### 6. Video Walkthrough
4th Sprint Update:
Here's a walkthrough of implemented user stories:
![Imgur](https://imgur.com/IKO1yIS.gif)
HD Video Walkthrough
https://youtube.com/shorts/PFPum5tz0pI?feature=share
3rd Sprint Update:
![Imgur](https://imgur.com/UT6BGku.gif)
HD Video Walkthrough
https://www.youtube.com/watch?v=4L-0ED7ox_M