Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
The easiest and most complete rubygem for the Persona API. Currently supports API v1
Add this line to your application's Gemfile:
gem 'persona_api', github: "mattgriffith0/persona_api"
And then execute:
$ bundle
Or install it yourself with:
$ gem install persona_api
To access the API, you'll need to create a PersonaApi::Client
and pass in your API key. You can find your API key in your Persona dashboard.
client = PersonaApi::Client.new(api_key: ENV["PERSONA_API_KEY"])
The client then gives you access to all of the resources.
The gem attempts to map as closely as possible to the Persona API so that you can easily convert API examples in to gem code.
Responses are (in almost all cases) created as Objects like PersonaApi::Account
. Having types like PersonaApi::Inquiry
is useful for understanding the type of object you're working with. They're built using OpenStruct so that data is easily accessible in a Rubyish way.
list
endpoints return pages of results. The result object will have a data
key to access the results, as well as metadata like next_page
and prev_page
for retrieving the next and previous pages. You may also specify the number of results you would like to have returned and, for some resources, other specific filter params.
results = client.inquiries.list("page[size]": 5)
#=> PersonaApi::Collection
results.data
#=> [#<PersonaApi::Inquiry>, #<PersonaApi::Inquiry>]
results.next_page
#=> "inq_NiHBQW47WfdPT58m4VcqFebx"
# Retrieve the next page
client.inquiries.list("page[size]": 5, "page[after]": results.next_page)
#=> PersonaApi::Collection
client.accounts.list
client.accounts.create({})
client.accounts.retrieve(act_id: "id")
client.accounts.update(act_id: "id", {})
client.accounts.redact(act_id: "id")
client.accounts.add_tag(act_id: "id", {})
client.accounts.remove_tag(act_id: "id", {})
client.accounts.set_all_tags(act_id: "id", {})
client.api_logs.list
client.api_logs.retrieve(req_id: "id")
client.cases.list
client.cases.create({})
client.cases.retrieve(case_id: "id")
client.cases.assign(case_id: "id", {})
client.cases.set_status(case_id: "id", {})
client.cases.add_persona_objects(case_id: "id", {})
client.database_verifications.create({})
client.database_verifications.retrieve(ver_id: "id")
client.database_verifications.submit(ver_id: "id", {})
client.documents.retrieve(doc_id: "id")
client.events.list
client.events.retrive(evt_id:)
client.files.download(file_id:, file_name:)
client.government_id_verifications.create({})
client.government_id_verifications.retrieve(ver_id: "id")
client.government_id_verifications.submit(ver_id: "id", {})
client.inquiries.list
client.inquiries.create({})
client.inquiries.retrieve(inq_id: "id")
client.inquiries.print(inq_id: "id")
client.inquiries.update(inq_id: "id", {})
client.inquiries.redact(inq_id: "id")
client.inquiries.add_tag(inq_id: "id", {})
client.inquiries.remove_tag(inq_id: "id", {})
client.inquiries.set_all_tags(inq_id: "id", {})
client.inquiries.resume(inq_id: "id")
client.inquiries.approve(inq_id: "id", {})
client.inquiries.decline(inq_id: "id", {})
client.lists.list
client.lists.retrieve(lst_id: "id")
client.lists.archive(lst_id: "id")
client.lists.create_browser_fingerprint_list({})
client.lists.create_country_list({})
client.lists.create_email_address_list({})
client.lists.create_face_list({})
client.lists.create_geolocation_list({})
client.lists.create_government_id_number_list({})
client.lists.create_ip_address_list({})
client.lists.create_name_list({})
client.lists.create_phone_number_list({})
client.phone_carrier_verifications.create({})
client.phone_carrier_verifications.retrieve(ver_id: "id")
client.phone_carrier_verifications.submit(ver_id: "id", {})
client.phone_number_verifications.create({})
client.phone_number_verifications.retrieve(ver_id: "id")
client.phone_number_verifications.send_sms(ver_id: "id", {})
client.phone_number_verifications.confirm(ver_id: "id", {})
client.reports.list
client.reports.create({})
client.reports.retrieve(rep_id: "id")
client.reports.print(rep_id: "id")
client.reports.redact(rep_id: "id")
client.reports.add_tag(rep_id: "id", {})
client.reports.remove_tag(rep_id: "id", {})
client.reports.set_all_tags(rep_id: "id", {})
client.selfie_verifications.create({})
client.selfie_verifications.retrieve(ver_id: "id")
client.selfie_verifications.submit(ver_id: "id")
client.tin_database_verifications.create({})
client.tin_database_verifications.retrieve(ver_id: "id")
client.tin_database_verifications.submit(ver_id: "id", {})
client.transactions.create({})
client.transactions.retrieve(txn_id: "id")
client.user_audit_logs.list
client.user_audit_logs.retrieve(ual_id: "id")
client.verifications.retrieve(ver_id: "id")
client.verifications.print(ver_id: "id")
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment. This will create a @client
for you to use, assuming you have assigned an API key to ENV["PERSONA_API_KEY"]
.
Bug reports and pull requests are welcome on GitHub at https://github.com/mattgriffith0/persona_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
Everyone interacting in the PersonaApi project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Massive thanks to Chris Oliver, whose Vultr gem served as inspiration.
FAQs
Unknown package
We found that persona_api 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.