Code Monkey home page Code Monkey logo

prayer_time's Introduction

PrayerTime

This gem obtains to praying times from Presidency of Religious Affairs

Installation

Add this line to your application's Gemfile:

gem 'prayer_time'

And then execute:

$ bundle

Or install it yourself as:

$ gem install prayer_time

Usage

PrayerTime.countries
# {"2"=>"TURKIYE",
# "33"=>"ABD",
# "166"=>"AFGANISTAN",
# "13"=>"ALMANYA",
# ...

PrayerTime.cities("TURKIYE")
# => [{"Disabled"=>false, "Group"=>nil, "Selected"=>false, "Text"=>"ADANA", "Value"=>"500"},
# {"Disabled"=>false, "Group"=>nil, "Selected"=>false, "Text"=>"ADIYAMAN", "Value"=>"501"},
# ...

PrayerTime.towns("TURKIYE", "SAMSUN")
# =>[{"Disabled"=>false, "Group"=>nil, "Selected"=>false, "Text"=>"19 MAYIS", "Value"=>"9809"},
# {"Disabled"=>false, "Group"=>nil, "Selected"=>false, "Text"=>"ALAÇAM", "Value"=>"9810"},
# ...

PrayerTime.times("TURKIYE", "SAMSUN", "19 MAYIS")
# => {"Imsak"=>"03:26",
#  "Gunes"=>"05:17",
#  "Ogle"=>"12:49",
#  "Ikindi"=>"16:44",
#  "Aksam"=>"20:09",
#  "Yatsi"=>"21:51",
#  "NextImsak"=>"03:26",
#  "MoonSrc"=>"d7.gif",
#  "HicriTarih"=>"21 Şevval 1437",
#  "MiladiTarih"=>"25.07.2016",
#  "RumiTarih"=>nil,
#  "Enlem"=>0,
#  "Boylam"=>0,
#  "KibleAcisi"=>"169",
#  "UlkeAdi"=>"TÜRKİYE",
#  "SehirAdi"=>"SAMSUN",
#  "KibleSaati"=>"12:26",
#  "GunesBatis"=>"20:01",
#  "GunesDogus"=>"05:24",
#  "ItemId"=>9809,
#  "HolyDaysItem"=>nil}

If the country hasn't any town, something like this:

PrayerTime.towns("BOSNA HERSEK", "SREBRENICA")
# => [ ] // hasn't any town

PrayerTime.times("BOSNA HERSEK", "SREBRENICA")
# => {"Imsak"=>"03:11",
# "Gunes"=>"05:18",
# "Ogle"=>"12:56",
# "Ikindi"=>"16:56",
# "Aksam"=>"20:22",
# "Yatsi"=>"22:15",
# "NextImsak"=>"03:11",
# ...

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ecmelkytz/prayer_time

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -a -m 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

The gem is available as open source under the terms of the MIT License.

prayer_time's People

Contributors

ecmelkytz avatar

Stargazers

Roman avatar

Watchers

 avatar

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.