Sha256: 1b51820af24f7811b470e9e947659684e47a32e57b39f52344cc6da409252904

Contents?: true

Size: 681 Bytes

Versions: 4

Compression:

Stored size: 681 Bytes

Contents

# frozen_string_literal: true

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rubygems'
require 'ncmb'
require 'yaml'
yaml = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'setting.yml'))
NCMB.initialize(
  application_key: yaml['application_key'],
  client_key: yaml['client_key']
)

script = NCMB::Script.new 'helloworld.js'
results = script.get
puts results

script = NCMB::Script.new 'helloworld2.js'
results = script.get(query: {a: 'b'})
puts results

script = NCMB::Script.new 'email.js'
results = script.post(body: {email: 'atsushi@moongift.jp', option: 'Test', body: 'message'})
puts results

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ncmb-ruby-client-0.2.0 examples/script.rb
ncmb-ruby-client-0.1.7 examples/script.rb
ncmb-ruby-client-0.1.6 examples/script.rb
ncmb-ruby-client-0.1.5 examples/script.rb