Skip to content

Commit

Permalink
To manager
Browse files Browse the repository at this point in the history
  • Loading branch information
rricard committed Jun 16, 2014
1 parent 76830cc commit f3a6d05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";

Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f3a6d05

Please sign in to comment.