Report this

What is the reason for this report?

Making a API Wrapper for DigitalOcean using HTTParty

Posted on July 8, 2014

Hello,

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



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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!

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

https://github.com/jnunemaker/httparty

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.