Giter Club home page Giter Club logo

Comments (3)

markknopper avatar markknopper commented on July 28, 2024

I think I figured out this problem. In Networking/Request.swift, there is a query to financialmodelingprep.com, but that needs an API Key. So the solution is to add an API key in Configuration.swift, and change the code in func companyProfile to look something like this:

    var urlString = companyProfileURL.replacingOccurrences(of: "{company}", with: identifier)
    urlString.append("?apikey=\(configuration.financialmodelingprepApiKey)")

from divrise.

davidakoontz avatar davidakoontz commented on July 28, 2024

Has that fix been added to the REPO master / dev?

I just hand rolled it in to my code base (development Mar 22, 2022) and the app is crashing.

// MARK: Portfolio & Search Shared
private func companyProfile(identifier: String) -> AnyPublisher<CompanyProfileResponse, Never> {
    var urlString = companyProfileURL.replacingOccurrences(of: "{company}", with: identifier)
    urlString.append("?apikey=\(configuration.financialmodelingprepApiKey)")
    let url = URL(string: urlString)!

from divrise.

davidakoontz avatar davidakoontz commented on July 28, 2024

DivRise/Request.swift:72: Fatal error: Unexpectedly found nil while unwrapping an Optional value
2022-03-22 18:44:24.419356-0500 DivRise[21900:1652350] DivRise/Request.swift:72: Fatal error: Unexpectedly found nil while unwrapping an Optional value

line 72 is DateFormatter
func fetchUpcomingDividendDate(portfolioStock: PortfolioStock) -> AnyPublisher<UpcomingDividend, Never> {
return getCompanyCashFlowStatement(identifier: portfolioStock.ticker, period: "quarter")
.map {
var date = DateFormatter.fullString.date(from: $0.financials.first!.date)!

from divrise.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.