How to make a Fly API call from Ruby

04-Aug-2023 827
Fly has a graphql API available. You can find ways to use it by looking through their CLI's source code.I recently wanted to automate a Fly API call from a ruby script. And I was not in an environment where I wanted to install the fly CLI.Here's some code you can steal, it uses Faraday to make a request to Fly's graphql API.This specific example shows how to delete an existing application.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle