Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

SalesKing SDK for creating apps and using the API

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ci
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 sk_sdk.gemspec
README.rdoc

SalesKing SDK

Automate your workflow's by integrating and connecting your business with SalesKing. This Ruby Software-Development-Kit provides solid and handy tools for building SalesKing App's(using oAuth2) and API clients.

Install

gem install sk_sdk

Dependencies (gem's):

  • activesupport

  • activeresource v2.3.x, v3.1+ (v3.0.10 until sk_sdk v0.0.8)

  • curb

  • sk_api_schema

Classes

All classes must be explicitly required so each can be used on their own.

require 'sk_sdk/signed_request'
require 'sk_sdk/oauth'
require 'sk_sdk/base'
require 'sk_sdk/sync'

API client

Uses ActiveResource to CRUD SalesKing object's see usage in README

oAuth

Get an oAuth2 access token and create oAuth related URL's. There also is an omniAuth strategy.

SignedRequest

De/encoding of signed_request parameter on canvas pages and PubSub/Webhook callbacks.

Sync

Map & Synchronize fields of a local with an remote object. Tackles the problem of normalizing objects to match internal data structures. Synchronization is done by a field-mapping and also sports transition methods for each way.

Usage

Read specs: github.com/salesking/sk_sdk/tree/master/spec/sk_sdk

Tests

Before you run the tests install required gems via bundler. We are providing several Gemfiles because of different patches for active_resource v2 vs v3. This definitly sucks, but as long as we stay with ARes we need to ensure it is working with every version.

Before running the specs, add your SalesKing credentials to /spec/settings.yml

cp spec/settings.yml.default spec/settings.yml

# test with most recent ARes version
bundle install
rake spec

#test with ARes 2
BUNDLE_GEMFILE=ci/Gemfile_ar2 bundle install
BUNDLE_GEMFILE=ci/Gemfile_ar2 bundle exec rake spec

Copyright © 2011 Georg Leciejewski, released under the MIT license

Something went wrong with that request. Please try again.