firebase-ruby是Firebase后端API的Ruby语言封装。
示例代码:
Firebase.base_uri = 'https://<your-firebase>.firebaseio.com/'response = Firebase.push("todos", { :name => 'Pick the milk', :priority => 1 })response.success? # => trueresponse.code # => 200response.body # => { 'name' => "-INOQPH-aV_psbk3ZXEX" }response.raw_body # => '{"name":"-INOQPH-aV_psbk3ZXEX"}'
评论