ruby api examples