batoulapps / adhan-swift

High precision Islamic prayer time library for Swift
MIT License
182 stars 42 forks source link

How to Combine API with another API #55

Closed tambaTech closed 3 years ago

tambaTech commented 3 years ago

As-salâmu ‘alaykum wa Rahmatullâhi wa barakatuhu . I am making a Salah app only for some cities in Denmark. I’m using a network call with another API with json response. I was wondering is it possible to combine the data I get back from API with your API, so I can use some of your features ? I’m very new in Swift, please be patient with me

z3bi commented 3 years ago

The fact that you are also using another API shouldn't prevent you from using this library. It would be up to you to decide how to combine the data from the two sets.

tambaTech commented 3 years ago

I was looking for guidance on how to. I've looked at the documents but I'm too new in Swift to understand it all.

SNNafi commented 3 years ago

Then, it it better to learn swift first and then come back again. Because, no one can not guide you throughout the whole process . :( You should learn at least the working level of swift .

SNNafi commented 3 years ago

You can check this, for SwiftUI implementation:

z3bi commented 3 years ago

@LaminT theres also an example project included in this repo, you can find it here https://github.com/batoulapps/adhan-swift/tree/main/Example/Swift%20Example

Please try using the library and then if you get stuck on a specific problem we can hopefully point you in the right direction

tambaTech commented 3 years ago

Ok, should I install the package first to get the features?

z3bi commented 3 years ago

@LaminT Yes, I recommend installing using the Swift Package Manager.

tambaTech commented 3 years ago

I'm not a beginner like that. I've already built the app, just missing some features like upcoming prayer, notifications and so on..

tambaTech commented 3 years ago

Jazâkallâhu khairan

SNNafi commented 3 years ago

Sorry for misunderstanding.

Here is an article for scheduling local notification

You can get tommorrow Date by this code -> Calendar.current.date(byAdding: .day, value: 1, to: Date())!

Then, use the Date object to retrieve the prayer time for that day.

Good Luck

tambaTech commented 3 years ago

Sorry for misunderstanding.

Here is an article for scheduling local notification

You can get tommorrow Date by this code -> Calendar.current.date(byAdding: .day, value: 1, to: Date())!

Then, use the Date object to retrieve the prayer time for that day.

Good Luck


Jazâkallâhu khairan

SNNafi commented 3 years ago

@LaminT Wa iyyaka