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.
Get weather information about a city easily with Maju.
Maju is a rubygem package, and it can be installed via gem install command
gem install maju
or you can add to your Gemfile
gem maju
and then run
bundle install
After instalation and before usage, you need to create a account onOpen Weather Site and gerenate a API key. To create an API key, follow the steps in this tutorial
After get your API KEY, you need to start a maju client.
client = Maju::Client.new(api_token: 'YOUR_API_KEY_HERE', lang: 'pt_BR', unit: 'celsius')
Now you will use the instance 'client' to call all public method
To get today information about weather.
You need to pass city name with params 'city'
client.current(city: 'Monte Santo de Minas')
or to pass a lat and long cordinates
client.current(lat: '-21.2049202', long: '-47.0943532')
If you don't know lat and long from city, use geocode method.
if you need to find out lat and long of some city you can use geocode method
client.geocode(city: 'Monte Santo de Minas')
it will returns the array.
NOTE: if the return contains only one object, that is, only one city was found, it will return a direct object. If there is more than one city, an array containing objects will be returned, in the same structure.
[
{
"name": "Mococa",
"lat": -21.464731,
"lon": -47.002405,
"country": "BR",
"state": "São Paulo"
}
]
To get forecast for the days ahead, you can use the forecast method. If you don't know lat and long informations, use the geocode method.
client.forecast(lat: '-21.2049202', long: '-47.0943532')
StringHelper is available under the MIT license.
FAQs
Unknown package
We found that maju 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.