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.
LocationApi - the Ruby gem for the Locations API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This SDK is automatically generated by the OpenAPI Generator project:
To build the Ruby code into a gem:
gem build pnap_location_api.gemspec
Then either install the gem locally, replacing <VERSION>
with the actual version:
gem install ./pnap_location_api-<VERSION>.gem
(for development, run gem install --dev ./pnap_location_api-<VERSION>.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'pnap_location_api', '~> <VERSION>'
To install this Gem from this repository, you'll need to get Bundler by doing gem install bundler
. Add the following line in your Gemfile:
gem 'pnap_location_api', git: 'https://github.com/phoenixnap/ruby-sdk-bmc-poc', glob: 'LocationApi/*.gemspec'
If you'd like the development version:
gem 'pnap_location_api', git: 'https://github.com/phoenixnap/ruby-sdk-bmc-poc', glob: 'LocationApi/*.gemspec', branch: 'develop'
Then run bundle install
.
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'pnap_location_api'
api_instance = LocationApi::LocationsApi.new
opts = {
location: LocationApi::LocationEnum::PHX, # LocationEnum | Location of interest
product_category: LocationApi::ProductCategoryEnum::SERVER # ProductCategoryEnum | Product category of interest
}
begin
#Get All Locations
result = api_instance.get_locations(opts)
p result
rescue LocationApi::ApiError => e
puts "Exception when calling LocationsApi->get_locations: #{e}"
end
Authorization can also be setup by using the oauth
library:
# Load the gem
require 'pnap_location_api'
require 'oauth2'
# Setup variables for getting a token.
client_id = 'YOUR_CLIENT_ID'
client_secret = 'YOUR_CLIENT_SECRET'
auth_url = 'https://auth.phoenixnap.com/auth/realms/BMC/protocol/openid-connect/token'
All URIs are relative to https://api.phoenixnap.com/location-api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
LocationApi::LocationsApi | get_locations | GET /locations | Get All Locations |
Endpoints do not require authorization.
FAQs
Unknown package
We found that pnap_location_api demonstrated a healthy version release cadence and project activity because the last version was released less than 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.