Making a API Wrapper for DigitalOcean using HTTParty

July 8, 2014 1.8k views


So I will be honest, this is my first API I've ever used, or attempted to work with. I have very specific goals, and I currently have a Droplet running with 528 MB of RAM on CentOS.

I have installed Ruby and RubyGems with the intent of installing barge, which I discovered is only compatible with Ruby 1.9.2, and I am running the latest version 2.1.2.

So I talked to a person, from DigitalOcean who kindly recommended I try to use HTTParty as a alternative to Barge. However, after installing HTTParty successfully, I began to write my script. I discovered that it wasn't as easy as just trying to implement the API.

Basically what I am trying to do is, build a Wrapper for HTTParty. So that I can implement the Digital Ocean API! I know its very simple, but I can't seem to find the HTTParty documentation, so if anyone knows the documentation please let me know!

With much appreciation, Ryan

Feel free to comment here, or hit up my skype: ryanw_se

2 Answers

The docs are right here, including how to wrap it.


Hi, Ryan!

Author of Barge here. Barge supports Ruby 1.9.2 or newer, and 2.1.2 should work fine (anything else is a bug). If you have problems using Barge with 2.1.2, could you open an issue and describe what goes wrong? Thanks!

Have another answer? Share your knowledge.