Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit 21b0824

Browse files
author
Luka Skukan
committed
Rename IdSiteModel to IdSite
1 parent d5d09e6 commit 21b0824

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

lib/Client.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -936,20 +936,20 @@ Client.prototype.getOrganizations = function getOrganizations(/* [options,] call
936936
};
937937

938938
/**
939-
* Retrieves all the {@link IdSiteModel} resources for the current {@link Tenant}.
939+
* Retrieves all the {@link IdSite} resources for the current {@link Tenant}.
940940
*
941941
* @param {CollectionQueryOptions} [collectionQueryOptions]
942942
* Options for querying, paginating, and expanding the collection.
943943
*
944944
* @param {Function} callback
945945
* The function to call when then the operation is complete. Will be called
946946
* with the parameters (err, {@link CollectionResource}). The collection will
947-
* be a list of {@link IdSiteModel} objects.
947+
* be a list of {@link IdSite} objects.
948948
*
949949
* @example
950-
* client.getIdSites(function (err, idSiteModels) {
951-
* idSiteModels.each(function (idSiteModel, next) {
952-
* console.log(idSiteModel);
950+
* client.getIdSites(function (err, idSites) {
951+
* idSites.each(function (idSite, next) {
952+
* console.log(idSite);
953953
* next();
954954
* })
955955
* });

lib/resource/IdSiteModel.js renamed to lib/resource/IdSite.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ var utils = require('../utils');
44
var InstanceResource = require('./InstanceResource');
55

66
/**
7-
* @class IdSiteModel
7+
* @class IdSite
88
*
99
* @description
10-
* Encapsulates a IdSiteModel resource. For full documentation of this resource, please see
10+
* Encapsulates a IdSite resource. For full documentation of this resource, please see
1111
* [REST API Reference: ID Site](https://docs.stormpath.com/rest/product-guide/latest/reference.html?#id-site).
1212
*
1313
* This class should not be manually constructed. It should be obtained from one of these methods:
14-
* - {@link Organization#getIdSiteModel Organization.getIdSiteModel()}
14+
* - {@link Organization#getIdSite Organization.getIdSite()}
1515
* - {@link Tenant#getIdSites Tenant.getIdSites()}
1616
*
1717
* @augments {InstanceResource}
1818
*
19-
* @param {Object} idSiteModelResource
19+
* @param {Object} idSiteResource
2020
* The JSON representation of this resource, retrieved the Stormpath REST API.
2121
*/
22-
function IdSiteModel() {
23-
IdSiteModel.super_.apply(this, arguments);
22+
function IdSite() {
23+
IdSite.super_.apply(this, arguments);
2424
}
2525

26-
utils.inherits(IdSiteModel, InstanceResource);
26+
utils.inherits(IdSite, InstanceResource);
2727

28-
module.exports = IdSiteModel;
28+
module.exports = IdSite;

lib/resource/Organization.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var utils = require('../utils');
66
var Account = require('./Account');
77
var Application = require('./Application');
88
var CustomData = require('./CustomData');
9-
var IdSiteModel = require('./IdSiteModel');
9+
var IdSite = require('./IdSite');
1010
var OrganizationAccountStoreMapping = require('./OrganizationAccountStoreMapping');
1111

1212
/**
@@ -350,9 +350,9 @@ Organization.prototype.getGroups = function getGroups(/* [options,] callback */)
350350
*
351351
* @private
352352
*/
353-
Organization.prototype.getIdSiteModel = function getIdSiteModel(/* [options,] callback */) {
353+
Organization.prototype.getIdSite = function getIdSite(/* [options,] callback */) {
354354
var args = utils.resolveArgs(arguments, ['options', 'callback'], true);
355-
return this.dataStore.getResource(this.idSiteModel.href, args.options, IdSiteModel, args.callback);
355+
return this.dataStore.getResource(this.idSite.href, args.options, IdSite, args.callback);
356356
};
357357

358358
/**

lib/resource/Tenant.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,20 +221,20 @@ Tenant.prototype.getCustomData = function getCustomData(/* [options,] callback *
221221
};
222222

223223
/**
224-
* Retrieves all the {@link IdSiteModel} resources for this resource.
224+
* Retrieves all the {@link IdSite} resources for this resource.
225225
*
226226
* @param {CollectionQueryOptions} [collectionQueryOptions]
227227
* Options for querying, paginating, and expanding the collection.
228228
*
229229
* @param {Function} callback
230230
* The function to call when then the operation is complete. Will be called
231231
* with the parameters (err, {@link CollectionResource}). The collection will
232-
* be a list of {@link IdSiteModel} objects.
232+
* be a list of {@link IdSite} objects.
233233
*
234234
*/
235235
Tenant.prototype.getIdSites = function getTenantIdSites(/* [options,] callback */) {
236236
var args = utils.resolveArgs(arguments, ['options', 'callback'], true);
237-
return this.dataStore.getResource(this.idSites.href, args.options, require('./IdSiteModel'), args.callback);
237+
return this.dataStore.getResource(this.idSites.href, args.options, require('./IdSite'), args.callback);
238238
};
239239

240240
module.exports = Tenant;

test/sp.resource.organization_test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('resource/Organization.js', function () {
6262
groups: {
6363
href: '1f8c3fc4-69eb-48b1-a078-1a249a76196b'
6464
},
65-
idSiteModel: {
65+
idSite: {
6666
href: '0967db49-93aa-48d2-b801-18ebd9dba53e'
6767
},
6868
accountStoreMappings: {
@@ -682,11 +682,11 @@ describe('resource/Organization.js', function () {
682682
});
683683
});
684684

685-
describe('.getIdSiteModel(options, callback)', function () {
685+
describe('.getIdSite(options, callback)', function () {
686686
var returnValue;
687687

688688
beforeEach(function () {
689-
returnValue = organization.getIdSiteModel(options, callbackSpy);
689+
returnValue = organization.getIdSite(options, callbackSpy);
690690
});
691691

692692
it('should pass the options to dataStore.getResource', function () {
@@ -703,11 +703,11 @@ describe('resource/Organization.js', function () {
703703
});
704704
});
705705

706-
describe('.getIdSiteModel(callback)', function () {
706+
describe('.getIdSite(callback)', function () {
707707
var returnValue;
708708

709709
beforeEach(function () {
710-
returnValue = organization.getIdSiteModel(callbackSpy);
710+
returnValue = organization.getIdSite(callbackSpy);
711711
});
712712

713713
it('should pass the callback to dataStore.getResource', function () {

test/sp.resource.tenant_test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var Account = require('../lib/resource/Account');
77
var Tenant = require('../lib/resource/Tenant');
88
var Application = require('../lib/resource/Application');
99
var Directory = require('../lib/resource/Directory');
10-
var IdSiteModel = require('../lib/resource/IdSiteModel');
10+
var IdSite = require('../lib/resource/IdSite');
1111
var DataStore = require('../lib/ds/DataStore');
1212

1313
describe('Resources: ', function () {
@@ -300,8 +300,8 @@ describe('Resources: ', function () {
300300
cbSpy.should.have.been.calledTwice;
301301
/* jshint +W030 */
302302

303-
getResourceStub.should.have.been.calledWith('boom!', null, IdSiteModel, cbSpy);
304-
getResourceStub.should.have.been.calledWith('boom!', opts, IdSiteModel, cbSpy);
303+
getResourceStub.should.have.been.calledWith('boom!', null, IdSite, cbSpy);
304+
getResourceStub.should.have.been.calledWith('boom!', opts, IdSite, cbSpy);
305305
});
306306
});
307307
});

0 commit comments

Comments
 (0)