/** filename: README.md **/
# Welcome
Welcome to your new {{&platformConfig.name}} SDK!


## Installation
To use this SDK, you should copy the {{&sdkname}} directory in its entirety in to the appropriate place within your {{&platformConfig.name}} project.

Then, this SDK needs the following dependencies installed:

    npm install request lru-cache --save


## Usage
Once you have it installed, you can require your main SDK file to get models, endpoints, and change configuration at runtime:

    var {{&sdkname}} = require('./{{&sdkname}}');
    {{&sdkname}}.port = 8080;
    // {{&sdkname}}.domain = 'http://your.domain.com';
{{#authByBasic}}
    {{#config.apikey}}
    // Basic Auth.
    {{&sdkname}}.Authorization = '{{&config.apikey}}';
    {{/config.apikey}}
    {{#config.apikey_production}}
    // Production Basic Auth.
    {{&sdkname}}.Authorization = '{{&config.apikey_production}}';
    {{/config.apikey_production}}
    {{#config.apikey_development}}
    // Development Basic Auth.
    {{&sdkname}}.Authorization = '{{&config.apikey_development}}';
    {{/config.apikey_development}}
{{/authByBasic}}
{{#authByAPIKey}}
    {{#config.apikey}}
    // API Key.
    {{&sdkname}}.APIKey = '{{&config.apikey}}';
    {{/config.apikey}}
    {{#config.apikey_production}}
    // Production API Key.
    {{&sdkname}}.APIKey = '{{&config.apikey_production}}';
    {{/config.apikey_production}}
    {{#config.apikey_development}}
    // Development API Key.
    {{&sdkname}}.APIKey = '{{&config.apikey_development}}';
    {{/config.apikey_development}}
{{/authByAPIKey}}
    // {{&sdkname}}.timeout = 30000;
    
    var User = {{&sdkname}}.getModel('user');
    User.findAll(function(err, results, client) {
        console.log(results);
    });
    
    {{&sdkname}}.getAPI('/api/test', 'GET').execute(function(err, results, client) {
        console.log(results);
    });

{{&securityPluginREADME}}


## Caching
The client SDK can cache GET results for quick retrieval later using various strategies. By default, it doesn't do
any caching. But you can change that very easily:

    // For everything:
    {{&sdkname}}.cachePolicy = {
    	type: {{&sdkname}}.Policy.CacheElseNetwork, // Use cached results right away if we can.
    	duration: 60 * 60 * 1000 // Cache for one hour (in milliseconds)
    };
    
    // For an {{&sdkname}} model:
    var User = {{&sdkname}}.getModel('user');
    User.cachePolicy = ...;
    
    // For a particular {{&sdkname}} method:
    User.findAll(function(err, results, client) {}, { cachePolicy: ... });

{{> CachingStrategies.md}}
