Ruby class pattern to work with API requests with built-in async approach

This page summarizes the projects mentioned and recommended in the original post on dev.to

Scout Monitoring - Performance metrics and, now, Logs Management Monitoring with Scout Monitoring
Get early access to Scout Monitoring's NEW Ruby logging feature [beta] by signing up now. Start for free and enable logs to get better insights into your Rails apps.
www.scoutapm.com
featured
InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
  • uri

    URI is a module providing classes to handle Uniform Resource Identifiers (by ruby)

    I have been working with dozens of different Web APIs (mostly JSON) as a Ruby developer. Some of them can provide an official Ruby gem that you can install and use in order to interact with the API in your Ruby code. Others don't have anything like It at all and you need to implement the interaction with the API yourself. In this case, there are a lot of helpful API ruby gems that are easier to use than the default Ruby URI module https://github.com/ruby/uri. Let's list a few of them:

  • Scout Monitoring

    Performance metrics and, now, Logs Management Monitoring with Scout Monitoring. Get early access to Scout Monitoring's NEW Ruby logging feature [beta] by signing up now. Start for free and enable logs to get better insights into your Rails apps.

    Scout Monitoring logo
  • open-meteo

    Free Weather Forecast API for non-commercial use

    OpenMeteo - https://open-meteo.com/ to get weather forecast

  • Faraday

    Simple, but flexible HTTP client library, with support for multiple backends.

    Faraday - https://github.com/lostisland/faraday. Personally, I use It, just because historically it was linked to every project I worked with. In addition, you can install the Faraday Curl gem https://github.com/mauricio/faraday_curl to get nice Curl requests in logs.

  • faraday_curl

    Prints CURL compatible calls from your faraday http requests.

    Faraday - https://github.com/lostisland/faraday. Personally, I use It, just because historically it was linked to every project I worked with. In addition, you can install the Faraday Curl gem https://github.com/mauricio/faraday_curl to get nice Curl requests in logs.

  • httparty

    :tada: Makes http fun again!

    HTTPParty - https://github.com/jnunemaker/httparty. Heard a lot about It, but never used it.

  • RESTClient

    Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions.

    RESTClient - https://github.com/rest-client/rest-client for folks who prefer Sinatra's actions syntax.

  • Concurrent Ruby

    Modern concurrency tools including agents, futures, promises, thread pools, supervisors, and more. Inspired by Erlang, Clojure, Scala, Go, Java, JavaScript, and classic concurrency patterns.

    concurrent-ruby - to add async requests ability. https://github.com/ruby-concurrency/concurrent-ruby

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • dotenv

    A Ruby gem to load environment variables from `.env`. (by bkeepers)

    once ApiConnector is created with configured authorization, you will need to think about It ever again. (always use a secure way to store tokens or other secrets). If you don't know what to use, I can suggest dotenv gem - https://github.com/bkeepers/dotenv

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Polyphony 1.4 Released

    2 projects | /r/ruby | 2 Jul 2023
  • Polyphony 0.99 released. Last release before 1.0!

    2 projects | /r/ruby | 9 Mar 2023
  • Polyphony – Fine-grained concurrency for Ruby

    1 project | news.ycombinator.com | 14 Nov 2021
  • About that monkey-patching business...

    1 project | dev.to | 4 Nov 2021
  • Embracing Infinite Loops with Ruby and Polyphony

    1 project | dev.to | 13 Oct 2021

Did you konow that Ruby is
the 12th most popular programming language
based on number of metions?