Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This repository contains a gem for the Japan Meteorological Agency (気象庁) for searching new information simplifies. To use the API contains information, see the terms and conditions. (気象庁ホームページについて)
If-Modified-Since
.Add this line to your application's Gemfile:
gem 'jma'
And then execute:
bundle install
Or install it yourself as:
gem install jma
To construct a client, available to configure a :response_type, :logger, :temporary_directory and :cache.
client = JMA::Client.new.tap do |config|
config.response_type = :raw
config.logger = Logger.new($stdout)
config.cache = ActiveSupport::Cache.lookup_store(:file_store, 'tmp')
end
Options Hash:
ActiveSupport::Cache
.feed = JMA::Client.new.tap do |config|
config.response_type = :object
end.request_extra
puts <<~EOF
発表時刻: #{feed.updated.content.strftime('%Y-%m-%d %H:%M:%S')} 「#{feed.title.content} - #{feed.subtitle.content}」
#{feed.items.first.content.content}
#{feed.items.first.id.content}
#{feed.items.first.author.name.content}
EOF
#=> 発表時刻: 2022-01-07 19:53:07 「高頻度(随時) - JMAXML publishing feed」
#=> 【石狩・空知・後志地方気象警報・注意報】後志地方では、8日までなだれに注意してください。
#=> http://www.data.jma.go.jp/developer/xml/data/20220107105234_0_VPWW53_016000.xml
#=> 札幌管区気象台
When you specify :object
at :response_type
, Obtain an RSS::Atom::Entry
object.
気象に関する情報のうち、天気概況など定時に発表されるもの。毎分更新し、直近少なくとも10分入電を掲載しています。*1
#request_regular()
#request_regular_long()
気象に関する情報のうち、警報・注意報など随時発表されるもの。毎分更新し、直近少なくとも10分入電を掲載しています。*1
#request_extra()
#request_extra_long()
地震、火山に関する情報。毎分更新し、直近少なくとも10分入電を掲載しています。*1
request_eqvol()
request_eqvol_long()
その他の情報。毎分更新し、直近少なくとも10分入電を掲載しています。*1
request_other()
request_other_long()
When you specify :object
at :response_type
, Obtain a Faraday::Response
object.
#request_area_codes()
#request_amedas_latest_time()
#request_amedas_map()
#request_amedas_point()
#request_amedas_point_date()
#request_amedas_table()
#request_amedas_selector_information()
#request_overview_forecast(n)
#request_forecast(n)
#request_warning()
#request_himawari_fd()
#request_himawari_jp()
#request_jmatile_n1()
#request_jmatile_n2()
#request_xml(url)
jma_client = JMA::Client.new.tap do |config|
config.response_type = :object
end
jma_client.request_xml('http://www.data.jma.go.jp/developer/xml/data/20211229170106_0_VFVO52_400000.xml')
rspec spec
Bug reports and pull requests are welcome on Bitbucket at https://bitbucket.org/routeflagsinc/jma. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
*1 出典:気象庁ホームページ 気象庁防災情報XML - DATA GO JP
FAQs
Unknown package
We found that jma demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.