Connecting to the REST API using Ruby