mirror api with ruby