manuelcastroFau / simpleStock

0 stars 1 forks source link

Original App Design Project - README Template

simpleStock

Table of Contents

  1. Overview
  2. Sprint
  3. Product Spec
  4. Wireframes
  5. Schema
  6. [Video Walkthrough](#Video Walkthrough)

Overview

Description

[real time stock data to create a financial site/application]

App Evaluation

[Evaluation of your app across the following attributes]

Product Spec

1. User Stories (Required and Optional)

Required Must-have Stories

2. - Sprints

Sprint 4 Issues Completed

Sprint 3 Issues Completed

Sprint 2 Issues Completed

Sprint 1 Issues Completed

Optional Nice-to-have Stories

Stock Info

3. Screen Archetypes

4. Navigation

Tab Navigation (Tab to Screen)

Flow Navigation (Screen to Screen)

Wireframes

[Add picture of your hand sketched wireframes in this section]

Wireframe

[BONUS] Digital Wireframes & Mockups

[BONUS] Interactive Prototype

5. Schema

[This section will be completed in Unit 9]

Models

[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
Email Number user email address
Phone Number user phone number
Photo Binary Data profile image of the user

Networking

*List of network requests by screen

Sig in/ Sign Up screen

Stocks List

-(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()
Profile Screen
-(POST/GET) Get and set User data from back4app

Single Stock.

News

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