diff --git a/README.md b/README.md index 64f5bce..fbda12e 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Create a client, then call `getAccessToken()` with the code and a callback. Call var AnyFetch = require('anyfetch'); // Get your id and secret key on -// http://settings.anyfetch.com/oauth/applications +// http://manager.anyfetch.com/oauth/applications var ANYFETCH_ID = "your_anyfetch_id"; var ANYFETCH_SECRET = "your_anyfetch_secret"; @@ -49,7 +49,7 @@ Create a client, then call `setAccessToken()` with some access_token. Then, call var AnyFetch = require('anyfetch'); // Get your id and secret key on -// http://settings.anyfetch.com/oauth/applications +// http://manager.anyfetch.com/oauth/applications var ANYFETCH_ID = "your_anyfetch_id"; var ANYFETCH_SECRET = "your_anyfetch_secret"; @@ -87,7 +87,7 @@ var fs = require('fs'); var AnyFetch = require('anyfetch'); // Get your id and secret key on -// http://settings.anyfetch.com/oauth/applications +// http://manager.anyfetch.com/oauth/applications var ANYFETCH_ID = "your_anyfetch_id"; var ANYFETCH_SECRET = "your_anyfetch_secret"; @@ -127,7 +127,7 @@ afclient.sendDocument(document, function(err, document) { var AnyFetch = require('anyfetch'); // Get your id and secret key on -// http://settings.anyfetch.com/oauth/applications +// http://manager.anyfetch.com/oauth/applications var ANYFETCH_ID = "your_anyfetch_id"; var ANYFETCH_SECRET = "your_anyfetch_secret"; @@ -160,11 +160,11 @@ Call `sendDocumentAndFile()` with an object hash defining the document, an objec ### `debug.createTestFrontServer(debugFunction)` Create a mock server for your test, to trade authorization grants. Will always return an `access_token` with value `fake_access_token`. -Use with `process.env.ANYFETCH_SETTINGS_URL`, for instance: +Use with `process.env.ANYFETCH_MANAGER_URL`, for instance: ```javascript var AnyFetch = require('anyfetch'); -process.env.ANYFETCH_SETTINGS_URL = 'http://localhost:1337'; +process.env.ANYFETCH_MANAGER_URL = 'http://localhost:1337'; // Create a fake HTTP server var frontServer = AnyFetch.debug.createTestFrontServer(); diff --git a/lib/index.js b/lib/index.js index d02cad3..a0362aa 100644 --- a/lib/index.js +++ b/lib/index.js @@ -34,7 +34,7 @@ var encodeURIComponentAndParentheses = function(string) { */ module.exports = function(appId, appSecret, anyFetchServer, anyFetchFront) { // Root URL for the API. Can be updated for testing, Virtual Appliance or running in LAN. - this.API_FRONT = anyFetchFront || process.env.ANYFETCH_SETTINGS_URL || 'http://settings.anyfetch.com'; + this.API_FRONT = anyFetchFront || process.env.ANYFETCH_MANAGER_URL || 'http://manager.anyfetch.com'; this.API_ROOT = anyFetchServer || process.env.ANYFETCH_API_URL || 'https://api.anyfetch.com'; this.ACCESSTOKEN_CREATION = ACCESSTOKEN_CREATION; diff --git a/test/index.js b/test/index.js index cfea221..f95e05c 100644 --- a/test/index.js +++ b/test/index.js @@ -9,7 +9,7 @@ var fakeAnyFetchSecret = 123; var fakeAnyFetchToken = 123; describe('AnyFetchClient', function() { - process.env.ANYFETCH_SETTINGS_URL = 'http://localhost:1337'; + process.env.ANYFETCH_MANAGER_URL = 'http://localhost:1337'; process.env.ANYFETCH_API_URL = 'http://localhost:1338'; var frontServer = AnyFetchClient.debug.createTestFrontServer(); var apiServer = AnyFetchClient.debug.createTestApiServer();