Sha256: dae2a39d7e64f184b7a3c74c7032b16439f01979cf4f6adc16b57034af1cff4b
Contents?: true
Size: 704 Bytes
Versions: 3
Compression:
Stored size: 704 Bytes
Contents
#!/usr/bin/env ruby require "rubygems" Bundler.require(:default, "development") if defined?(Bundler) path = File.expand_path(File.dirname(__FILE__) + "/../lib/") $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path) require path + '/spark_api' SparkApi.logger.info("Hello!") SparkApi.configure do |config| config.endpoint = 'https://sparkapi.com' config.authentication_mode = SparkApi::Authentication::OAuth2 end SparkApi.client.session = SparkApi::Authentication::OAuthSession.new({ :access_token => "your_access_token_here" }) client = SparkApi.client list = client.get '/contacts' puts "client: #{list.inspect}" list = SparkApi::Models::Contact.get puts "model: #{list.inspect}"
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
spark_api-1.6.3 | script/example.rb |
spark_api-1.6.2 | script/example.rb |
spark_api-1.6.1 | script/example.rb |