Sha256: 433b90f4e582d698cc27d5279f235d108b3cc56c2622ba0f47b10ffcf3dd88a8

Contents?: true

Size: 803 Bytes

Versions: 17

Compression:

Stored size: 803 Bytes

Contents

Parse.init :application_id  => "your_application_id",
           :api_key         => "your_REST_API_Key"

profile = Parse::Object.new "Profile"
profile["first_name"]    = "John"
profile["last_name"]     = "Doe"
profile["username"]      = "jdoe"
profile["email_address"] = "jdoe@fubar.com"
profile["birthday"]      = Parse::Date.new "1980-12-25"
profile.save

profile.increment "login_count"

# Queries
cls = "GameScore"
(1..100).each { |i|
  score = Parse::Object.new cls
  score["score"] = i
  score.save
}

Parse::Query.new(cls)       \
  .greater_eq("score", 10)  \
  .less_eq("score", 20)     \
  .get

Parse::Query.new(cls)                   \
  .value_in("score", [10, 20, 30, 40])  \
  .get

# Pushes
push = Parse::Push.new({ "alert"=> "I'm sending this push to all my app users!" })
push.save
  

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
parse-ruby-client-0.2.0 example.rb
parse-ruby-client-0.1.15 example.rb
parse-ruby-client-0.1.14 example.rb
parse-ruby-client-0.1.13 example.rb
parse-ruby-client-0.1.12 example.rb
parse-ruby-client-0.1.11 example.rb
parse-ruby-client-0.1.10 example.rb
parse-ruby-client-0.1.9 example.rb
parse-ruby-client-0.1.8 example.rb
parse-ruby-client-0.1.7 example.rb
parse-ruby-client-0.1.6 example.rb
parse-ruby-client-0.1.5 example.rb
parse-ruby-client-0.1.4 example.rb
parse-ruby-client-0.1.3 example.rb
parse-ruby-client-0.1.2 example.rb
parse-ruby-client-0.1.1 example.rb
parse-ruby-client-0.1.0 example.rb