All Projects → makiftutuncu → MuezzinAPI

makiftutuncu / MuezzinAPI

Licence: MIT license
A web server application for Islamic prayer times

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to MuezzinAPI

Protoactor Dotnet
Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
Stars: ✭ 1,070 (+3142.42%)
Mutual labels:  actors, akka
Akka Guide
🌴 A chinese guide of Akka, based on Java.
Stars: ✭ 217 (+557.58%)
Mutual labels:  actors, akka
Akka Monitoring
Monitoring system instrumentation for Akka.NET actor systems
Stars: ✭ 105 (+218.18%)
Mutual labels:  actors, akka
Akkadotnet Code Samples
Akka.NET professional reference code samples
Stars: ✭ 451 (+1266.67%)
Mutual labels:  actors, akka
Akka.Persistence.MongoDB
MongoDB support for Akka.Persistence
Stars: ✭ 30 (-9.09%)
Mutual labels:  actors, akka
Akka Essentials
Java/Scala Examples from the book - Akka Essentials
Stars: ✭ 700 (+2021.21%)
Mutual labels:  actors, akka
Tacks
Real-time multiplayer sailing game, in your browser
Stars: ✭ 134 (+306.06%)
Mutual labels:  actors, akka
protoactor-go
Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
Stars: ✭ 4,138 (+12439.39%)
Mutual labels:  actors, akka
pyIslam
pyIslam, a Python library to calculate prayer times, hijri date, qiblah direction and more
Stars: ✭ 68 (+106.06%)
Mutual labels:  prayer-times, islamic-prayer-times
endless
Scala library to describe sharded and event sourced entities using tagless-final algebras
Stars: ✭ 70 (+112.12%)
Mutual labels:  actors, akka
Akkatecture
a cqrs and event sourcing framework for dotnet core using akka.net
Stars: ✭ 414 (+1154.55%)
Mutual labels:  actors, akka
protoactor-python
Proto Actor - Ultra fast distributed actors
Stars: ✭ 78 (+136.36%)
Mutual labels:  actors, akka
Protoactor Go
Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
Stars: ✭ 3,934 (+11821.21%)
Mutual labels:  actors, akka
Nact
nact ⇒ node.js + actors ⇒ your services have never been so µ
Stars: ✭ 848 (+2469.7%)
Mutual labels:  actors, akka
Robots
Actor system for Rust
Stars: ✭ 294 (+790.91%)
Mutual labels:  actors, akka
Actors
Evaluation of API and performance of different actor libraries
Stars: ✭ 125 (+278.79%)
Mutual labels:  actors, akka
Lagom
Reactive Microservices for the JVM
Stars: ✭ 2,590 (+7748.48%)
Mutual labels:  akka, playframework
nact
nact ⇒ node.js + actors ⇒ your services have never been so µ
Stars: ✭ 1,003 (+2939.39%)
Mutual labels:  actors, akka
akka-cqrs-activator
Issue tracker PoC application written in Scala (Akka) and JavaScript (React) that demonstrates event sourcing and CQRS
Stars: ✭ 33 (+0%)
Mutual labels:  actors, akka
PrayerTimes-Swift
Islamic Prayer (salah) Time calculation written in swift.
Stars: ✭ 47 (+42.42%)
Mutual labels:  prayer-times, islamic-prayer-times

Muezzin API

Welcome to Muezzin API web service!

This application provides Islamic prayer times for more than 200 countries, their cities and many of their districts. Data is read from Republic of Turkey, Presidency of Religious Affairs' website and provided in a simple JSON structure.

The application will be running at https://muezzin-staging.herokuapp.com.

Technical Details

Muezzin API application is developed using Play Framework and Scala. The application utilizes Akka Actors actors for scheduling jobs, WS for making HTTP requests, Firebase Realtime Database for data persistance and Errors for error handling.

Deploying Muezzin API to AWS ElasticBeanstalk

Add host of your EB host to application.conf under play.filters.hosts.allowed. Here's an example:

play {
  filters.hosts {
    allowed = [
      "muezzin.123456.eu-west-1.elasticbeanstalk.com",
      "muezzin.herokuapp.com",
      "muezzin-staging.herokuapp.com",
      "localhost:9000"
    ]
  }
}

Then run sbt elastic-beanstalk:dist to create ZIP file that you can upload to your ElasticBeanstalk.

Thanks @gokhanayhan38 for his help.

API Reference

General

  • All endpoints use GET method.
  • When a request is successful, response will be 200 OK with application/json as Content-Type and the requested data in body.
  • When a request fails, response will be 503 SERVICE_UNAVAILABLE with application/json as Content-Type and error data in body according to Errors.
Example Response With Errors
{
  "errors": [
    {
      "name": "requestFailed",
      "reason": "Diyanet returned invalid content type.",
      "data": "applocation/xml"
    }
  ]
}
  • Each object in errors array will correspond to a single error. There may be 1 or more error objects.
  • name will be provided for all types of errors whereas reason and data might not be available for all errors.

Countries

GET: /countries

It returns available countries.

Example Response
{
  "countries": {
    "2": {
      "name": "Turkey",
      "nameTurkish": "Türkiye",
      "nameNative": "Türkiye"
    }
  }
}
  • Every key in countries object is the id for the country in the value object.
  • name is the name of country in English.
  • nameTurkish is the name of the country in Turkish.
  • nameNative is the name of the country in their native language.

Cities

GET: /countries/<countryId>/cities

It returns available cities of given countryId.

Example Response
{
  "cities": {
    "540": {
      "name": "İzmir"
    }
  }
}
  • Every key in cities object is the id for the city in the value object.
  • name is the name of the city.

Districts

GET: /countries/<countryId>/cities/<cityId>/districts

It returns available districts of given cityId of countryId. Please note that some cities might not have districts available.

Example Response
{
  "districts": {
    "9552": {
      "name": "Aliağa"
    }
  }
}
  • Every key in districts object is the id for the district in the value object.
  • name is the name of the district.

Prayer Times

GET: /prayerTimes/country/<countryId>/city/<cityId>/district/<districtId>

It returns prayer times for a month belonging to given countryId, cityId and districtId. Please note that there are no times available for past dates and more than 1 month future dates. Diyanet only provides 1 month of prayer times starting from current time. Therefore, it is client's responsibility to keep requested prayer times and request more whenever needed.

Example Response
{
  "prayerTimes": {
    "2016-08-23": {
      "fajr": "04:56",
      "shuruq": "06:26",
      "dhuhr": "13:21",
      "asr": "17:02",
      "maghrib": "20:03",
      "isha": "21:26",
      "qibla": "12:00"
    }
  }
}
  • Every key in prayerTimes object is the date for the prayer times in the value object. Dates are formatted as: yyyy-MM-dd
  • fajr, shuruq, dhuhr, asr, maghrib, isha and qibla are times formatted as HH:mm, representing the named times respectively.
  • qibla is set to 00:00 when it is not available.

License

Muezzin API is licensed under the terms of the MIT License.

MIT License

Copyright (c) 2017 Mehmet Akif Tütüncü

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].